Electronic – Fetching current time from unconnected wifi networks

esp8266wifi

Is there a method for finding the current global time (UTC or other) using an off the shelf WiFi module like the ESP8266, but without actually connecting to one of the available networks?

Basically i'd like to use this in a similar fashion to how the WWV broadcast can be used to guarantee the time keeping of a clock, but without the signal strength concerns of WWV.

Because this is just for a clock and the only purpose of the WiFi support would be to provide accurate time – having the interface necessary to select a network and password is undesirably complex.

Best Answer

802.11 frames don't have any global time information, since such data serves no purpose in the wireless network.

If you have a WiFi hotspot with high uptime, and you can synchronize to UTC time at least once, you could capture beacon frames, which are unencrypted and provide a mandatory timestamp field for synchronization purposes. You could then associate that timestamp with a known UTC value, and later estimate current UTC time using that initial value and the current timestamp. Needless to say, the timestamp is lost every time the hotspot restarts, plus you'll miss some subtle events like leap seconds (that's why I said estimate).

Whether ESP8266 can provide you access to raw beacon frames is another question.