A Raspberry Pi Time Server at the Edge of a BLE Timing Mesh: Measured M-HAT PPS Transfer and Prospects for USB and Reverse PTP Gateways

Public-review research draft7 pages · PDF

How can a Raspberry Pi turn BLE mesh time into a Linux clock and network time services?

Overview

The Pi 5 / Particle M-HAT experiment receives authenticated BLE timing on an nRF52840, generates hardware-timer PPS through the HAT connector and disciplines Linux with GPIO PPS and chrony. Network NTP supplies coarse UTC second numbering. The paper follows the complete clock chain, monitoring and conservative NTP/PTP ownership, then examines USB/SOF and external-PTP ingress as future bridges.

What this paper covers

  • How hardware-timer PPS carries an admitted BLE clock through the M-HAT bus to Pi GPIO16 and chrony.
  • Why GPIO phase, receiver fit and chrony tracking RMS describe different stages of a feedback path.
  • How explicit system-clock and PHC ownership prepares an Ethernet PTP server without claiming measured wired output.
  • What a Linux USB/SOF bridge and a reverse PTP-to-BLE source still need to implement and validate.

Research scope

After 120.041 seconds of warmup, the complete 600.026-second window retained 600/600 new pulses, one source cohort and no observed gaps or service restarts. GPIO phase RMS was 872.002 ns, absolute P99 4.809 µs and maximum 7.017 µs; 46/600 observations exceeded 1 µs. Chrony tracking RMS had a separate 72 ns median. These are feedback-path observations against the disciplined Pi clock, without independent UTC or electrical accuracy. Separate loopback NTP and Wi-Fi PTP egress checks establish protocol health. Ethernet was disconnected; wired delivery, Linux USB/SOF and reverse PTP remain unmeasured.

Read it in context

Read this integration study beside the macOS USB paper to compare clock-transfer architectures without pooling their metrics. The current M-HAT is a mesh receiver, not a grandmaster or external-PTP input. The next proposed input uses a USB-connected T096 RC in shadow mode before any Linux clock-feed promotion. The author approved this unchanged seven-page paper for public draft review. Its original author-review label remains in the PDF; it remains a research draft.

Cite this edition

Jonathan Yantis. A Raspberry Pi Time Server at the Edge of a BLE Timing Mesh: Measured M-HAT PPS Transfer and Prospects for USB and Reverse PTP Gateways. 2 November 2026. Public-review research draft. Original PDF.

Summary permalink: https://ptob.dev/research/pi5-mhat-time-gateway/

Jonathan Yantis leads protocol design, hardware development and research. GPT 6.1 contributes implementation, analysis and documentation. This page summarizes the linked edition; retain its original evidence dates and measurement references.