|
From: | Chris Smith |
Subject: | Re: [gpsd-users] 1PPS not working with RPi 3 B+ and Stretch |
Date: | Sat, 21 Jul 2018 10:19:45 -0400 |
address@hidden:~/gpsd $ pwd <-where am I?/home/pi/gpsd <-directory made from git clone of gpsd.git from nongnu.orgaddress@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/gpsdaddress@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 thatgpsd:PROG: NTP: shmat(360453,0,0) succeeded, segment 2gpsd:PROG: NTP: shmat(393222,0,0) succeeded, segment 3gpsd:PROG: NTP: shmat(458760,0,0) succeeded, segment 4gpsd:PROG: NTP: shmat(491529,0,0) succeeded, segment 5gpsd:PROG: NTP: shmat(524298,0,0) succeeded, segment 6gpsd:PROG: NTP: shmat(557067,0,0) succeeded, segment 7gpsd:INFO: PPS:/dev/ttyS0 ntpshm_link_activate: 1^Caddress@hidden:~/gpsd $ gpsd -nND 4 /dev/ttyS0 |& fgrep -i SHM <- running official Raspbian buildgpsd:PROG: NTPD shmat(360453,0,0) succeeded, segment 2gpsd:PROG: NTPD shmat(393222,0,0) succeeded, segment 3gpsd:PROG: shmat() succeeded, segment 425991gpsd:INFO: NTPD ntpshm_link_activate: 1^Caddress@hidden:~/gpsd $ gpsd -nND 4 /dev/ttyS0 |& fgrep -i SHM <- just double checking the output...gpsd:PROG: NTPD shmat(360453,0,0) succeeded, segment 2gpsd:PROG: NTPD shmat(393222,0,0) succeeded, segment 3gpsd:PROG: shmat() succeeded, segment 425991(::probably missing ntpshm_link_activate: 1 on this go because I quickly restarted the program::)^Caddress@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 gpsaddress@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? <- whoopsaddress@hidden:~/gpsd $ sudo apt purge gpsdReading package lists... DoneBuilding dependency treeReading state information... DoneThe 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 goPurging 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/gpsdaddress@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 directoryaddress@hidden:~/gpsd $ which gpsd <- does not return anything indicating that there is a gpsd binary in my PATHaddress@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 2gpsd:PROG: NTP: shmat(393222,0,0) succeeded, segment 3gpsd:PROG: NTP: shmat(458760,0,0) succeeded, segment 4gpsd:PROG: NTP: shmat(491529,0,0) succeeded, segment 5gpsd:PROG: NTP: shmat(524298,0,0) succeeded, segment 6gpsd:PROG: NTP: shmat(557067,0,0) succeeded, segment 7gpsd:INFO: PPS:/dev/ttyS0 ntpshm_link_activate: 1^CAlso,address@hidden:~/gpsd $ mount | grep shmtmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)ChrisOn 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
[Prev in Thread] | Current Thread | [Next in Thread] |