PiAware Mobile GPS tracking / position update not working - FIXED!

Evening all,

I have been wrangling with this issue for a while and I believe I’ve discovered the issue and a workaround. For background: installing gpsd on your linux image feeds GPS position data into your local FlightAware web page view locating the distance rings and map so that if you are mobile or move your system regularly you location moves with you. Its neat. However, since I’ve updated to PiAware ver 8.2 (may affect earlier versions, I’m not sure) there has been an issue with the position not updating. In short PiAware gets its position from gpsd which gets its position from the GPS, only the position doesn’t update beyond the initial GPS lock position. This problem seems to be limited to the u-blox USB receivers commonly found on ebay. It seems gpsd version 3.22 has an issue with the way it talks to the u-blox receivers. This has been corrected in ver 3.25 but this version is not included in the current Linux image version that PiAware ver 8.2 is based on. The issue is, gpsd on negotiating a serial connection with the u-blox GPS changes the communications protocol from default NMEA to a u-blox propriety HEX protocol and this is where the issue arises and it breaks. Limiting gpsd’s ability to make this change seems to be a viable work around. This is what has worked for me thus far.

So… details assuming a new system from scratch. I’ll assume you have downloaded a new piaware image and written it to your SD card and booted and established connection via ssh.

Install gpsd (sudo app-get install gpsd)

Once install completed, make sure /boot/piaware-config.txt is updated with the “usegpsd yes” option.

Update the gpsd option file with the -b switch, this prevents gpsd from changing the comms protocol from NMEA to u-blox HEX.
Open sudo nano /etc/default/gpsd at the terminal and modify to include GPSD_OPTIONS=“b”
Save and close the file.

Reboot the raspberry pi

Once rebooted, plug in your GPS and check it is recognized by running “lsusb” at the terminal and you should see your GPS referenced on the USB bus aka…“Bus 001 Device 005: ID 1546:01a7 U-Blox AG [u-blox 7]” or similar.

Run cgps at the ssh command line and wait for it to lock position. This will take time from cold start. You’ll see it change from “NO FIX” to “2D FIX” and then “3D FIX” and this is when it should start passing location to PiAware. If you’ve succeeded, you’ll note the GPS Lat/Long position jitter ie numbers changing, if not they will be frozen.

You should then see PiAware GPS block green and getting updated positions as you move!

This is a distillation of many nights messing around and reading others discussion and I claim no originality in the diagnosis, actually most of the critical info comes from a bug report on the gpsd app on launchpad. Hopefully I’ve captured all the details…

Enjoy :slight_smile: All we need now is an option to move make the map move to track location without having to reload the web page :slight_smile: please?

3 Likes

This is great! :+1:
Thank you @thenail for posting the how-to.

 

1 Like

Thank!

Your post helped me get on the right track to solve my issue.

See this post:

Mark