Using a Serial Attached GPS Device with Pure Maps on a Raspberry Pi 4
Pure Maps is an open-source, privacy-focused navigation app that can be used on a variety of devices, including the Raspberry Pi. One way to improve the accuracy and reliability of the app is to use an external GPS device. In this article, we will cover the steps for setting up a serial attached GPS device with Pure Maps on a Raspberry Pi 4 running a 64-bit distribution.
Choosing a GPS Device
There are many GPS devices available on the market, but not all of them will work with a Raspberry Pi. When choosing a GPS device, it is important to look for one that is compatible with the Raspberry Pi's USB ports and that uses the NMEA 0183 protocol. Some popular options include the GlobalSat BU-353-S4 and the U-Blox NEO-6M.
Setting up the GPS Device
Once you have chosen a GPS device, the next step is to physically connect it to the Raspberry Pi. This is done by plugging the GPS device into one of the Raspberry Pi's USB ports. Once the device is connected, it should be automatically detected by the Raspberry Pi's operating system.
To confirm that the GPS device is working properly, you can use the dmesg command to view the system log. This should show a message indicating that a new USB device has been detected, along with the device's vendor and product IDs. For example:
[ 40.152310] usb 1-1.3: New USB device found, idVendor=067b, idProduct=2303, bcdDevice= 1.10This indicates that a new USB device with vendor ID 067b and product ID 2303 has been detected. You can use this information to confirm that the GPS device is connected and working properly.
Configuring Pure Maps
Once the GPS device is set up and working, the next step is to configure Pure Maps to use it for navigation. This is done by opening the Pure Maps app and going to the Settings menu. From there, select the Navigation option and then the Location sub-option.
On the Location screen, you should see an option for GPS device. Select this option and then choose the serial port that corresponds to the GPS device. On a Raspberry Pi, this will typically be /dev/ttyUSB0 or /dev/ttyAMA0.
Once you have selected the GPS device, Pure Maps should be able to use it for navigation. You can test this by entering a destination and then starting the navigation. The app should show your current location and provide turn-by-turn directions to your destination.
Setting up a serial attached GPS device with Pure Maps on a Raspberry Pi 4 is a relatively simple process that can greatly improve the accuracy and reliability of the app. By following the steps outlined in this article, you should be able to get your GPS device up and running in no time.
References
- Pure Maps documentation: https://puremaps.org/docs/
- GlobalSat BU-353-S4 product page: https://www.globalsat.com.tw/en/product/bu-353-s4
- U-Blox NEO-6M product page: https://www.u-blox.com/en/product/neo-6-series