From Milliseconds to 26 Nanoseconds: How a $20 eBay SFP Module Beat My Entire NTP Setup
69 points by varesa
69 points by varesa
The ultimate of course is building your own atomic clock using the CSAC (chip-scale atomic clock) as John Sloan did:
https://coverclock.blogspot.com/2017/05/my-stratum-0-atomic-clock_9.html
How a <s>$20</s> $300–500 eBay SFP Module Beat My Entire NTP Setup
ftfy, since the author admits that they're unobtanium now.
Still, extreme dedication to the bit, as ever.
Awesome work. As a note to the ending, maybe avoid White Rabbit, at least for keeping sanity in a homelab (if you need what it's offering for an instrument or facility, your sanity might be worth it...). It has wild gaps in documentation and the vendor we're using has poorly-defined behavior (ever seen a network device hard jam and require a power cycle FROM RECEIVING ICMP ECHO at like 0.1hz??? If you get a White Rabbit LEN module from Safran, you might).
ever seen a network device hard jam and require a power cycle FROM RECEIVING ICMP ECHO at like 0.1hz???
I don't know what exactly triggers it, but I know that the Dante network card in some Yamaha audio mixers requires a power cycle if the ethernet port accidentally goes on the wrong VLAN for a moment and receives something it doesn't like.
I think that has happened a few times as part of trying to debug why Dante devices on the network don't show up on the mixer and somebody tried to plug it into different switch ports. The first two times I spent significant time trying to debug what's set up incorrectly when nothing seems to show up. Now I know to start with a power cycle...
I think at some previous work, the Marvell switches in the hardware were as troublesome as that. They would die when receiving very typicall windows LAN traffic and require a power cycle. Of course, they were programmable switches. I think that luckily, the reset pin was reachable from the main CPU. It really shows that when designing hardware, you really must wire reset pins to your MCU, especially for "smarter" hardware.
you really must wire reset pins to your MCU
I'd wish... I just recently modded a I2S to SPDIF hat for a Raspberry Pi. The manufacturer had just added a RC delay to the reset pin, fed by the power line. Unfortunately more recent Raspberry Pis have changed the PMIC to one that powers up some of the rails more slowly which means that the I2S/SPDIF chip receives power before some other line (which happens to control SW/HW mode switching on boot) is powered.
This meant there was like a 80% chance it would boot into the wrong mode where it does not show up on the bus. Probably temperature dependent as well, since that would slightly affect the RC time constant. Reset was not wired to any controllable IO
This is dangerous. I just built a GPS disciplined micro controller based ntp server, and I've been thinking about going down the hardware timestamp rabbit hole. I'm so close to wasting another weekend messing with it, and this article might push me over the edge...
I can highly recommend scottstuff.net and his nerdery in NTP/PTP!
I didn't go any farther than using a Raspberry Pi 4B with a Adafruit Ultimate GPS HAT, works great for my homelab. Sure, PTP would have been nice but getting precision in the low microseconds is still amazing IMHO!
I got some inspiration from this FreeBSD based project even though I used Alpine Linux in diskless mode instead, due to reasons.