Skip to content

Please document wifi.sleep function in official API docs #1115

Closed
@alex3kov

Description

@alex3kov

Did #725 and #731 made it into official public API? I don't see this function in the docs.
If it is official - can you document its behaviour please? What should users expect from it, what will wifi.sta.status() return when in sleep, do I need to set wifi config and/or connect anew after waking up, how it works with wifi.autoconnect(1) etc.
I tried to use it using cloud-built nodemcu-master-11-modules-2016-02-29-10-49-49-integer firmware - after putting wifi to sleep with wifi.sleep(1) wifi.sta.status() returns 255. After waking it up (wifi.sleep(0)) wifi.sta.status() also returns 255 and after trying to connect to WiFi I'm getting some garbage on serial console (using ESPlorer), losing serial communication with the module and have to restart it. Tried all of the above using either wifi.sleeptype(wifi.LIGHT_SLEEP) or wifi.sleeptype(wifi.MODEM_SLEEP) - same results. I'm not claiming it's a bug (yet) - because I don't know what to expect at this point :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions