HOWTO: Get pure-maps navigation running on byzantium

I wanted to run Pure Maps on my Pinephone and the Librem 5, but did not want to install the flatpak version. So I learned more about Debian packaging, build systems, Qt, GLES than I ever wanted to know. First, I talk about the packaging nags and open issues and below I will detail how to just use pure-maps.

https://sspaeth.de/2021/03/pure-maps-on-mobian-pureos/

The post also describes an easy way for you to try it out.

15 Likes

Nice. Tag to @rinigus

Hi! So does it mean gps with pure-maps is working on L5 byzantium? I’m still on amber but if byzantium is stable enough and I can get gps to work I’ll surely try it. Also, is GPS signal good? I built pure-maps on the pinephone but I can rarely get the gps fix

1 Like

Yes, it is working on byzantium, not sure if it would work on amber, I have not tried it there.

And no, I have never managed to get a GPS signal on my L5 despite having been outdoors for a full hour (on a cloudy day).

We now have some clues about GNSS performance, and we’re working on fixes.

11 Likes

That sounds awsome!

1 Like

Wow, I had no idea that GPS/GNSS works in Byzantium. I am running Byzantium and it works fine for me, the accuracy is bad but it detects my position in both Pure Maps and in Gnome Maps! Accuracy seems to be maybe a radius of about 20 meters.

I assume that there is nothing else that can detect my position that accurately than GPS/GNSS? IP location has much worse accuracy and I assume that there is nothing to know your location based on WiFi names in the vicinity like what Google does.

1 Like

That sounds like you don’t have a lot of satellites locked in. I don’t think it should be more than 5m on modern devices in a good environment.

1 Like

I’m indoors and it’s cloudy outside so it’s certainly not good conditions, but my android phone is able to get down to a 6-7 meter radius.

If you don’t care about privacy then you can use the Mozilla Location Service.

However the assumption that you don’t care about privacy may not make a lot of sense in this forum. :wink:

Note that, based on the above Wikipedia article, it is using a WiFi BSSID (basically MAC address of the WAP) and not a WiFi SSID (name).

2 Likes

@irvinewade In that case I’m not even sure if my position is from the GPS anymore, since the location services settings refer to Mozilla Location Service. And the accuracy I have seems bad enough to possibly be from WiFi stations.

I’m running Amber so can’t investigate but maybe you should try disabling / blocking MLS.

Once a few Wifi points are in the database, using MLS can give you a pretty good fix within 20m indeed.
Ideally, you use gpsmon or somesuch to observe whether you get a GPS fix, it will also tell you about the number and signal strength of the satellites.

Thanks, I don’t fully understand the data I’m getting but gpsmon and “gpspipe -w” seems to find 13 sattelites. For some reason though it still fails to get the latitude and longtitude.

I do however get the following error from gpsd in journalctl --unit=gpsd

May 06 15:55:04 johan-librem5 gpsd[726980]: gpsd:ERROR: SER: Error setting port attributes: Inappropriate ioctl for device

And dmesg, not sure if related

[82865.930919] edt_ft5x06 2-0038: Unable to fetch data, error: -6

I’ll just wait for some new updates and hope that it works out of the box later :slight_smile:
If anyone wants more logs I can provide that in a PM.

1 Like

Once GNSS is working, the obvious question would be … can I (easily) disable use of MLS and use only GNSS for location services? The screen appears to warn the user that “Using WiFi increases accuracy” and I accept that in some cases that is true but what if I prioritise privacy over accuracy?

(Using the WiFi HKS will, I suppose, do the trick but that is a blunt instrument and won’t always suit my use case and in any case I may forget to use the WiFi HKS.)

/etc/geoclue/geoclue.conf

[wifi]
enable=false

I am not sure, if MLS would still use the modem’s cell id for geolocation though, and whether [3G] or [cdma] would be responsible for that location source.

I believe that the gps source is tapped using the [network-nmea] mechanism (but am not certain of that).

https://man.linuxreviews.org/man5/geoclue.5.html

3 Likes

@spaetz I tried a couple of configurations with geoclue. I did “systemctl restart geoclue” and restarted PureMaps when changing the config.

# Network NMEA source configuration options
[network-nmea]
# Fetch location from NMEA sources on local network?
enable=false
# 3G source configuration options
[3g]
# Enable 3G source
enable=false
# CDMA source configuration options
[cdma]
# Enable CDMA source
enable=false
# Modem GPS source configuration options
[modem-gps]
# Enable Modem-GPS source
enable=true
# WiFi source configuration options
[wifi]
# Enable WiFi source
enable=false

Here only modem-gps is turned on and gave an accuracy of about 1km. So that’s certainly not from the GPS.

# Network NMEA source configuration options
[network-nmea]
# Fetch location from NMEA sources on local network?
enable=true
# 3G source configuration options
[3g]
# Enable 3G source
enable=false
# CDMA source configuration options
[cdma]
# Enable CDMA source
enable=false
# Modem GPS source configuration options
[modem-gps]
# Enable Modem-GPS source
enable=true
# WiFi source configuration options
[wifi]
# Enable WiFi source
enable=false

Here I tried both network-nmea and modem-gps enabled, but got the same result as before with an accuracy of about 1km. So that’s certainly not the GPS either.

So GPS still does not seem to be working with Byzantium. When enabling everything again I get an accuracy of 65m which is most likely from nearby wi-fi.

1 Like

[quote=“johan-bjareholt, post:17, topic:12789”]
So GPS still does not seem to be working with Byzantium. When enabling everything again I get an accuracy of 65m which is most likely from nearby wi-fi.
[/quote] this is related to getting GPS initialized and having a Librem 5 hardware version that supports GPS fully.

Hey @spaetz i believe the app download links are down on your website and do not point to the right repositories anymore.

Particularly i was wondering if i could install a .deb version of the app for the Librem 5 phone, instead of a flatpak. Online i have not been able to find pure-maps that have a .deb repository where i can download a pre-compiled version.

Do you have one, even if it is just a version for testing purposes laying around?

1 Like

The repo was automatically deleted after some time of inactivity. I have a somewhat oldish .deb in the latest CI jobs over at https://salsa.debian.org/Mobian-team/packages/puremaps. However properly packaging puremaps so that it is acceptable for Debian proved to demanding for me due to all those dependencies.

1 Like

Thank you for the explanation i can imagine thats a huge task, i am not seeing any .deb artifact successfully built, do i need to build it from source using your repository?