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.
-
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!
-
@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.
-
@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!
-
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
-
@illysky great, hoping to see it soon in official firmware ;-)
-
@illysky Thank you for the update
-
@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
-
Hi, I’ve sent a pull request. Cheers, Dom
-
@bucknall does this feature is available? Can't find on documentation
-
Hi @charly86
It's not there yet -
Just to bring it back on the workbench ;-)
What are the plans to implement this feature?Cheers,
Thomas
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login