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

Async scanNetworks & begin #272

Open
produceconsumerobot opened this issue May 31, 2019 · 1 comment
Open

Async scanNetworks & begin #272

produceconsumerobot opened this issue May 31, 2019 · 1 comment
Labels
type: enhancement Proposed improvement

Comments

@produceconsumerobot
Copy link

Is there any interest/plan to incorporate an asynchronous WiFi.scanNetworks and/or WiFi.begin function similar to https://github.com/me-no-dev/ESPAsyncWebServer#scanning-for-available-wifi-networks into the mainline WiFi101?

I'm currently capturing data with a feather M0 wifi (samd21+winc1500) at moderately high rates (17 channels @ 60Hz) and saving it to an SD card. I would like to be able to connect to different wifi networks as they come in and out of range, but currently the scanNetworks and begin functions are taking about 1-2 seconds and only return control to my main loop after completion. To ensure accurate sampling, I have my data collection on an interrupt, and am double buffering data to write to the SD card in the main loop, but double buffering 1-2 seconds of data while I wait for scanNetworks/begin to complete takes a somewhat prohibitive amount of RAM for my application. If there was an async option it would be a huge boon to start a scan/begin, go back to SD card writing and then periodically check whether my network activity had completed.

I would also be happy to contribute my lab's time to this effort if there are any API/style guidelines that I should be aware of.

@per1234 per1234 added the type: enhancement Proposed improvement label Jun 1, 2019
@produceconsumerobot
Copy link
Author

I discovered that WiFi.setTimeout() in 0.16.0 enables asynchronous behavior for WiFi.begin()

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

No branches or pull requests

2 participants