How to set a dhcp_hostname for a lopy in station mode.
-
I would like to know if it is possible to set the hostname for the lopy in station mode on the home router. OR is there a lib/function that can does that and how do we implement it on a lopy.
-
Just to bring it back on the workbench ;-)
What are the plans to implement this feature?Cheers,
Thomas
-
Hi @charly86
It's not there yet
-
@bucknall does this feature is available? Can't find on documentation
-
Hi, I’ve sent a pull request. Cheers, Dom
-
@illysky said in How to set a dhcp_hostname for a lopy in station mode.:
illysky/pycom-micropython-sigfox
Could you do a pull request and we can hopefully get this merged into the official firmware
-
@illysky Thank you for the update
-
@illysky great, hoping to see it soon in official firmware ;-)
-
I know this is a bit late, but thought I'd share, I also needed to change the hostname appearing on my dhcp server, so I have forked pycom's repo and adjusted the WLAN class to accept "hostname" on instantiation.
It adds a name to the underlying NETIF whether AP or STA.
illysky/pycom-micropython-sigfox
Just build as per pycom's instructions.
Have a great day
Dom
-
@Andy12 I 100% understand where you're coming from! I run into these issues as well - will keep you updated to any developments - shouldn't be too long as they are already available through the Espressif IDF!
-
@bucknall Thank you. I hope this feature will be implemented soon because:
- It is difficult to identify the lopy's hostname eg if 5 of them are connected to the same router.
- Socket.getaddrinfo function returns random ip if wlan.ifconfig() is configured with static parameters instead of DHCP.
-
Hi @Andy12,
Currently this isn't possible from our MicroPython Library. This feature (updating the device Hostname) is available through the Espressif IDF so we will be adding it in the near future! Thanks!