6 years, 9 months ago.

How can 4 devices in a Bluetooth piconet remain synchronized within 1 millisecond of each other?

I have 4 devices communicating in a Bluetooth piconet, where 1 device is the master device and 3 devices are slave devices.

I want to time synchronize the 4 devices to within 1 millisecond using Bluetooth communication.

To do this, each device would share and/or compute a "common" time clock such that all devices can be time synchronized for other tasks e.g. infrared data communication, etc.

-Ken Software Engineer

1 Answer

6 years, 9 months ago.

hi Ken, I'm no Bluetooth expert, so what comes to mind may not be appropriate. But the standard internet NTP might be something to look at.

The slaves consult a time master, and through a small series of transactions they subtract out the latency of the communication path.

Whether you can get to within 1 msec I don't know. If the processing time at each end of the link does not have variable latency induced by a running OS, for example, or if that latency is incredibly small, then you may be able to get to w/in 1 msec.

The code for an internet connected NTP client is not complicated and some exist on the mbed site. I have not sought, or seen, the code for the server side, but if you find yourself working through the client side code in detail, then you may see that the server side is about the same complexity.

Thanks David for the comment. I wasn't aware of NTP as a time sync mechanism on the internet so it's quite fascinating to me. Wikipedia gives a good description of NTP, and shows the small arithmetic equation that can be used to sync local computers/devices to within 1 millisec. So this might help me.

posted by Ken Huebner 13 Jul 2017