---
title: "From BLE to a Pi NTP/PTP gateway — PToB research"
description: "Pi 5 / M-HAT PPS transfer: 600/600 pulses, 872 ns GPIO phase RMS and 7.017 µs maximum. NTP/PTP protocol checks, with wired output, Linux USB and reverse PTP still unmeasured."
url: "https://ptob.dev/research/pi5-mhat-time-gateway/"
language: "en"
robots: "index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1"
representations: {"application/json":"https://ptob.dev/research/pi5-mhat-time-gateway/?format=json","text/markdown":"https://ptob.dev/research/pi5-mhat-time-gateway/?format=markdown"}
format_description: "https://ptob.dev/agent-formats.json"
---

# 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 draft  2 November 2026  7 pages · PDF

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

[Read PDF](https://ptob.dev/papers/preview/?file=%2Fpapers%2Fpi5-mhat-gateway-20261102.pdf)[Cite this edition](https://ptob.dev/research/pi5-mhat-time-gateway/#citation)

## 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.

[Explore the RP5 hardware and monitoring guide](https://ptob.dev/hardware/#rp5)[Inspect the complete Pi measurement summary](https://ptob.dev/research/#pi5-mhat)[Compare the macOS USB architecture](https://ptob.dev/research/usb-macos-time-transfer/)

## 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](https://ptob.dev/papers/preview/?file=%2Fpapers%2Fpi5-mhat-gateway-20261102.pdf).

Summary permalink: [https://ptob.dev/research/pi5-mhat-time-gateway/](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.

## The full paper

The original document includes the technical detail and references behind this summary.

[Read PDF](https://ptob.dev/papers/preview/?file=%2Fpapers%2Fpi5-mhat-gateway-20261102.pdf)
[Cite this edition](https://ptob.dev/research/pi5-mhat-time-gateway/#citation)

[Paper sources on GitHub](https://github.com/yantisj2/PToB/blob/main/papers/README.md)

## Continue exploring

[Affordable timing from Starlink over WiFi](https://ptob.dev/research/starlink-wifi-timing/)[Trustworthy timing in Zephyr](https://ptob.dev/research/zephyr-hardware-timestamps/)[Low-level timing on ESP32-S3](https://ptob.dev/research/esp32-s3-event-capture/)[BLE timing tails and multipath](https://ptob.dev/research/ble-timing-tails-multipath/)[From USB frames to a macOS clock](https://ptob.dev/research/usb-macos-time-transfer/)[Empirical BLE-trained holdover](https://ptob.dev/research/empirical-ble-holdover/)[ESP32-S3 causal clock discipline](https://ptob.dev/research/esp32-s3-causal-clock-discipline/)[Timing information and power scheduling](https://ptob.dev/research/awake-timing-power-scheduling/)[All research & evidence](https://ptob.dev/research/)

## Structured data

```json
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "WebSite",
      "@id": "https://ptob.dev/#website",
      "url": "https://ptob.dev/",
      "name": "PToB",
      "alternateName": [
        "Precision Time over BLE",
        "Precision Time over Bluetooth"
      ],
      "description": "Bluetooth and USB software clocks: W12 60.3 ns relative-PPS RMS over 522/600 observations, separate 64 s sampled holdover, and CoreSE diagnostics.",
      "inLanguage": [
        "en",
        "de"
      ],
      "publisher": {
        "@id": "https://ptob.dev/#jonathan-yantis"
      }
    },
    {
      "@type": "Person",
      "@id": "https://ptob.dev/#jonathan-yantis",
      "name": "Jonathan Yantis",
      "url": "https://github.com/yantisj2/PToB/blob/main/CREDITS.md"
    },
    {
      "@type": "Project",
      "@id": "https://ptob.dev/#project",
      "name": "PToB",
      "alternateName": "Precision Time over BLE",
      "url": "https://ptob.dev/",
      "description": "An independent protocol project researching precision time transfer across Bluetooth-enabled microcontrollers and USB clients.",
      "sameAs": "https://github.com/yantisj2/PToB",
      "member": {
        "@id": "https://ptob.dev/#jonathan-yantis"
      },
      "knowsAbout": {
        "@id": "https://ptob.dev/#protocol"
      }
    },
    {
      "@type": "Thing",
      "@id": "https://ptob.dev/#protocol",
      "name": "Precision Time over BLE",
      "alternateName": "PToB",
      "description": "An experimental PTP-inspired protocol proposal for wireless clock synchronization over Bluetooth Low Energy."
    },
    {
      "@type": "WebPage",
      "@id": "https://ptob.dev/research/pi5-mhat-time-gateway/#webpage",
      "url": "https://ptob.dev/research/pi5-mhat-time-gateway/",
      "name": "From BLE to a Pi NTP/PTP gateway — PToB research",
      "description": "Pi 5 / M-HAT PPS transfer: 600/600 pulses, 872 ns GPIO phase RMS and 7.017 µs maximum. NTP/PTP protocol checks, with wired output, Linux USB and reverse PTP still unmeasured.",
      "inLanguage": "en",
      "keywords": [
        "Bluetooth clock synchronization",
        "Precision Time over BLE",
        "Implementation & time transfer"
      ],
      "isPartOf": {
        "@id": "https://ptob.dev/#website"
      },
      "author": {
        "@id": "https://ptob.dev/#jonathan-yantis"
      },
      "about": {
        "@id": "https://ptob.dev/#protocol"
      },
      "dateModified": "2026-11-02",
      "image": "https://ptob.dev/social/ptob-timing-v3.jpg",
      "breadcrumb": {
        "@id": "https://ptob.dev/research/pi5-mhat-time-gateway/#breadcrumbs"
      },
      "mainEntity": {
        "@id": "https://ptob.dev/papers/pi5-mhat-gateway-20261102.pdf#article"
      }
    },
    {
      "@type": "BreadcrumbList",
      "@id": "https://ptob.dev/research/pi5-mhat-time-gateway/#breadcrumbs",
      "itemListElement": [
        {
          "@type": "ListItem",
          "position": 1,
          "name": "PToB",
          "item": "https://ptob.dev/"
        },
        {
          "@type": "ListItem",
          "position": 2,
          "name": "Bluetooth and Starlink timing research and results",
          "item": "https://ptob.dev/research/"
        },
        {
          "@type": "ListItem",
          "position": 3,
          "name": "From BLE to a Pi NTP/PTP gateway",
          "item": "https://ptob.dev/research/pi5-mhat-time-gateway/"
        }
      ]
    },
    {
      "@type": "ScholarlyArticle",
      "@id": "https://ptob.dev/papers/pi5-mhat-gateway-20261102.pdf#article",
      "url": "https://ptob.dev/research/pi5-mhat-time-gateway/",
      "headline": "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",
      "name": "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",
      "description": "Pi 5 / M-HAT PPS transfer: 600/600 pulses, 872 ns GPIO phase RMS and 7.017 µs maximum. NTP/PTP protocol checks, with wired output, Linux USB and reverse PTP still unmeasured.",
      "author": {
        "@id": "https://ptob.dev/#jonathan-yantis"
      },
      "datePublished": "2026-11-02",
      "dateModified": "2026-11-02",
      "inLanguage": "en",
      "creativeWorkStatus": "Public-review research draft",
      "about": {
        "@id": "https://ptob.dev/#protocol"
      },
      "mainEntityOfPage": {
        "@id": "https://ptob.dev/research/pi5-mhat-time-gateway/#webpage"
      },
      "image": "https://ptob.dev/social/ptob-timing-v3.jpg",
      "encoding": {
        "@type": "MediaObject",
        "contentUrl": "https://ptob.dev/papers/pi5-mhat-gateway-20261102.pdf",
        "encodingFormat": "application/pdf"
      },
      "isPartOf": {
        "@id": "https://ptob.dev/research/#webpage"
      }
    }
  ]
}
```
