docs: network.WLAN in STA_IF mode: which parameters are persistent? #11548
Replies: 3 comments 2 replies
-
This behaviour on the esp8266 is entirely a function of the Espressif API, and the best source of information should be the Espressif docs for the ESP8266 (nonOS SDK) (eg. google "esp8266 nonos sdk pdf"). However, they can be ambiguous and incomplete. It's just not feasible (or appropriate) to replicate all that documentation into micropython docs. On esp8266, the espressif SDK saves the wifi parameters (at least ssid and password into non-volatile RAM and restores then on reboot). Working out exactly which parameters it saves is, unfortunately an exercise for the reader ;). The answer may be in the docs (check the sdk pdf). PR #9460 adds an option to disable the auto-reconnect "feature" on the esp8266. Personally, I detest this auto-connect misfeature of the esp8266. I always run The esp32 does not have this "feature" enabled by default - but it is possible to configure simlar behaviour using the ESP-IDF, but that is not supported by micropython (thankfully ;-)). |
Beta Was this translation helpful? Give feedback.
-
Oh, I nearly forgot.... re. Question 4... the country setting is not currently used for micropython on the esp8266. In fact, it is only used currently for the cyw43 wifi driver (eg. the rpi pico-w). The allowed values should be any valid two-letter "wifi country codes" (just google that phrase for a complete list), however some devices support only a limited list. |
Beta Was this translation helpful? Give feedback.
-
I can confirm the (at least for me) undesired behavior: The hostname is not persistent. After a reset the hostname in the dhcp request is ESP-XXYYZZ. Funny enough even the default hostname gets ignored. I found an ugly workaround: |
Beta Was this translation helpful? Give feedback.
-
I hit the problem on esp8266, but it is primarly a lack of documentation.
Example: this basic code to init the micro as Wifi client:
From the docs I read
Indeed after a reboot the ESP will auto-reconnect the the access point.
But
It has lost the hostname: in the router I see the factory default "ESP_xxx" (where xxx seems to be the machine unique id).
I don't know about the country setting, if it is persistent between reboots.
I haven't the radio equiment to check the esp radio emissions, regarding WiFi compliance to national requirements.
Questions:
I cannot find hints.
Please anybody point me to the docs - - or how can we improve the existing ones.
Beta Was this translation helpful? Give feedback.
All reactions