MobileGPS support...

General support for the Pi-Star System
G8OGJ
Posts: 62
Joined: Mon May 06, 2019 8:13 pm
Location: Matlock
Contact:

MobileGPS support...

Post by G8OGJ »

I'm running 4.1.2 on my mobile hotspot and I have hooked up a USB GPS receiver and enabled the feature. The GPS receiver appears as /dev/ttyUSB0 and so I have set that in the config along with 4800bps.

I know that this GPS receiver works because I have tried it previously using OpenCPN and I am sure that it was dishing out NMEA0183 sentences at 4800bps although I cannot be certain of the bit rate.

What I don't know is whether it is possible to monitor the output of the GPS receiver or whether pi-star gives any indication that it can see the thing now that the feature is enabled.

Also I saw somewhere that you have to set the location Lat/Long to 0.0/0.0 which I have done. I am presuming that the MobileGPS is not working because (and only because) Brandmeister self-care shows the location as 0.0/0.0. Is that a fair assumption?

Any guidance would be gratefully received.

Ian
Amateur Radio Station G8OGJ
KE7FNS
Pi-Star Team
Posts: 2084
Joined: Wed Apr 17, 2019 11:11 pm

Re: MobileGPS support...

Post by KE7FNS »

G8OGJ wrote: Wed Aug 26, 2020 4:03 pm I am presuming that the MobileGPS is not working because (and only because) Brandmeister self-care shows the location as 0.0/0.0. Is that a fair assumption?
I doubt it. My experience tinkering with a USB GPS module and MobileGPS was it was receiving the NEMA sentences perfectly but nothing was being sent anywhere and I couldn't find any documentation.

Edit the config and enable the debug parameter in each section. (General, GPS and Network)

Code: Select all

sudo nano /etc/mobilegps
Then you will be able to see the GPS NEMA sentences in the mobileGPS log so you'll know that the GPS part is working and sending the information to MobileGPS.

As far as how to get that information to where ever you want it to go you are pretty much on your own.
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol: and again
AF6VN
Posts: 620
Joined: Fri Jul 20, 2018 1:15 am

Re: MobileGPS support...

Post by AF6VN »

The closest I've found on Google is

viewtopic.php?t=1724#p7637

which runs a shell script to read the GPS info and send it to some server.

Nothing I've read indicates that Pi-Star, as delivered, makes use of an external GPS -- even if it shows a configuration block for it.

--
AF6VN
Dennis L Bieber
G8OGJ
Posts: 62
Joined: Mon May 06, 2019 8:13 pm
Location: Matlock
Contact:

Re: MobileGPS support...

Post by G8OGJ »

I've managed to validate my GPS receivers using a (free, of course) tool called VisualGPSView (Windows).

One USB receiver was running at 38,400bps and the other was running at 4,800bps.

However, as suggested by a correspondent above setting the pi-star to the appropriate receiver port and baud-rate has not apparently fixed anything - Brandmeister self-care for the relevant hotspot shows Lat/Long as 0.0/0.0.

Any further thoughts gratefully received. If it is the case that this is not a complete feature in pi-star then I would vote for two auxilliary tools namely: a port-checker to see which port the gps is connected to; and an NMEA monitor to verify that the relevant NMEA0183 sentences are being seen (baud-rate checker in effect).

Ian
Amateur Radio Station G8OGJ
KE7FNS
Pi-Star Team
Posts: 2084
Joined: Wed Apr 17, 2019 11:11 pm

Re: MobileGPS support...

Post by KE7FNS »

G8OGJ wrote: Thu Aug 27, 2020 5:10 pm I've managed to validate my GPS receivers using a (free, of course) tool called VisualGPSView (Windows).
Testing in Windows does not validate if the devices operate in Linux.

Two completely different operating systems with nothing in common.
G8OGJ wrote: Thu Aug 27, 2020 5:10 pm Any further thoughts gratefully received. If it is the case that this is not a complete feature in pi-star then I would vote for two auxilliary tools namely: a port-checker to see which port the gps is connected to; and an NMEA monitor to verify that the relevant NMEA0183 sentences are being seen (baud-rate checker in effect).
I explained to you how to enable the output of extra info to the logs, did you do that? If you didn't see the GPS info in the logs, then try every baudrate in the list. If none of them work, then you probably don't have the correct port assigned.
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol: and again
AF6VN
Posts: 620
Joined: Fri Jul 20, 2018 1:15 am

Re: MobileGPS support...

Post by AF6VN »

G8OGJ wrote: Thu Aug 27, 2020 5:10 pm Any further thoughts gratefully received. If it is the case that this is not a complete feature in pi-star then I would vote for two auxilliary tools namely: a port-checker to see which port the gps is connected to; and an NMEA monitor to verify that the relevant NMEA0183 sentences are being seen (baud-rate checker in effect).
If USB, determining the "port" is probably nothing more complicated than doing something like

ls /dev

before plugging in the device, and repeat after plugging it in, looking for differences. You could also try just plugging it in and then running "dmesg", looking for the last serial port registered. https://www.cyberciti.biz/faq/find-out- ... setserial/

I don't have one so I can't confirm, but that is the method many sites suggest for finding what "name" a hot-plug able device has been assigned (SD cards, USB flash drives, etc). And since the data stream is simple 8N1 text using <cr><lf> to terminate lines (though formally, NMEA specifies RS(EIA)-422 [balanced transmission line] a lot of stuff is simple RS(EIA)-232 compatible) any application that can open a serial port would suffice to confirm traffic. https://www.cyberciti.biz/tips/connect- ... nicom.html (that example is using a Linux desktop to connect to an embedded Linux board, but you'd be SSH to the R-Pi, and then run minicom on the R-Pi to connect to the serial port(s).

--
AF6VN
Dennis L Bieber
KE7FNS
Pi-Star Team
Posts: 2084
Joined: Wed Apr 17, 2019 11:11 pm

Re: MobileGPS support...

Post by KE7FNS »

AF6VN wrote: Thu Aug 27, 2020 9:24 pm ls /dev
If its a USB device you just run

Code: Select all

lsusb
AF6VN wrote: Thu Aug 27, 2020 9:24 pm before plugging in the device, and repeat after plugging it in, looking for differences. You could also try just plugging it in and then running "dmesg", looking for the last serial port registered. https://www.cyberciti.biz/faq/find-out- ... setserial/
dmesg is a great way to gather the port assigned to a device.
AF6VN wrote: Thu Aug 27, 2020 9:24 pm I don't have one so I can't confirm, but that is the method many sites suggest for finding what "name" a hot-plug able device has been assigned (SD cards, USB flash drives, etc). And since the data stream is simple 8N1 text using <cr><lf> to terminate lines (though formally, NMEA specifies RS(EIA)-422 [balanced transmission line] a lot of stuff is simple RS(EIA)-232 compatible) any application that can open a serial port would suffice to confirm traffic. https://www.cyberciti.biz/tips/connect- ... nicom.html (that example is using a Linux desktop to connect to an embedded Linux board, but you'd be SSH to the R-Pi, and then run minicom on the R-Pi to connect to the serial port(s).
I get the impression the OP just wants to plug it in and for it to work, rather than try to do any work to diagnose it. I also don't know if Andy compiled MMDVMHost with the gps libraries enabled or not.

It definitely doesn't "just work out of the box" like the MobileGPS documentation says.
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol: and again
G8OGJ
Posts: 62
Joined: Mon May 06, 2019 8:13 pm
Location: Matlock
Contact:

Re: MobileGPS support...

Post by G8OGJ »

I'm familiar with lsusb and dmesg etc and I'm confident that I have set the port correctly on the linux device. The issue was (in the absence of a serial terminal packaged on the minimally configured RPi) how to verivy that the default baud rate output by the device was known - I did that through Windows but I am aware that if I had had a second linux machine around I could have done the same.

The issue with NMEA raised above is not relevant - NMEA0183 specifies an electrical interface (ie RS422 four-wire) and a set of messages. The messages are what is being referred to and I have validated that the two GPS receivers are both pumping out the relevant messages namely GGA, GLL, GNS, GSA and RMC and one of them also pumps out ROT and will provide a GNS message when relevant (satellife fault detection).

The issue being raised was how, and how to verify, pi-star uses that data when the service is enabled - for which I cannot find any documentation.

Ian
Amateur Radio Station G8OGJ
AF6VN
Posts: 620
Joined: Fri Jul 20, 2018 1:15 am

Re: MobileGPS support...

Post by AF6VN »

And you probably won't...

The ONLY link that showed a means of having dynamic updates to an APRS server required running a custom script which extracted position information and created a valid submission to the APRS server.

For anything else, Pi-Star appears to read the location once from config file /on startup/. It may have a config block for GPS, but no one has reported that it does anything with that configuration.

https://github.com/g4klx/MMDVMHost/issues/627 Newer -- but does Pi-Star include the version of MMDVMHost in question, and built with GPS support.

https://github.com/g4klx/MMDVMHost/issues/620 Has updated within the last hour, so this part quite certainly is NOT in a Pi-Star release. ("bold" is my emphasis, and I'll restate, that comment was posted within the last hour!)
As part of my changes to the APRS protocol, I've moved the GPSD handling into DMR Gateway and other changes. I have also added the ability for the DMR Gateway to report its position to APRS-IS in the same way as the YSF Gateway and others. If you get the SImpleDMR version of the DMR Gateway, and the SimpleDMR version of the MMDVM Host and try those, after making note of the configuration changes, it may do what you want it to do.
Going by https://github.com/AndyTaylorTweet/Pi-Star_Binaries MMDVMHOST and DMRGateway have not been updated in two years. Suspect these are v3.x since https://github.com/AndyTaylorTweet/Pi-S ... naries_Bin shows both updated two months ago (so still wouldn't have the update of the previous paragraph)

Even more... https://github.com/g4klx/MMDVMHost/comm ... 0d89a8d9bc indicates a major change in the GPS code took place after the Pi-Star updates (the name MobileGPS is out, gpsd is in)

--
AF6VN
Dennis L Bieber
KE7FNS
Pi-Star Team
Posts: 2084
Joined: Wed Apr 17, 2019 11:11 pm

Re: MobileGPS support...

Post by KE7FNS »

G8OGJ wrote: Fri Aug 28, 2020 7:56 am I'm familiar with lsusb and dmesg etc and I'm confident that I have set the port correctly on the linux device. The issue was (in the absence of a serial terminal packaged on the minimally configured RPi) how to verivy that the default baud rate output by the device was known - I did that through Windows but I am aware that if I had had a second linux machine around I could have done the same.
You don't need a second Linux machine. Theres multiple ways you can easily solve this using what you already have.

1. Download a livecd debian based distro, burn it to media (CD, DVD, USB drive) and boot your desktop temporarily in LiveCD mode. Then install whatever gps software like xgps and tools. Then when you are done just power it off and poof its gone.

2. Just install whatever command line application (NOT X windows) you want on the RPi using the normal Linux package installation tools. There is nothing in pi-star preventing you from doing that.

3. You could also just download and burn a Raspberry Pi OS desktop image and burn it to the SD card (after you've backed your config up), and install xgps and tools. https://downloads.raspberrypi.org/raspi ... mhf_latest (Be sure to plug in a keyboard, mouse, and monitor.)

Then just reimage pi-star on the SD card and restore your config. Its a little more work, but completely doable.
G8OGJ wrote: Fri Aug 28, 2020 7:56 am The issue with NMEA raised above is not relevant - NMEA0183 specifies an electrical interface (ie RS422 four-wire) and a set of messages. The messages are what is being referred to and I have validated that the two GPS receivers are both pumping out the relevant messages namely GGA, GLL, GNS, GSA and RMC and one of them also pumps out ROT and will provide a GNS message when relevant (satellife fault detection).
Only GGA and RMC are being parsed, all other messages are being ignored according to the documentation that there is.
G8OGJ wrote: Fri Aug 28, 2020 7:56 am The issue being raised was how, and how to verify, pi-star uses that data when the service is enabled - for which I cannot find any documentation.
I told you how to verify it.

Turn ALL the debug parameters ON for mobilegps, reboot and read the mobilegps log, it will be constantly filling up with the output of the GPS assuming you have the correct port and baudrate set. Then once you've verified it turn all the debug messages back off or else you'll fill up the log drive and cause other problems after a few hours.

And yeah there is nothing but poor documentation, I already told you that too, the even worse news is there probably never will be. It also appears that mobilegps is on its way out anyway. The only thing to do is sit around and wait until Andy compiles an updated version of MMDVMHost and maybe that will do what you want it to.
AF6VN wrote: Fri Aug 28, 2020 3:14 pm https://github.com/g4klx/MMDVMHost/issues/627 Newer -- but does Pi-Star include the version of MMDVMHost in question, and built with GPS support.
No it doesn't, that code is too new, simply compare the dates.
AF6VN wrote: Fri Aug 28, 2020 3:14 pm Even more... https://github.com/g4klx/MMDVMHost/comm ... 0d89a8d9bc indicates a major change in the GPS code took place after the Pi-Star updates (the name MobileGPS is out, gpsd is in)
https://github.com/g4klx/MMDVMHost/tree ... 7839e881cf

That is the snapshot of the code used to build the latest version of MMDVMHost for pi-star, you'll notice there is no GPSD.cpp and GPSD.h.

It doesn't work as far as I can tell. MMDVMHost never updates my location to anything other than what is in my config file, even when the mobilgps log is filling up with data.
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol: and again
Post Reply