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: Fri, 10 Dec 2021 14:11:25 -1000

ok - now things are moving

I think some of my issues in the last couple days were that I shifted positions by 8000km and did not let the GPS get a fix - which took an awful long time , over an hour


now - GPS is tracking 7 SATs, I’ve started gpsd and ntpd using root  ( sudo su -)

started gpsd this time just as:
 gpsd -n /dev/cu.usbmodem1203 -ND4 


The reason I had the -F before was that I misunderstood or merged 2 examples I saw
The reason I have the hardcoded port - I don’t know how to make/use a generic gpsN port
for the moment it just means I have to be aware of which physical USB-C port I plug the radio into



  0:00.13 gpsd -n /dev/cu.usbmodem1203 -ND4 -F /opt/homebrew/var/gpsd.sock

Odd to run gpsd with both a hard coded serial port, and -F.  But nothing
wrong with it if you also intend to hotplug other GPS receivers.



*** after all this I see the following 
Marcs-2020-MacBook-Pro-2:bin marc$ ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 us.pool.ntp.org .POOL.          16 p    -   64    0    0.000   +0.000   0.001
*SHM(0)          .GPS.            0 l   19   64  377    0.000   +0.701   9.466
 SHM(1)          .PPS.            0 l    -   64    0    0.000   +0.000   0.000


*** when I run ntpshmmon ( as root), I get:

Marcs-2020-MacBook-Pro-2:~ root# /opt/homebrew/bin/ntpshmmon
WARNING: could not open SHM(0): Permission denied(13)
WARNING: could not open SHM(1): Permission denied(13)
ntpshmmon: version 3.23.1
#      Name  Seen@                 Clock                 Real                 L Prc



****************************************
output from gpsdebuginfo
****************************************
Marcs-2020-MacBook-Pro-2:~ root# /opt/homebrew/bin/gpsdebuginfo 
++ 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
+ 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    2687 nobody    3u  IPv4 0xcbd0cf81bd32e3ab      0t0  TCP localhost:gpsd (LISTEN)
gpsd    2687 nobody    4u  IPv6 0xcbd0cf81c1ff9b93      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    2687 nobody    0u   CHR               16,0 0t1711826                1217 /dev/ttys000
gpsd    2687 nobody    1u   CHR               16,0 0t1711826                1217 /dev/ttys000
gpsd    2687 nobody    2u   CHR               16,0 0t1711826                1217 /dev/ttys000
gpsd    2687 nobody    3u  IPv4 0xcbd0cf81bd32e3ab       0t0                 TCP localhost:gpsd (LISTEN)
gpsd    2687 nobody    4u  IPv6 0xcbd0cf81c1ff9b93       0t0                 TCP localhost:gpsd (LISTEN)
gpsd    2687 nobody    5u   CHR                9,1  0t405394                 695 /dev/cu.usbmodem1203
+ ps ax
+ sed -nE '1p;/gpsd/p'
  PID   TT  STAT      TIME COMMAND
 2687 s000  S<+    0:01.18 /opt/homebrew/sbin/gpsd -n /dev/cu.usbmodem1203 -ND4
 2750 s003  S+     0:00.01 /bin/sh /opt/homebrew/bin/gpsdebuginfo
 2761 s003  S+     0:00.00 sed -nE 1p;/gpsd/p
+ command -v gpspipe
+ command -v ipcs
/usr/bin/ipcs
+ ipcs -m
+ sed -nE '/key/p;/KEY/p;/0x4e5450/p'
T     ID     KEY        MODE       OWNER    GROUP
m  65536 0x4e545030 --rw-------     root    wheel
m  65537 0x4e545031 --rw-------     root    wheel
m  65538 0x4e545032 --rw-rw-rw-     root    wheel
m  65539 0x4e545033 --rw-rw-rw-     root    wheel
m  65540 0x4e545034 --rw-rw-rw-     root    wheel
m  65541 0x4e545035 --rw-rw-rw-     root    wheel
m  65542 0x4e545036 --rw-rw-rw-     root    wheel
m  65543 0x4e545037 --rw-rw-rw-     root    wheel
+ command -v ntpshmmon
+ ls -l '/dev/pps*' '/dev/tty[AU]*'
ls: /dev/pps*: No such file or directory
ls: /dev/tty[AU]*: No such file or directory
+ command -v lsusb
+ echo PYTHONPATH
PYTHONPATH
+ command -v gpscat
+ command -v python
/usr/bin/python
+ python -V
Python 2.7.16
+ python -c 'import gps;print(gps.__version__)'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named gps
+ command -v python3
/usr/bin/python3
+ python3 -V
Python 3.8.2
+ python3 -c 'import gps;print(gps.__version__)'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'gps'
+ command -v systemctl
+ command -v aa-status
+ command -v apparmor_status
+ set +x
Please send the entire, untouched output.



On Dec 10, 2021, at 10:46 AM, Marc Rosen <marc.rosen@mac.com> wrote:

The load is all that is needed if you do it right the first time

Otherwise unload and run load again after updating the plots text file

Marc

On Dec 10, 2021, at 9:08 AM, Gary E. Miller <gem@rellim.com> wrote:

Yo Marc!

On Fri, 10 Dec 2021 08:58:00 -1000
Marc Rosen <marc.rosen@mac.com> wrote:

( next looking for an open spot to get a GPS signal)


Persisting shared memory limits on OS X 12 Monterey

Nice work.  Even better if someone adds this to the INSTALL.adoc file in
the macOS section.

add a text file “plist" to /Library/LaunchDaemons  
the file name is immaterial - I found a useful file and edited it to
my needs the text file plist is very sensistive - beware of spaces in
value strings and misspellings


sudo launchctl load com.wsjtx.sysctl.plist

sudo launchctl unload com.wsjtx.sysctl.plist

WHy load and then unload?

the text of the file I used ultimately is:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist
version="1.0"> <dict>
  <key>Label</key>
  <string>com.wsjtx.sysctl</string>
  <key>Program</key>
  <string>/usr/sbin/sysctl</string>
  <key>ProgramArguments</key>
  <array>
      <string>/usr/sbin/sysctl</string>
      <string>kern.sysv.shmmax=52428800</string>
      <string>kern.sysv.shmall=25600</string>
  <string>kern.sysv.shmmni=128</string>
  <string>kern.sysv.shmseg=32</string>
  </array>
  <key>RunAtLoad</key>
  <true/>
</dict>
</plist>

Makes sense.  Sort of.  On Linux that would be one single line.

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]