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

Disconnect wifi to save energy #1519

Open
lucasmerlin opened this issue Nov 11, 2022 · 3 comments
Open

Disconnect wifi to save energy #1519

lucasmerlin opened this issue Nov 11, 2022 · 3 comments
Labels

Comments

@lucasmerlin
Copy link

Hi! Is there any way to disconnect the wifi after the connection has been established?

@Dirbaio Dirbaio transferred this issue from embassy-rs/cyw43 May 30, 2023
@Frostie314159
Copy link
Contributor

Any updates on this?

@phire
Copy link
Contributor

phire commented Aug 26, 2023

The energy cost of reconnecting is somewhat high, so if you are planning to reconnect every few min, it would be more sane to just to put the wifi into the SuperSave power management mode and leave it idle.

I'm not sure how long your polling period would have to be to actually save power by disconnecting.


It wouldn't be too hard for someone to implement disassociation. According to the upstream driver, it's just a matter of sending a single ioctl.

But, from what I can tell, you need to to fully de-initialize the wifi chip to get the lowest power consumption, which would require quite a bit of refactoring. Either the job of uploading the firmware needs to be moved inside the wifi runner, or embassy-executor needs to gain functionality to stop tasks and start them again later.

@Frostie314159
Copy link
Contributor

Prehaps we could make use of the target wake functionality, which was made available in wifi 6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants