gpsd-users
[Top][All Lists]
Advanced

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

Re: GPS Mac OS challenges


From: Marc Rosen
Subject: Re: GPS Mac OS challenges
Date: Thu, 9 Dec 2021 18:16:38 -0600

Sorry for the repeat emails

One improvement - after rereading the instructions I realized that the magic numbers for user space gpsd are 2 and 3, I changed those in the ntpd.conf and the permission issue went away ( ntpshmmon)

I don’t have great visibility to the GPS sky right now - here’s the last debug:


Marcs-2020-MacBook-Pro-2:bin marc$ more ~/Downloads/out.txt 
++ id -u
+ '[' 0 '!=' 0 ']'
+ id
uid=0(root) gid=0(wheel) groups=0(wheel),1(daemon),2(kmem),3(sys),4(tty),5(operator),8(procview),9(procmod),12(everyone),20(staff),29(certusers),61(localaccounts),80(admin),33(_appstore),98(_lpadmin),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh),400(com.apple.access_remote_ae)
+ uname -a
Darwin Marcs-2020-MacBook-Pro-2.local 21.0.1 Darwin Kernel Version 21.0.1: Tue Sep 14 20:56:24 PDT 2021; root:xnu-8019.30.61~4/RELEASE_ARM64_T6000 arm64
+ cat '/etc/*release'
cat: /etc/*release: No such file or directory
+ command -v gpsd
/opt/homebrew/sbin/gpsd
+ gpsd -V
gpsd: 3.23.1 (revision 3.23.1)
+ gpsd -h
+ grep '^#.*enabled'
# Control socket for hotplug notifications enabled.
# Netfeed enabled.
# NTRIP enabled.
# Shared memory export enabled.
# Socket export enabled.
+ command -v sockstat
+ command -v lsof
/usr/sbin/lsof
+ lsof -iTCP:2947 -s TCP:LISTEN
COMMAND PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
gpsd    946 marc    4u  IPv4 0x298d4573858fc2af      0t0  TCP localhost:gpsd (LISTEN)
gpsd    946 marc    5u  IPv6 0x298d45737befe9b7      0t0  TCP localhost:gpsd (LISTEN)
+ lsof -c gpsd
+ sed -nE '1p;/CHR|LISTEN/p'
COMMAND PID USER   FD   TYPE             DEVICE SIZE/OFF                NODE NAME
gpsd    946 marc    0u   CHR               16,0 0t451393                1217 /dev/ttys000
gpsd    946 marc    1u   CHR               16,0 0t451393                1217 /dev/ttys000
gpsd    946 marc    2u   CHR               16,0 0t451393                1217 /dev/ttys000
gpsd    946 marc    4u  IPv4 0x298d4573858fc2af      0t0                 TCP localhost:gpsd (LISTEN)
gpsd    946 marc    5u  IPv6 0x298d45737befe9b7      0t0                 TCP localhost:gpsd (LISTEN)
gpsd    946 marc    6u   CHR                9,3  0t97365                1203 /dev/cu.usbmodem1203
+ ps ax
+ sed -nE '1p;/gpsd/p'
  PID   TT  STAT      TIME COMMAND
  946 s000  S+     0:00.34 gpsd -n /dev/cu.usbmodem1203 -ND4 -F /opt/homebrew/var/gpsd.sock
 1028 s002  S+     0:00.02 sudo ./gpsdebuginfo
 1029 s002  S+     0:00.00 /bin/sh ./gpsdebuginfo
 1043 s002  S+     0:00.00 sed -nE 1p;/gpsd/p
+ command -v gpspipe
/opt/homebrew/bin/gpspipe
+ gpspipe -V
gpspipe: 3.23.1 (revision 3.23.1)
+ gpspipe -w -n 2 -x 20
{"class":"VERSION","release":"3.23.1","rev":"3.23.1","proto_major":3,"proto_minor":14}
{"class":"DEVICES","devices":[{"class":"DEVICE","path":"/dev/cu.usbmodem1203","driver":"NMEA0183","activated":"2021-12-10T00:11:01.018Z","flags":1,"native":0,"bps":38400,"parity":"N","stopbits":6,"cycle":1.00}]}
+ command -v ipcs
/usr/bin/ipcs
+ ipcs -m
+ sed -nE '/key/p;/KEY/p;/0x4e5450/p'
T     ID     KEY        MODE       OWNER    GROUP
m  65536 0x4e545032 --rw-rw-rw-     marc    staff
m  65537 0x4e545033 --rw-rw-rw-     marc    staff
m  65538 0x4e545034 --rw-rw-rw-     marc    staff
m  65539 0x4e545035 --rw-rw-rw-     marc    staff
m  65540 0x4e545036 --rw-rw-rw-     marc    staff
m  65541 0x4e545037 --rw-rw-rw-     marc    staff
+ command -v ntpshmmon
/opt/homebrew/bin/ntpshmmon
+ ntpshmmon -V
ntpshmmon: version 3.23.1 (revision 3.23.1)
+ ntpshmmon -n 6 -t 10
ntpshmmon: version 3.23.1
#      Name  Seen@                 Clock                 Real                 L Prc


On Dec 6, 2021, at 1:54 PM, Gary E. Miller <gem@rellim.com> wrote:

Yo Marc!

On Mon, 6 Dec 2021 10:42:05 -0600
Marc Rosen <marc.rosen@mac.com> wrote:

I'm most of the way done connecting my GPS to my MBP OS X Monterrey ,
that's to persistence and some help from Gary Miller

Should be nothing ahrd about that.

In the end I'm using homebrew (package) versions of ntp and gpsd.

What versions?


The
GPS is from an Icom IC-705 radio.


That's a new one.  I assume it sends standard NMEA?

The main difficulties were setting
the correct serial/usb device for the GPS to connect to ,

I'm not sure that is hard.  Just put the device path on the
gpsd command line.

increasing
the shared memory,

I'm not sure why you would need that.

and dealing with Mac env restrictions

I'm not sure why you would need that.

I still can't get ntpshmemmon to run properly- permission denied to
connect to SHM1&2 Everything is running from sudo/root

I've never had that problem on a mac.  Maybe some new Apple specific
hardening.

Any solutions?

Can it work?  Yes.  Do I understand your problem?  No.

cgps shows great data

Good.

ntpq -p shows the GPS data updating ( no PPS)

You are skipping a lot of dettails.  Please rung gpsdebuginfo and
send the output here.

In general, if ntpshmmon is not working, you can stop right that and
not look at anything else NTP.

One question is how to test it properly

Run gpsdebuginfo, and send the result herre.  Also try the
Toubleshooting Guide:

   https://gpsd.io/troubleshooting.html

I want the Mac system clock to rely on the gps

No, you want it to rely on ntpd, which may rely on GPS for part if
its data.

I tried setting the date time system prefs to use 127.0.0.1 ,

No, you want ntpd to control your system time, not macOS.

the
turning off WiFi and resetting the clock manually then restore to
automatically w 127.0.0.1 - not sure this is working right

If that is what you are doing, that is wrong.

Any suggestions for testing?

See above.

Does anyone know if PPS is supported by the Radio?

Probably not, but the output of "-ND 4" that I already asked for
would tell you.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
gem@rellim.com  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]