Crocs: Cross-Technology Clock Synchronization for WiFi and ZigBee

Zihao Yu, Chengkun Jiang, Yuan He, Xiaolong Zheng, Xiuzhen GuoEWSN 2018

Introduction

In the rapidly expanding Internet of Things (IoT) ecosystem, devices utilizing disparate wireless standards—such as WiFi and ZigBee—frequently need to operate in concert. For instance, a WiFi-connected security camera and a ZigBee-based motion sensor must have synchronized clocks to accurately timestamp and order events. However, these devices possess incompatible physical layers (PHY), preventing them from communicating directly.

The Synchronization Challenge

Traditional synchronization methods rely on a central gateway to bridge the gap between technologies. The gateway receives a timestamp from one device and forwards it to another. This process, however, introduces significant "jitter"—uncertain delays caused by network congestion and processing time—which severely degrades synchronization accuracy.

Timing diagram illustrating the various delays (send, access, propagation, receive) involved in timestamping.

While recent Cross-Technology Communication (CTC) techniques allow for some direct data exchange, they often suffer from low throughput and high sensitivity to environmental noise, rendering standard protocols like NTP or PTP ineffective in these heterogeneous environments.

The Crocs Protocol

To overcome these hurdles, the authors developed Crocs, a protocol that achieves direct, sub-millisecond clock synchronization by decoupling the timing trigger from the data transmission. The system operates in three distinct phases:

  1. Time Alignment (The Crocs Beacon): Instead of relying on a decoded timestamp for timing, Crocs uses a "mutually detectable event." A WiFi device transmits a specific sequence of packets. While the ZigBee receiver cannot decode the WiFi data, it can sense the resulting Received Signal Strength Indicator (RSSI) bursts. Crocs employs a Barker-code-based sequence of packet intervals. Barker codes possess ideal autocorrelation properties, allowing the ZigBee node to identify the sequence's start with high precision, even amidst heavy interference.
  2. Timestamp Transmission: Once the devices are temporally aligned, the WiFi device transmits the actual timestamp data via CTC. The protocol supports two modulation schemes: Temporal Modulation (encoding data in the length of intervals between packets) and Energy Modulation (encoding data by varying transmission power levels).
  3. Clock Calibration: The ZigBee node collects multiple synchronization pairs (WiFi time vs. local time) and applies linear regression. This calculates both the offset (the immediate time difference) and the skew (the difference in clock frequencies), ensuring long-term stability.
RSSI patterns for periodic beacons, energy modulation, and interval modulation used in Crocs.

Key Insights and Results

The core innovation of Crocs is the realization that in slow, noisy channels, the timing trigger and the data payload should be handled separately. By using a robust beacon to mark a point in time first, the subsequent data transmission does not require microsecond-level timing precision to be effective.

Experimental evaluation using a hardware testbed (USRP SDRs and TelosB motes) yielded several key findings:

  • High Accuracy: Crocs achieves a synchronization error of less than 1 millisecond, outperforming traditional gateway-based solutions.
  • Robustness: The Barker-code beacon maintains high matching rates even under significant noise injection.
  • Low Overhead: The system requires a duty cycle of less than 1.25% for the ZigBee node, preserving battery life.
  • Skew Correction: By addressing clock drift, Crocs prevents error accumulation. Without skew calibration, time error grew to 200ms in just 7 seconds; with Crocs, the error remained stable and low.

Limitations and Future Work

While Crocs represents a significant step forward, the current implementation is primarily unidirectional (WiFi master to ZigBee slave). Additionally, the WiFi component was evaluated using Software Defined Radios (SDRs); implementing the same level of packet interval control on commercial WiFi chips may present additional hardware abstraction challenges. Future research will also need to address the scalability of beacon detection in high-density environments typical of modern smart homes.

Summary updated

BibTeX
@inproceedings{yu2018crocs,
  author = {Zihao Yu and Chengkun Jiang and Yuan He and Xiaolong Zheng and Xiuzhen Guo},
  title = {{Crocs: Cross-Technology Clock Synchronization for WiFi and ZigBee}},
  booktitle = {EWSN},
  year = {2018},
  doi = {10.48550/arxiv.2209.15407},
}
Figure