This requires the timestamps of both the systems. Fig.2 depicts the working of the synchronization process. The first step is the standard establishment of a Bluetooth
connection after pairing with the device. Once the connection is established, the slave device sends a timestamp to the master and stores it as TS. As soon as the master device receives the timestamp, it sends back its own timestamp to the slave device. This returned timestamp is recorded as TR along with the timestamp when TR was received by the slave device as T S. The process is repeated for 30 s and the timestamps are recorded.This process is followed by the client clock synchronization module in the slave device. This module has four major operations: estimating the roundtrip time, estimating the offset, calculating themastertime,andsettingtheslaveclock.The roundtrip time is given by