gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-users] 1PPS not working with RPi 3 B+ and Stretch


From: Chris Smith
Subject: Re: [gpsd-users] 1PPS not working with RPi 3 B+ and Stretch
Date: Sat, 21 Jul 2018 09:44:42 -0400

address@hidden:~/gpsd $ pwd <-where am I?
/home/pi/gpsd <-directory made from git clone of gpsd.git from nongnu.org
address@hidden:~/gpsd $ ./gpsd -V <- I want to run the gpsd version in my cwd
./gpsd: 3.18~dev (revision release-3.17-157-g5e95e79)
address@hidden:~/gpsd $ which gpsd <- where does the gpsd binary reside that the system sees in my PATH?
/usr/sbin/gpsd
address@hidden:~/gpsd $ gpsd -V <-What's that look like?
gpsd: 3.11 (revision 3.11-3)
address@hidden:~/gpsd $ ./gpsd -nND 4 /dev/ttyS0 |& fgrep -i SHM <-Running latest dev build, and we can be sure of that
gpsd:PROG: NTP: shmat(360453,0,0) succeeded, segment 2
gpsd:PROG: NTP: shmat(393222,0,0) succeeded, segment 3
gpsd:PROG: NTP: shmat(458760,0,0) succeeded, segment 4
gpsd:PROG: NTP: shmat(491529,0,0) succeeded, segment 5
gpsd:PROG: NTP: shmat(524298,0,0) succeeded, segment 6
gpsd:PROG: NTP: shmat(557067,0,0) succeeded, segment 7
gpsd:INFO: PPS:/dev/ttyS0 ntpshm_link_activate: 1
^C
address@hidden:~/gpsd $ gpsd -nND 4 /dev/ttyS0 |& fgrep -i SHM <- running official Raspbian build
gpsd:PROG: NTPD shmat(360453,0,0) succeeded, segment 2
gpsd:PROG: NTPD shmat(393222,0,0) succeeded, segment 3
gpsd:PROG: shmat() succeeded, segment 425991
gpsd:INFO: NTPD ntpshm_link_activate: 1
^C
address@hidden:~/gpsd $ gpsd -nND 4 /dev/ttyS0 |& fgrep -i SHM <- just double checking the output...
gpsd:PROG: NTPD shmat(360453,0,0) succeeded, segment 2
gpsd:PROG: NTPD shmat(393222,0,0) succeeded, segment 3
gpsd:PROG: shmat() succeeded, segment 425991
(::probably missing  ntpshm_link_activate: 1 on this go because I quickly restarted the program::)
^C
address@hidden:~/gpsd $ ps -ef | grep gps <- making sure I haven't left anything running...
pi       13329  7982  0 13:31 pts/1    00:00:00 grep --color=auto gps
address@hidden:~/gpsd $ apt purge gpsd <- ok, let's get rid of the apt installed gpsd incase there's linked libraries somewhere or something...
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root? <- whoops
address@hidden:~/gpsd $ sudo apt purge gpsd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  gpsd*
0 upgraded, 0 newly installed, 1 to remove and 337 not upgraded.
After this operation, 126 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 121128 files and directories currently installed.)
Removing gpsd (3.11-3) ... <- there we go
Purging configuration files for gpsd (3.11-3) ...
Processing triggers for man-db (2.7.0.2-5) ...
address@hidden:~/gpsd $ pwd <- confirm where I am
/home/pi/gpsd
address@hidden:~/gpsd $ ./gpsd -V <-confim the binary in that file is the same as it was before the apt purge
./gpsd: 3.18~dev (revision release-3.17-157-g5e95e79)
address@hidden:~/gpsd $ gpsd -V <- double check there is no gpsd binary in /usr/sbin/gpsd
-bash: /usr/sbin/gpsd: No such file or directory
address@hidden:~/gpsd $ which gpsd <- does not return anything indicating that there is a gpsd binary in my PATH
address@hidden:~/gpsd $ ./gpsd -nND 4 /dev/ttyS0 |& fgrep -i SHM <- let's start up 3.18~dev again, ensuring that the SHM output is the same before the apt purge...
gpsd:PROG: NTP: shmat(360453,0,0) succeeded, segment 2
gpsd:PROG: NTP: shmat(393222,0,0) succeeded, segment 3
gpsd:PROG: NTP: shmat(458760,0,0) succeeded, segment 4
gpsd:PROG: NTP: shmat(491529,0,0) succeeded, segment 5
gpsd:PROG: NTP: shmat(524298,0,0) succeeded, segment 6
gpsd:PROG: NTP: shmat(557067,0,0) succeeded, segment 7
gpsd:INFO: PPS:/dev/ttyS0 ntpshm_link_activate: 1
^C

Also,

address@hidden:~/gpsd $ mount | grep shm
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)



Chris


On Fri, Jul 20, 2018 at 10:45 PM, Gary E. Miller <address@hidden> wrote:
Yo Chris!

> Lets check that your SHM works:
>
> # gpsd -nND 4 /dev/ttyS0 |& fgrep SHM
> gpsd:PROG: shmget(0x47505344, 9008, 0666) for SHM export succeeded
> gpsd:PROG: shmat() for SHM export succeeded, segment 262152

A better test for SHM:

 # gpsd -nND 4 /dev/ttyS0 |& fgrep -i SHM
gpsd:PROG: NTP: shmat(0,0,0) succeeded, segment 0
gpsd:PROG: NTP: shmat(32769,0,0) succeeded, segment 1
gpsd:PROG: NTP: shmat(65538,0,0) succeeded, segment 2
gpsd:PROG: NTP: shmat(98307,0,0) succeeded, segment 3
gpsd:PROG: NTP: shmat(131076,0,0) succeeded, segment 4
gpsd:PROG: NTP: shmat(163845,0,0) succeeded, segment 5
gpsd:PROG: NTP: shmat(196614,0,0) succeeded, segment 6
gpsd:PROG: NTP: shmat(229383,0,0) succeeded, segment 7
gpsd:PROG: shmget(0x47505344, 9008, 0666) for SHM export succeeded
gpsd:PROG: shmat() for SHM export succeeded, segment 262152
gpsd:INFO: PPS:/dev/ttyS0 ntpshm_link_activate: 1




RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin


reply via email to

[Prev in Thread] Current Thread [Next in Thread]