stratum one on pi 4?

Paul Theodoropoulos paul at anastrophe.com
Sat Sep 21 00:49:44 UTC 2019


On 9/20/2019 12:41 PM, Gary E. Miller via users wrote:
> On Fri, 20 Sep 2019 09:54:17 -0700
> Paul Theodoropoulos via users <users at ntpsec.org> wrote:
>> Has anyone on the list successfully gotten a stratum one working
>> using__ a Raspberry Pi 4?__ I'm unable to get PPS from an M8T board
>> I've been using on a Pi 3 for a while. I think it has something to do
>> with the different UART hardware on the pi 4 - there's five uarts to
>> the Pi 3's one, and I've had no luck sorting it out. It's probably
>> something very simple that's eluding me...
> Yours is the first report.  I have been holding off on the Pi 4 until
> they fix their layout bugs.
>
> gpsd does nothing special with the Pi, Pi2 and Pi3 uart.  You should be
> able to use minicom on the serial port and see the serial GNSS data.
>
> Maybe try ubxtool in direct mode?

So far, I've discovered that one does _not_ want to declare the other uart 
overlays in /boot/config.txt - they just get taken over by our beloved 
systemd as serial devices. So all that's needed in config.txt is exactly 
what's needed on the rpi 3 -

enable_uart=1
init_uart_baud=115200
dtoverlay=pps-gpio,gpiopin=4
dtoverlay=pi3-disable-bt
dtoverlay=pi3-miniuart-bt

But, still no PPS - at least not that ntpsec can see.  Various diagnostic 
output:

    root@ C-NTPsec: # dmesg|grep pps
    [  +0.145800] pps_core: LinuxPPS API ver. 1 registered
    [  +0.000032] pps_core: Software ver. 5.3.6 - Copyright 2005-2007
    Rodolfo Giometti <giometti at linux.it>
    [  +0.005914] pps pps0: new PPS source pps at 4.-1
    [  +0.000092] pps pps0: Registered IRQ 58 as PPS source

    root@ C-NTPsec: ~ # ppstest /dev/pps0
    trying PPS source "/dev/pps0"
    found PPS source "/dev/pps0"
    ok, found 1 source(s), now start fetching data...
    source 0 - assert 1569025998.999693563, sequence: 70 - clear
    0.000000000, sequence: 0
    source 0 - assert 1569025999.999693151, sequence: 71 - clear
    0.000000000, sequence: 0
    source 0 - assert 1569026000.999692590, sequence: 72 - clear
    0.000000000, sequence: 0

    root@ C-NTPsec: ~ # ntpshmmon
    ntpshmmon: version 3.19-dev
    #      Name Seen@                Clock Real                 L Prc
    sample NTP0 1569025606.275613172 1569025606.115286955
    1569025606.000000000 0 -20
    sample NTP0 1569025607.057766330 1569025607.057538039
    1569025606.999630212 0 -20
    sample NTP0 1569025607.063202683 1569025607.063127073
    1569025607.000000000 0 -20
    sample NTP0 1569025608.057700362 1569025608.057144023
    1569025607.999630689 0 -20
    sample NTP0 1569025608.063132307 1569025608.062734594
    1569025608.000000000 0 -20


root@ C-NTPsec: # ntpq -p
      remote                                   refid      st t when poll 
reach   delay   offset   jitter
=======================================================================================================
  SHM(1)                                  .PPS.            0 l -    2    
0   0.0000   0.0000   0.0019
  SHM(0)                                  .GPS.            0 l 30   64   
37   0.0000 -56.6929   4.1086
[...]

root@ C-NTPsec: ~ # cat /etc/ntp.conf
refclock shm unit 1 refid PPS minpoll 1 maxpoll 1 flag4 1 prefer
refclock shm unit 0 refid GPS flag4 1 noselect
[...]

root@ C-NTPsec: # cat /etc/default/gpsd
START_DAEMON="true"
DEVICES="/dev/gpsd0"
GPSD_OPTIONS="-r -P /var/run/gpsd.pid"

root@ C-NTPsec: ~ # ps -ecf|grep [g]psd
nobody    1039     1 TS   29 17:37 ?        00:00:01 /usr/local/sbin/gpsd 
-r -P /var/run/gpsd.pid /dev/gpsd0
root@ C-NTPsec: ~ # ps -ecf|grep [n]tpd
ntp       1048     1 TS   19 17:37 ?        00:00:00 /usr/local/sbin/ntpd 
-p /var/run/ntpd.pid -g -u ntp:ntp

and my build details:

    root@ C-NTPsec: /etc/default # ntpd -V
    ntpd ntpsec-1.1.7+ 2019-09-10T03:11:16Z (git rev 248475392)
    root@ C-NTPsec: /etc/default # ntpd -h
    [...]
    This version was compiled with the following clock drivers:
            LOCAL  SPECTRACOM    TRUETIME     GENERIC     ARBITER
            MODEM        NMEA         PPS       HPGPS         SHM
          TRIMBLE      ONCORE         JJY       ZYFER        GPSD

    root@ C-NTPsec: /etc/default # gpsd -V
    gpsd: 3.19-dev (revision dev-3.19a-770-gde7a1c4c)
    root@ C-NTPsec: /etc/default # gpsd -h
    [...]
    The following driver types are compiled into this gpsd instance:
    NMEA0183
    Furuno Electric GH-79L4
    MTK-3301
    u-blox
    PPS
    # n: mode switch, b: speed switch, c: rate switch, *: non-NMEA packet
    type.
    # Socket export enabled.
    # Shared memory export enabled.
    # Time service features enabled.
    # PPS enabled.


I have that nagging feeling that I'm missing some trivial little thing (as 
usual).

-- 
Paul Theodoropoulos
www.anastrophe.com



More information about the users mailing list