开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Re: PiGate v2.2 and GPS


Mark Griffith
 

Asa,

The GPS System was designed to be as flexible as possible, but nothing in software ever works that way all the time.? :)

There is a shell script in the /root directory that runs each time the PiGate is booted called "get_gps_data.sh".? If you are familiar with shell scripts, you can see what is happening.? The first thing is does is look at the file "/etc/default/gpsd".? In there is the name of the default GPS device, which by default is "/dev/ttyUSB0".? To fix your situation, edit that file with the location of your GPS device, /dev/ttyACM0" and reboot.

The PiGate does not start the gpsd service.? The only time a GPS location is needed is when it first boots and is never needed again after that.? All I do is look at the data stream, which you have noticed, and extract the GPS coordinates and the time.? The coordinates are updated in the PiGate config file and the PiOS system time is set.? The idea was perhaps it has been years since a PiGate was last booted up at a disaster location, and the location and the date/time are very old, so it will try to fix that IF a GPS device is plugged in.? If not, the system time and the GPS coordinates would have to be updated manually.? I've provided the ability in the management software to do this, but plugging in a little GPS device sure is easier!? :)

If you want to get a blow by blow description of what happens when the get_gps_data.sh script is run, look at the file /var/tmp/gps.log" which is saved after a reboot.

I suppose I should mention the default/gpsd file and the log file in the docs so people in the future don't have the same problem as you did.? Thanks for bringing this up.? Over the years, I've only ever gotten a couple queries on this.

Please let me know if I can help any further.

Mark
KD0QYN


On Monday, July 10, 2023 at 10:53:02 PM CDT, TSC-60 Man Washington via groups.io <asajay@...> wrote:


I’m running a fresh install of PiGate v2.2 on a Pi 3 model B v1.2.

I have attached a G-Mouse GPS via USB.

The messages log shows the device attaching to ttyACM0.
cat /dev/ttyACM0 shows NMEA data streams and what looks like a position fix (though maybe not).

The PiGate admin “Set PiGate Location” does not show coordinates even after refreshing. ?V2.1 docs indicate PiGate is looking for GPS on ttyUSB0, which this isn’t on. ?I also note the gpsd service is not running and it has been masked. ?Unmasking it still does not allow it to start.

Now I’m at a standstill on using GPS until I understand how it’s been set up to work.
Why is the gpsd service masked?
Why won’t it start on detection of the USB GPS device? ?(Yes, it was plugged in prior to powering the Pi).
How do I tell PiGate to look at a different port for GPS detection?

Thank you,
Asa ?Jay
W7TSC

Join [email protected] to automatically receive all group messages.