Unable to set hostname

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
rtborg
Posts: 16
Joined: Tue Sep 07, 2021 6:01 am

Unable to set hostname

Post by rtborg » Sun Dec 05, 2021 10:44 am

Hello,

I'd like to set a hostname for my ESP32 board, and the code I am using is:

Code: Select all

self.wlan_sta.connect(ssid, password)
self.wlan_sta.config(dhcp_hostname = self.hostname)
After that if I print out the hostname, it's the same as the one I set; however my router just shows the name espressif. If I move the call to config before connect, the result is the same.

Can someone point me in the right direction here. Thanks

EDIT: After resetting the router I can now see the changed hostname.

Post Reply