Skip to content

docs: network.WLAN in STA_IF mode: which parameters are persistent? #11546

Description

@massimosala

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:

network.country("it")
WIFI = network.WLAN(network.STA_IF)
WIFI.config(dhcp_hostname = "test")
WIFI.connect(ssid, pwd)

From the docs I read

ESP8266 automatically reconnects to the last Access Point when STA_IF is active, even after reboot/reset

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:

  1. Is it confirmed the esp8266 store only the SSID and password ?
  2. Is this a behaviour of the esp8266 of also on other micros, like esp32 ?
  3. At power up, is it possible to mantain the working WiFi connection and set the hostname?
  4. which country codes are supported by network.country() ?

I cannot find hints.
Please anybody point me to the docs - - or how can we improve the existing ones.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions