macOS - BYO-NTP/recipes GitHub Wiki
date | server | os | gnss | daemon | 🎯 | 🗣️ |
---|---|---|---|---|---|---|
2025-07 | M3 MacBook Air |
macOS 15 |
NEO-7M LEA-M8T |
chrony NTPsec |
1.5 ms 8.0 ms |
discuss |
- macOS has no official PPS support, so 3e-3 is as good as we can get with a refclock. I tested mac-pps and it improves accuracy to within 3e-4.
- there's no udev or devfs equivalent on macOS, so ntp drivers such as NMEA and GPSD-NG that have hard coded paths to /dev/gps0 don't work.
-
NTPsec has improved that by adding a
path
option, so it has more refclock options available. I can think of no reason to prefer the legacy ntp over NTPsec. - Chrony accuracy is much better than ntp and NTPsec. Chrony has some great knobs to twiddle (poll, minsamples) that can smooth out the USB-induced latency.
If it doesn't already have a USB port, wire the GNSS to a USB to serial TTL adapter. Connect the assembly to a Windows computer with u-blox u-center installed. I run Windows under VMware Fusion and it works well. Configure the GNSS per the recommendations on the gnss page.
export NTP_REFCLOCKS=$(cat <<EO_NTPSEC_NMEA
refclock SHM 0 refid NMEA precision 0.02 poll 2 offset 0.06 prefer trust
EO_NTPSEC_NMEA
)
curl -sS https://byo-ntp.github.io/tools/chrony/install.sh | sudo -E sh
NTPsec, using the NMEA driver:
export NTP_REFCLOCKS=$(cat <<EO_NTPSEC_NMEA
refclock nmea path /dev/cu.usbmodem1101 minpoll 3 maxpoll 4 time2 0.06 baud 115200 prefer
EO_NTPSEC_NMEA
)
curl -sS https://byo-ntp.github.io/tools/ntpsec/install.sh | sudo -E sh
NTPsec, using gpsd and the SHM driver:
export NTP_REFCLOCKS=$(cat <<EO_NTPSEC_SHM
refclock shm unit 0 refid NMEA minpoll 3 maxpoll 4 time1 0.06
EO_NTPSEC_SHM
)
curl -sS https://byo-ntp.github.io/tools/ntpsec/install.sh | sudo -E sh
NTPsec, using gpsd and the gpsd JSON driver:
export NTP_REFCLOCKS=$(cat <<EO_NTPSEC_JSON
refclock gpsd path /dev/cu.usbmodem1101 refid NMEA minpoll 3 maxpoll 4 time2 0.06 prefer
EO_NTPSEC_JSON
)
curl -sS https://byo-ntp.github.io/tools/ntpsec/install.sh | sudo -E sh
ntp, using gpsd via the SHM driver.
export NTP_REFCLOCKS=$(cat <<EO_NTP
server 127.127.28.2 minpoll 3 maxpoll 4 prefer
fudge 127.127.28.2 refid NMEA time1 0.06 minjitter 0.03
EO_NTP
)
curl -sS https://byo-ntp.github.io/tools/ntp/install.sh | sudo -E sh
- watch the status in near real time:
- sudo port install watch
- printf '\e[8;9;80t'; watch -n2 chronyc sources
- printf '\e[8;9;80t'; watch -n2 ntpq -c peer
- Measure the offset
- Gather statistics with telegraf + influxdb + grafana or similar.
- mac-pps, issue #1, results
- Jeff Geerling, Using GPS...on a Mac
Chrony
NTPsec, NMEA
NTPsec, GPSD