Time from beacon frame

Mjolinor
Posts: 1
Joined: Wed Jan 13, 2016 3:55 pm

Time from beacon frame

Postby Mjolinor » Wed Jan 13, 2016 4:13 pm

I am making a clock and need the time. I do not want to connect to anything in order to NTP so I can use GPS but that is expensive and doesn't work well inside.

According to the specification of wifi the beacon frame from an AP should include the "time since epoch" so that will do me. If the time is incorrect then I will have a button to ignore and find next SSID but most APs now use NTP and have the correct time set.

I mostly like to spend my time with assembler or machine code on PICs but anything to do with Ethernet gets horrible without a higher level language so I reckon best thing is C or C++ which I am pretty abysmal at. I normally get by with stealing bits of code from here and there on the Internet but I can't find what I need.

So, much reading and playing lets me programme the ESP8266. I did start with the Arduino method but it is not as complete in the libraries as the original SDK and it does not have a promiscuous mode which I believe I need to get the beacon frame.

Starting with the samples that are available I have tried going backwards through the header files to see where I can get access to the raw packet data that I can parse the "time since epoch! out of but I cannot find it, I get hopelessly lost with lots of files open trying to follow them through.

Any pointers please.

Who is online

Users browsing this forum: No registered users and 1 guest