Comment 6 for bug 805661

Revision history for this message
Hal Engel (hvengel-h) wrote :

I made some more udev changes and I got the Oncore reference clock almost working. Here is what my PPS udev rules look like:

KERNEL=="ttyS1", RUN+="/bin/setserial -v /dev/%k low_latency", OWNER="ntp", GROUP="ntp", MODE="0660", SYMLINK+="oncore.serial.0"

KERNEL=="oncore.serial.0"OWNER="ntp", GROUP="ntp", MODE="0660"

KERNEL=="pps0", OWNER="ntp", GROUP="ntp", MODE="0660", SYMLINK+="oncore.pps.0"

KERNEL=="oncore.pps.0", OWNER="ntp", GROUP="ntp", OPTIONS+="last_rule"

-----------------------------------
NTP now starts and initializes the Oncore but I have not been able to get it to sync.

I am seeing the following in the clock stats file:

55749 72470.280 127.127.30.0 ONCORE[0]: ONCORE DRIVER -- CONFIGURING
55749 72470.280 127.127.30.0 ONCORE[0]: state = ONCORE_NO_IDEA
55749 72470.281 127.127.30.0 ONCORE[0]: Input mode = 1
55749 72470.281 127.127.30.0 ONCORE[0]: Initializing timing to Assert.
55749 72470.281 127.127.30.0 ONCORE[0]: SHMEM (size = 3628) is CONFIGURED and available as /var/log/ntp/oncore.0
55749 72470.281 127.127.30.0 ONCORE[0]: state = ONCORE_CHECK_ID
55749 72471.276 127.127.30.0 ONCORE[0]: Oncore: Resend @@Cj
55749 72471.738 127.127.30.0 ONCORE[0]: @@Cj
55749 72471.738 127.127.30.0 ONCORE[0]: COPYRIGHT 1991-1997 MOTOROLA INC.
55749 72471.738 127.127.30.0 ONCORE[0]: SFTW P/N # 98-P36848P
55749 72471.738 127.127.30.0 ONCORE[0]: SOFTWARE VER # 2
55749 72471.738 127.127.30.0 ONCORE[0]: SOFTWARE REV # 2
55749 72471.738 127.127.30.0 ONCORE[0]: SOFTWARE DATE APR 24 1998
55749 72471.738 127.127.30.0 ONCORE[0]: MODEL # R5122U1152
55749 72471.738 127.127.30.0 ONCORE[0]: HWDR P/N # 5
55749 72471.738 127.127.30.0 ONCORE[0]: SERIAL # R05UD5
55749 72471.738 127.127.30.0 ONCORE[0]: MANUFACTUR DATE 9E14
55749 72471.738 127.127.30.0 ONCORE[0]:
55749 72471.738 127.127.30.0 ONCORE[0]: This looks like an Oncore UT with version 2.2 firmware.
55749 72471.738 127.127.30.0 ONCORE[0]: Channels = 8, TRAIM = ON
55749 72471.738 127.127.30.0 ONCORE[0]: state = ONCORE_CHECK_CHAN
55749 72476.278 127.127.30.0 ONCORE[0]: Input says chan = -1
55749 72476.278 127.127.30.0 ONCORE[0]: Model # says chan = 8
55749 72476.278 127.127.30.0 ONCORE[0]: Testing says chan = 8
55749 72476.278 127.127.30.0 ONCORE[0]: Using chan = 8
55749 72476.278 127.127.30.0 ONCORE[0]: state = ONCORE_HAVE_CHAN
55749 72477.728 127.127.30.0 ONCORE[0]: state = ONCORE_TEST_SENT
55749 72484.988 127.127.30.0 ONCORE[0]: GPS antenna: OK
55749 72484.988 127.127.30.0 ONCORE[0]: state = ONCORE_INIT
55749 72487.276 127.127.30.0 ONCORE[0]: Oncore: Resend @@Cj
55749 72488.028 127.127.30.0 ONCORE[0]: Setting Posn from input data
55749 72488.028 127.127.30.0 ONCORE[0]: state = ONCORE_ALMANAC
55749 72496.148 127.127.30.0 ONCORE[0]: Posn:
55749 72496.148 127.127.30.0 ONCORE[0]: Lat = N 38.0000817deg, Long = W 122.0366131deg, Alt = -11.40m (-37.40ft) GPS
55749 72496.148 127.127.30.0 ONCORE[0]: Lat = N 38deg 0.0049m, Long = W 122deg 2.19678m, Alt = -11.40m ( -37.40ft) GPS
55749 72496.148 127.127.30.0 ONCORE[0]: Lat = N 38deg 0m 0.29s, Long = W 122deg 2m 11.81s, Alt = -11.40m ( -37.40ft) GPS
55749 72496.198 127.127.30.0 ONCORE[0]: Cable delay is set to 50 ns
55749 72496.218 127.127.30.0 ONCORE[0]: Satellite mask angle set to 10 degrees
55749 72498.628 127.127.30.0 ONCORE[0]: Have now loaded an ALMANAC
55749 72498.628 127.127.30.0 ONCORE[0]: state = ONCORE_RUN
55749 72498.628 127.127.30.0 ONCORE[0]: SSstate = ONCORE_SS_DONE
55749 72498.698 127.127.30.0 ONCORE[0]: ONCORE: Detected TRAIM, TRAIM = ON
55749 72498.698 127.127.30.0 ONCORE[0]: Input says TRAIM = -1
55749 72498.698 127.127.30.0 ONCORE[0]: Model # says TRAIM = 1
55749 72498.698 127.127.30.0 ONCORE[0]: Testing says TRAIM = 1
55749 72498.698 127.127.30.0 ONCORE[0]: Using TRAIM = 1
55749 72499.728 127.127.30.0 ONCORE[0]: PPS Offset is set to 0 ns
55749 72499.748 127.127.30.0 ONCORE[0]: Satellite mask angle is 10 degrees
55749 72512.428 127.127.30.0 ONCORE[0]: ONCORE: Error doing time_pps_setparams
55749 72512.428 127.127.30.0 3519058078.133143046 2011 188 20 8 32 58 rstat 08 dop 0.0 nsat 9,3 traim 1,0,1 sigma 77 neg-sawtooth 43 sat 80880000
55749 72513.438 127.127.30.0 ONCORE[0]: ONCORE: Error doing time_pps_setparams
55749 72513.438 127.127.30.0 3519058113.134480363 2011 188 20 8 33 33 rstat 08 dop 0.0 nsat 9,4 traim 1,0,0 sigma 63 neg-sawtooth -1 sat 85880000

_____________________________

The issue is the "Error doing time_pps_setparams" line. I have never seen this before but looking at the source code it is coming from the Oncore driver and it appears to be a failed system call.

The ntp I am running is hand built 4.2.6p3 and it was configured with --enable-all-clocks which will enable all ntp clock drivers not just the Oncore driver and --enable-clockctl.

There are still issues with ntp building in microsecond mode and this needs to be fixed. I also notice that when I run ntptime that the status only shows 0x1 (PLL) when I would expect to see things like NANO (or MICRO), PLL (or FLL), SYNC (or UNSYNC), HARDPPS and other flags. This like the lack of nanosecond support indicates a kernel or glibc header file issue of some sort as it appears that the defines for these other flags are missing.

I also tried running ntp with the kernel consumer and it fails with this in the clockstats file:

55749 69469.324 127.127.30.0 ONCORE[0]: ONCORE DRIVER -- CONFIGURING
55749 69469.324 127.127.30.0 ONCORE[0]: state = ONCORE_NO_IDEA
55749 69469.324 127.127.30.0 ONCORE[0]: Input mode = 1
55749 69469.324 127.127.30.0 ONCORE[0]: Initializing timing to Assert.
55749 69469.325 127.127.30.0 ONCORE[0]: HARDPPS Set.
55749 69469.325 127.127.30.0 ONCORE[0]: time_pps_kcbind failed: Operation not supported
55749 69469.325 127.127.30.0 ONCORE[0]: HARDPPS failed, abort...

This indicates either that the kernel consumer was not enabled when the kernel was built or an issue with the kernel headers. The kernel consumer is new in 2.6.38. Looking at /usr/src/linux-headers-2.6.38-8-generic/.config it appears that it is likely that the kernel consumer was not enabled.