How to set host name on Pico W?
Posted: Wed Jul 27, 2022 1:30 pm
How to set host name on Pico W?
If theInterface is my network.WLAN object, neither of the following work, they both return 'unknown config param' exception...
theInterface.config(hostname=theHost)
theInterface.config(dhcp_hostname=theHost)
I create theHost string as 'picoXXXXXX' where I get the last octets of the MAC address. This quite frustrating that what is implemented in the ESP8266 and ESP32 support under MicroPython apparently is not implemented for RPi Pico? Please tell me that is not the case?
Nor can you query for the host name from the config method. I need the host name set, because I am going to use MQTT communication and using the ip address in MQTT topics as subscribed is just a horrible hack. What happens when the environment changes for example.
If theInterface is my network.WLAN object, neither of the following work, they both return 'unknown config param' exception...
theInterface.config(hostname=theHost)
theInterface.config(dhcp_hostname=theHost)
I create theHost string as 'picoXXXXXX' where I get the last octets of the MAC address. This quite frustrating that what is implemented in the ESP8266 and ESP32 support under MicroPython apparently is not implemented for RPi Pico? Please tell me that is not the case?
Nor can you query for the host name from the config method. I need the host name set, because I am going to use MQTT communication and using the ip address in MQTT topics as subscribed is just a horrible hack. What happens when the environment changes for example.