On message reception, the receiver obtains the corresponding “wall’” clock time expressing time (in nanoseconds) since the epoch. In principle, two broadcast packets provide a synchronization point between the transmitter and the receiv- er.3 The difference between the local and “wall” clock time of a synchronization point estimates the clock offset of the transmitter.
The counter value ts_counter is needed to esti- mate the time elapsed on the beacon unit. If the underlying platform uses a b bit field to store the timestamp value, and the timer fires every interval ms, the total time that can be represented by the timestamp field is (2b * interval) ms. Therefore, the configuration of b = 24 bits and interval = 100 ms can be used to make the timestamp value work for approximately 19 days without rolling over.4
In the next subsection, we discuss the general uncertainties associated with RF message delivery and then converge to our specific use case. It is then followed by a detailed explanation of the structure of the BLE advertisement packet with specifics into the packet restructuring as per the nRF24L01+ Enhanced ShockBurst protocol engine.