An ESP8266 running in promiscuous mode, listening to beacon frames from neighbouring APs, one of the fields being a timestamp.
https://en.wikipedia.org/wiki/Beacon_frame
https://mrncciew.com/2014/10/08/802-11- ... con-frame/
Could this be a sneaky way to set the RTC without requiring your ESP8266 to be connected to a network and making a ntp update request?
EDIT: It seems the timestamp field is more of an uptime for the AP, rather than a unix timestamp. Bummer.
Beacon frame timestamp alt to ntp
Re: Beacon frame timestamp alt to ntp
Did you ever find an alternate to NTP with beacon packets? I'm just starting down that road myself. I'm building a clock type project and would like the time to autoset w/o user interaction.
M@
M@
Re: Beacon frame timestamp alt to ntp
I've heard of radios you can buy which sync up with the WWVB radio signal sent from the atomic clock in the US:
https://www.amazon.com/WWVB-60kHz-Atomi ... B01KH3VEGS
but I haven't used one myself.
https://www.amazon.com/WWVB-60kHz-Atomi ... B01KH3VEGS
but I haven't used one myself.
Re: Beacon frame timestamp alt to ntp
Looks like you can get the date/time from FM radio stations that emit RDS packets, eg. with a RDA5807M radio.
https://hackaday.io/project/9009-arduino-radio-with-rds
I have basic RDA5807M + TEA5767 micropython drivers. I'll see if I can add RDS support!
https://hackaday.io/project/9009-arduino-radio-with-rds
I have basic RDA5807M + TEA5767 micropython drivers. I'll see if I can add RDS support!
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Beacon frame timestamp alt to ntp
Another approach is to use a GPS module.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Beacon frame timestamp alt to ntp
Where is the problem with using NTP? I will admit that I don’t understand how to connect to an NTP server and what the effect of network delays etc might be on accuracy, but a very cursory look at examples of NTP clients written in Python makes it look simple, Am I missing something.
... Ok I read your post properly, you want to do it without connecting completely to the network
... Ok I read your post properly, you want to do it without connecting completely to the network
Re: Beacon frame timestamp alt to ntp
Being able to fetch the datetime on battery operated nodes that spend most of their time asleep, without requiring a network connection, would be nice to have.
If the node forwards sensor data in real-time over RF, it doesn’t need to send a timestamp with the data. The recipient, which would have a network connection, would have the current time from NTP. And if that’s the case, it can just send the datetime over RF back to the sensor nodes if they actually need it.
I guess it would be useful for completely offline nodes which log data to spi flash or eeproms. Or networks which collect and log data, then only forward it at specific times.
If nothing else, a learning experience at decoding 802.11 management frames, rds packets, nmea sentences or other crafty solutions we come up with.
If the node forwards sensor data in real-time over RF, it doesn’t need to send a timestamp with the data. The recipient, which would have a network connection, would have the current time from NTP. And if that’s the case, it can just send the datetime over RF back to the sensor nodes if they actually need it.
I guess it would be useful for completely offline nodes which log data to spi flash or eeproms. Or networks which collect and log data, then only forward it at specific times.
If nothing else, a learning experience at decoding 802.11 management frames, rds packets, nmea sentences or other crafty solutions we come up with.