xytsrm wrote:davydnorris you say you can connect in 0.5 to 1.0; under what conditions, over what distance?
My sensors connect to public Wifi infrastructure in cities, so there's very dense congestion, and points that are 50-75m away. I actually connect in about 100-200ms - the full wake connect, measure, send, sleep cycle only takes a couple of seconds.
If you are taking that long to connect then there are several things to check:
- store the AP channel and BSSID and use that when you first try to reconnect. Doing a channel scan takes power and time so avoid that as much as possible. If your router is set up to automatically channel hop then try to find a non-congested part of the spectrum and set it up as fixed channel - that will cut down on connect time
- use fixed IP address if you possibly can. Some DHCP negotiations can take forever on some routers. Might be worthwhile using Wireshark and getting a trace
This is my code using the NonOS SDK
https://www.esp8266.com/viewtopic.php?f=166&t=19436