WeSearch

From milliseconds to 26 nanoseconds: how a $20 eBay SFP module beat my NT

Austin· ·12 min read · 0 reactions · 0 comments · 2 views
From milliseconds to 26 nanoseconds: how a $20 eBay SFP module beat my NT

Welcome to Austin’s Nerdy Things, where we spend years chasing nanoseconds that nobody asked us to chase. Five years ago, I started this blog by building a microsecond-accurate NTP server with a Raspberry Pi and PPS GPS. Then I went simpler – a $12 USB GPS for millisecond-accurate NTP because ease of use matters too. […]

Original article
Austin's Nerdy Things · Austin
Read full at Austin's Nerdy Things →
Full article excerpt tap to expand

Categories Chrony DIY homelab Linux NTP PTP Raspberry Pi From Milliseconds to 26 Nanoseconds: How a $20 eBay SFP Module Beat My Entire NTP Setup Post author By Austin Post date April 26, 2026 No Comments on From Milliseconds to 26 Nanoseconds: How a $20 eBay SFP Module Beat My Entire NTP Setup System clock offset over 36 hours — PPS scattered at ±200 ns, then PTP collapses it to a thin line Welcome to Austin’s Nerdy Things, where we spend years chasing nanoseconds that nobody asked us to chase. Five years ago, I started this blog by building a microsecond-accurate NTP server with a Raspberry Pi and PPS GPS. Then I went simpler – a $12 USB GPS for millisecond-accurate NTP because ease of use matters too. Then I spent months doing thermal management on the CPU to squeeze out another 81% improvement. My beloved Raspberry Pi 3B has been sitting at around +/- 200 nanoseconds for over a year now, and I figured that was about as good as it gets for consumer hardware. A $20 eBay purchase from two years ago just demolished all of that. The Hardware: Telecom Surplus for Pocket Change The key piece is an Oscilloquartz OSA-5401 – a GPS-disciplined PTP grandmaster clock in an SFP form factor. These things were designed to plug into telecom switches and provide IEEE 1588 Precision Time Protocol timing for cellular networks. They have a built-in GPS receiver, an OCXO (oven-controlled crystal oscillator), and an FPGA that handles hardware PTP timestamping. New, they cost thousands of dollars. On eBay, a handful of decommissioned units went for $20. Now they’re unavailable. If they do appear (rarely), they’re $300-500. I first spotted these on a ServeTheHome forum thread back in 2024. Someone found a batch on eBay for $20 each and I jumped on one. The firmware doesn’t include the NTP server feature from the spec sheet (that requires a license), but it spews PTP multicast frames on power-up – and that turns out to be all you need. I posted the first working PTP+chrony config in that thread, which others used as a starting point. Mine was flaky from the start – the antenna would intermittently disconnect. I reported in the thread that “wiggling the module helped,” which in retrospect should have been a bigger clue. When I finally pulled the board out of the SFP housing, I found the GNSS SMA connector had broken loose from the PCB – probably cracked during decommissioning. A few minutes with a soldering iron fixed that, and it’s been rock solid since. Here’s the board with the resoldered connector, screwdriver bit for scale: OSA-5401 PCB with resoldered GNSS SMA connector, screwdriver bit for scale And installed in port F2 of a Brocade ICX6430-C12 switch, GPS antenna connected: OSA-5401 installed in a Brocade ICX6430-C12 SFP port with GPS antenna I also have a BH3SAP GPSDO that I picked up for about $70 on eBay – one of those Chinese units with an OX256B OCXO and an STM32 Blue Pill microcontroller. There’s a great thread on EEVBlog about these. I soldered some jumper wires to the MCU PPS output and connected it to GPIO 18 on my Raspberry Pi 5. I’ve been running custom firmware on it (based on fredzo’s gpsdo-fw) with some modifications for telemetry and flywheel display. The whole mess wired together – GPSDO PPS jumper wires running to the Pi 5’s GPIO header: GPSDO connected to Raspberry Pi 5 via PPS jumper wires The Raspberry Pi 5 has hardware timestamping on its Ethernet NIC, which gives it a /dev/ptp0 PTP hardware clock (PHC). This is critical – without…

This excerpt is published under fair use for community discussion. Read the full article at Austin's Nerdy Things.

Anonymous · no account needed
Share 𝕏 Facebook Reddit LinkedIn Email

Discussion

0 comments

More from Austin's Nerdy Things