Feature #8576

Want PPS support for usbser based drivers like usbsprl

Added by Jorge Schrauwen 4 months ago.

Status:NewStart date:2017-08-12
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:driver - device drivers
Target version:-
Difficulty:Medium Tags:needs-triage

Description

Some USB Serial adapters support a PPS over DCD (some also over CTS), it does not look like the usbser/usbsprl driver supports PPS.

This works fine on both FreeBSD (and linux) it would be nice if we also have this support, it will make running NTPd servers attached to GPS that come with a buildin USB-to-serial adaptor possible.

On FreeBSD this can even be controlled using sysctl:
hw.usb.ucom.pps_mode=2
  1. The hw.usb.ucom.pps_mode sysctl configures the PPS capture mode.
  2. The following capture modes are available:
  3. - 0 Capture disabled (default).
  4. - 1 Capture pulses on the CTS line.
  5. - 2 Capture pulses on the DCD line.

It is disabled by default because not all chipsets support it, and not all manufacturers enable it.
For example ublox 5 or newer GPS adaptors that use the usbsprl driver do expose PPS, and work fine on freebsd:

sjorge@hydrogen:~ % ntpq -pn
remote refid st t when poll reach delay offset jitter ==============================================================================
o127.127.20.0 .GPS. 0 l 13 16 377 0.000 0.351 0.475
+46.40.123.212 129.69.1.153 2 u 39 64 377 48.818 4.852 2.966
+78.41.115.242 131.188.3.223 2 u 4 64 377 35.094 7.671 6.421
+2001:67c:25dc:: 31.28.161.68 2 u 39 64 377 65.952 3.775 1.721
*193.225.126.78 121.131.112.137 2 u 59 64 377 36.037 4.518 3.476

I poked around a bit and it seems only the asy driver currently supports PPS.

Also available in: Atom