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

Scanning WiFi #54

Open
shajek opened this issue May 21, 2018 · 1 comment
Open

Scanning WiFi #54

shajek opened this issue May 21, 2018 · 1 comment

Comments

@shajek
Copy link
Contributor

shajek commented May 21, 2018

hellou, i try to figure out how detect unsuccesfull scanning. My problem in my battery application is, when wifi is not connected then node try connect forever and battery drain so much, because MQTT broker handle sleeping. I cannot access your private variables, than i asking you, what you recommend to detect scanning cycles .... I want to pass 1-2 scan of WiFi than deepsleep for a while. Thank you

@shajek shajek changed the title scann Scanning WiFi May 21, 2018
@simone1999
Copy link
Collaborator

hi,
the ESP8266MQTTMesh code is never blocking, so you can execute your Functions (setup and loop) while the Libary is scanning for WIFI. Also you have the function mesh.connected() which you can use to detect if the Connection has suceedet, so my advice would be to deepsleep the esp if a certain Time has pased in which no Connection has been made. Youst save the time at the Beginning of your programm in a Variable and look in every loop if connection is not there and a certain Time has passed.

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

No branches or pull requests

2 participants