Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new WiFi.mode(WIFI_SHUTDOWN) #6291

Closed
TD-er opened this issue Jul 12, 2019 · 2 comments
Closed

Add new WiFi.mode(WIFI_SHUTDOWN) #6291

TD-er opened this issue Jul 12, 2019 · 2 comments
Assignees
Labels
waiting for feedback Waiting on additional info. If it's not received, the issue may be closed.

Comments

@TD-er
Copy link
Contributor

TD-er commented Jul 12, 2019

As discussed here: #6172 (comment)

It appears the WiFi modes require some steps to switch on and off which have to be taken in a very specific order.
It would be nice to have some generic commands/options to switch WiFi mode.
This would make it a lot easier to create some reliable "going to sleep" actions.

Things to consider:

  • Controlling (and keeping state?) of DHCP server(s) (client for STA and server for AP)
  • Keeping last known mode (AP/STA/AP+STA)
  • Keeping last known connection parameters (BSSID/channel) to allow quick reconnect
  • Calling some callback function for cleaning up existing connections.
  • Flushing data in buffers.
  • Considering some timeout to flush buffers
  • Where to keep these stored settings (RTC memory?)

As a counter part operation, it would be nice to have the WiFi.mode(WIFI_RESUME) option.
This would allow to collect the stored values (or initiate some default steps when those are not available or corrupt) and resume WiFi operations.

Using this can make the ESP a lot more energy efficient since you only need to have WiFi connection when you need to send data.
Great for battery operated nodes or nodes where heat may quickly become an issue.

As noted by @d-a-v

Also there is this FW api we don't so far know/use (not present in official user_interface.h but described in latest api reference datasheet).
These symbols are present in our current firmware.
They will be useful when waking up from WIFI_SHUTDOWN.

@devyte
Copy link
Collaborator

devyte commented Nov 9, 2019

@d-a-v the modes are already implemented. Is there anything pending, or can this be closed?

@devyte devyte added the waiting for feedback Waiting on additional info. If it's not received, the issue may be closed. label Nov 9, 2019
@d-a-v
Copy link
Collaborator

d-a-v commented Nov 9, 2019

closed by #6356

@d-a-v d-a-v closed this as completed Nov 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for feedback Waiting on additional info. If it's not received, the issue may be closed.
Projects
None yet
Development

No branches or pull requests

3 participants