BTnode Bluetooth Time Synchronization
Overview
Since June '07, the BTnut CVS HEAD provides a time synchronization mechanism based on Bluetooth Clock Offsets reported by the Bluetooth module. The advantage of this scheme is that it requires no periodic communication and its accuracy is not influenced by the actual data communication over the Bluetooth connections. Time synchronization was developed as part of the Sensor Network Inspection Framework (SNIF).
Accuracy
The maximal error is the sum of the max error reading the local clock on sender and receiver plus the per-hop error. Reading the clock is +/- 1 ms on average, but worst case might be 5 ms. The per-hop error should be below 1.25 ms but it seems to be less than 2.5 ms. For a 7-hop network, by this numbers, the worst error would be 5+5+17.5=27.5 ms. In a 2-hour evaluation the max error was 12 ms.
Usage
Have a look at <time/bt_time_sync.h>. The concept is explained in more detail in an invited BROADNETS paper and is used by the BTnode-based distributed Sniffer component of SNIF.
Further Notes
- The Nut/OS clock will overrun every 47 days, the Bluetooth based time stamps currently overrun every 15 days. Please contact us if you need to extend this range.
- The chain topology used for the paper evaluation was created by a (very simple connection manager. Given a list of nodes (resp. their MAC addresses), each node tries to connect to its next neighbour. See <cm/cm_chain.h> for usage info.