I see SW Maps is often cited as a way to record rover positions. I’ve been trying for a couple of days to get it working over Bluetooth so I can use my Android phone or an old Android tablet.
Raspberry Pi 5 – 8 GB
GNSS-RTK Flex pHat - ZED-X20P
PyGPSClient to verify NMEA
Bench testing with Raspberry Pi desktop
I’ve been trying suggestions from Google Gemini, but haven’t been able to connect SW Maps over Bluetooth.
Is there a good guide to help me accomplish this?
What are some alternatives to SW Maps for logging?
When you say “logging”, do you mean logging the NMEA messages from the GNSS? Or you you mean logging waypoints as you survey an area?
PyGPSClient can log NMEA messages for you.
If waypoint logging is what you need, then:
You need to achieve something like the following:
Pair your phone with the Raspberry Pi over Bluetooth
Forward the serial / UART NMEA messages from the GNSS to your phone over Bluetooth
If you have GNSS “Instrument Model” set to “Generic NMEA” or “u-blox” in SW Maps, then you should be off and running.
It should be possible to do both the pairing and forwarding using (e.g.) a little Python running on the Raspberry Pi. But it’s not something I personally have done before. I’d need to go searching for some code to try.
It’s the end of day here. If you’ve got time to poke Gemini into finding some code for you, then please do. Otherwise I will try and find you some code in the morning.
By “logging”, I do mean logging waypoints as a survey an area.
I have a basic Python script on the Pi that will read NMEA messages from the pHAT UART (/dev/ttyAMA0) and write them to the Pi’s Bluetooth serial port (/dev/rfcomm0).
I have tried both “u-blox” and “Generic NMEA” settings in SW Maps, but it seems the problems are on the Pi’s bluetooth configuration.
I think the following is enough to demonstrate the problem. It appears that Bluetooth service running on the PI it treating the connection as Audio device and does not recognize the correct type:
Edit /etc/systemd/system/dbus-org.bluez.service to enable SDP:
Thanks for the sample code. It looks like a good starting point.
I believe my issue is more related to establishing the Bluetooth connection. I think it could be related to the Bluetooth configuration, and how Device and Service classes are being used when the devices are being connected. I need to study the documentation in more depth to better understand the messages I see from bluetoothctl that I posted in my previous reply. For example, sep13 refers to a Stream EndPoint (SEP), a specific D-Bus object created by the BlueZ stack to represent a media stream. In may be related to the Advanced Audio Distribution Profile (A2DP) used by audio services on the Pi.
When I look at Bluetooth connections on my Android device, it shows an icon indicating Audio/Video device.
I think there should be a different icon displayed for rpi5-gnss-rtk-rover in this image. What icon do you see when you pair the External GNSS device?
I managed to corrupt my system so I went back to the beginning with a fresh SD image. I also decided to finish the mechanical fabrication of my system for a rover pole. The head unit weighs 1.34 kg, and most of that is the batteries.
After being misdirected a few times by Google Gemini or ChatGPT, I decided I should take my time, study the docs, and document my progress from beginning steps to working system. It may be a few more days until I have something working. I want to understand what I’m doing in more depth and learn more in general about working with Bluetooth.