Resynchronization of devices that use different timing references
A method includes repeatedly sending, by a first device, sync beacons to a second device in a target network at a first frequency. The method also includes determining that the second device will use beacons received from an unrelated sync provider (USP) device for synchronization of a clock of the second device with the target network. The method further includes repeatedly sending the sync beacons to the second device at a second frequency that is less frequent than the first frequency. The second frequency is determined based on a maximum synchronization error tolerance of the target network.
1 . A method comprising:
repeatedly sending, by a first device, sync beacons to a second device in a target network at a first frequency;
determining that the second device will use beacons received from an unrelated sync provider (USP) device for synchronization of a clock of the second device with the target network; and
repeatedly sending the sync beacons to the second device at a second frequency that is less frequent than the first frequency,
wherein the second frequency is determined based on a maximum synchronization error tolerance of the target network.
2 . The method of claim 1 , further comprising:
determining that the first device will use second beacons received from a second USP device for synchronization of a clock of the first device with the target network;
receiving, at the first device, beacons from the second USP device during a time interval between consecutive sync beacons that are sent to the second device; and
synchronizing the clock of the first device with the target network using the beacons from the second USP device.
3 . The method of claim 2 , wherein synchronizing the clock of the first device with the target network using the beacons from the second USP device comprises:
calculating a clock offset between (i) a time indicated in a first beacon from the second USP device and (ii) a reference time of the target network; and
obtaining subsequent reference times of the target network by adding the clock offset to times indicated in subsequently received beacons from the second USP device after the first beacon.
4 . The method of claim 1 , further comprising:
determining the second frequency, comprising:
receiving, from the second device, a clock drift estimate of a clock of the USP device; and
determining the second frequency based on the received clock drift estimate.
5 . The method of claim 1 , wherein the USP device comprises a Wi-Fi access point (AP) communicatively coupled to the second device.
6 . The method of claim 1 , wherein the second device is one device among a plurality of devices in the target network that all communicate with the USP device.
7 . The method of claim 1 , wherein the target network comprises a Wi-Fi neighbor awareness networking (NAN) cluster.
8 . A device comprising:
a transceiver; and
a processor operably connected to the transceiver, the processor configured to:
control the transceiver to repeatedly send sync beacons to a second device in a target network at a first frequency;
determine that the second device will use beacons received from an unrelated sync provider (USP) device for synchronization of a clock of the second device with the target network; and
control the transceiver to repeatedly send the sync beacons to the second device at a second frequency that is less frequent than the first frequency,
wherein the processor is configured to determine the second frequency based on a maximum synchronization error tolerance of the target network.
9 . The device of claim 8 , wherein the processor is further configured to:
determine that the device will use second beacons received from a second USP device for synchronization of a clock of the device with the target network;
receive, via the transceiver, beacons from the second USP device during a time interval between consecutive sync beacons that are sent to the second device; and
synchronize the clock of the device with the target network using the beacons from the second USP device.
10 . The device of claim 9 , wherein to synchronize the clock of the device with the target network using the beacons from the second USP device, the processor is configured to:
calculate a clock offset between (i) a time indicated in a first beacon from the second USP device and (ii) a reference time of the target network; and
obtain subsequent reference times of the target network by adding the clock offset to times indicated in subsequently received beacons from the second USP device after the first beacon.
11 . The device of claim 8 , wherein the processor is further configured to determine the second frequency, comprising:
receive, from the second device, a clock drift estimate of a clock of the USP device; and
determine the second frequency based on the received clock drift estimate.
12 . The device of claim 8 , wherein the USP device comprises a Wi-Fi access point (AP) communicatively coupled to the second device.
13 . The device of claim 8 , wherein the second device is one device among a plurality of devices in the target network that all communicate with the USP device.
14 . The device of claim 8 , wherein the target network comprises a Wi-Fi neighbor awareness networking (NAN) cluster.
15 . A non-transitory computer readable medium comprising program code that, when executed by a processor of a device, causes the device to:
repeatedly send sync beacons to a second device in a target network at a first frequency;
determine that the second device will use beacons received from an unrelated sync provider (USP) device for synchronization of a clock of the second device with the target network; and
repeatedly send the sync beacons to the second device at a second frequency that is less frequent than the first frequency,
wherein the second frequency is determined based on a maximum synchronization error tolerance of the target network.
16 . The non-transitory computer readable medium of claim 15 , wherein the program code further causes the device to:
determine that the device will use second beacons received from a second USP device for synchronization of a clock of the device with the target network;
receive beacons from the second USP device during a time interval between consecutive sync beacons that are sent to the second device; and
synchronize the clock of the device with the target network using the beacons from the second USP device.
17 . The non-transitory computer readable medium of claim 16 , wherein the program code to synchronize the clock of the device with the target network using the beacons from the second USP device comprises program code to:
calculate a clock offset between (i) a time indicated in a first beacon from the second USP device and (ii) a reference time of the target network; and
obtain subsequent reference times of the target network by adding the clock offset to times indicated in subsequently received beacons from the second USP device after the first beacon.
18 . The non-transitory computer readable medium of claim 15 , wherein the program code further causes the device to determine the second frequency, comprising:
receive, from the second device, a clock drift estimate of a clock of the USP device; and
determine the second frequency based on the received clock drift estimate.
19 . The non-transitory computer readable medium of claim 15 , wherein the USP device comprises a Wi-Fi access point (AP) communicatively coupled to the second device.
20 . The non-transitory computer readable medium of claim 15 , wherein the target network comprises a Wi-Fi neighbor awareness networking (NAN) cluster.