A dhcp_hostname query fails on MicroPython v1.19.1? I am using DHCP, it is working correctly for all clients, but if I try to query from for the hostname of my Pico W board, I get the following error? as 'unknown config param' code example below:
theHost=theInterface.config('dhcp_hostname'). Where theInterface is my network.WLAN object, that is both active and connected to my WiFi. I can get other config values, like MAC, channel, txpower, essid, etc. Documentation states that I can query as well as set the dhcp_hostname, welll I guess the query is bugged?
How does one get the hostname of an ESP device or Pico W device that receives and IP address from a DHCP server via MicroPython?
A dhcp_hostname query fails on MicroPython v1.19.1?
-
- Posts: 144
- Joined: Mon Jul 25, 2022 9:45 pm
-
- Posts: 144
- Joined: Mon Jul 25, 2022 9:45 pm
Re: A dhcp_hostname query fails on MicroPython v1.19.1?
Got the answer from a different question/answer... there is a pending issue documented, but has yet to be picked up and fixed.
Re: A dhcp_hostname query fails on MicroPython v1.19.1?
No, documentation states (under WLAN.config):Jibun no kage wrote: ↑Wed Jul 27, 2022 6:24 amDocumentation states that I can query as well as set the dhcp_hostname, welll I guess the query is bugged?
So there's no guarantee that they're supported everywhereFollowing are commonly supported parameters (availability of a specific parameter depends on network technology type, driver, and MicroPython port).
-
- Posts: 144
- Joined: Mon Jul 25, 2022 9:45 pm
Re: A dhcp_hostname query fails on MicroPython v1.19.1?
Yeah, I found a reference that the WLAN driver used on Pico W right now, lacks much of what the others ESP32, etc., support, a maturity thing a times. CWA or was it the CWA3? Don't recall the exact name at the moment. I remember some time ago the ESP32 implementation lacked similar, but I and a few others chimed in and the feature set was enhanced.
Re: A dhcp_hostname query fails on MicroPython v1.19.1?
if you want things changed in MicroPython, you need to raise an issue. Mentioning in on this forum doesn't get it worked on.
Thankfully, there is an open issue for this, and it'll likely make it into the next release in a few months.
Thankfully, there is an open issue for this, and it'll likely make it into the next release in a few months.
-
- Posts: 144
- Joined: Mon Jul 25, 2022 9:45 pm
Re: A dhcp_hostname query fails on MicroPython v1.19.1?
Good point, I knew that in fact, but it is worth repeating. When I hit this issue on ESP32 ESP8266 (this was a long time ago) it was posted as an issue on github. Now the same basic issue with Pico W, no surprise, and as you noted, it has already been identified, so with a bit of luck, addressed in a timely manner (I hope).