Chat freely about anything...

User avatar
By cptung
#64140 It occurred to me that the SSID broadcast packet itself contains a timestamp. So in theory, it should be possible to parse the SSID packet and extract the timestamp to set the local clock. I'm interested in figuring out how to do this, so I could build a clock that can self-set the time using WiFi, without the need to actually connect to the AP. Imagine having this embedded in all home appliances, so they can self-set their clocks, without requiring the owner to supply WiFi credentials... seems like a game changer to me?

I tried to search the forums, but couldn't get the search tool to work.
User avatar
By schufti
#71737 I would not rely on this "timestamp" as being something related to utc or local time ...
it is more like something to synchronise all associated stations.
1. Timestamp (8 byte):
A value representing the time on the access point, which is the number of microseconds the AP has been active.When timestamp reach its max (2^64 microsecond or ~580,000 years) it will reset to 0. This field contain in Beacon Frame & Probe Response frame.
User avatar
By htwtsang
#71805
philbowles wrote:I think this is the same technique that "ESPNow" uses - might be worth looking "under the hood" of that functionality


I had a quick look at the API and it doesn't seem to tell me too much.

schufti wrote:I would not rely on this "timestamp" as being something related to utc or local time ...
it is more like something to synchronise all associated stations.
1. Timestamp (8 byte):
A value representing the time on the access point, which is the number of microseconds the AP has been active.When timestamp reach its max (2^64 microsecond or ~580,000 years) it will reset to 0. This field contain in Beacon Frame & Probe Response frame.


Well that's unfortunate, I guess I have to find a new method.

As far as I'm aware these are the methods that can get a timestamp:
1.SNTP/NTP library, however this requires an internet connection to connect to the server. You should be able to connect to a local server but im not too sure.
2.Using javascript/browser to get the local time of the device, don't need a internet connection as this is done by the device however you need to open the html page.
3.Requesting timestamp from the connected network/device, I don't think there's much support for this and I dont know where to start with this.

If anyone got any more methods that would be great, ideally I want a method where you don't need to connect to a AP.