PureMaps (flatpak) on the L5

(I’ve XX’ed out the parts that looked like they could reveal my location.)

purism@pureos:~$ mmcli -L
/org/freedesktop/ModemManager1/Modem/0 [QUALCOMM INCORPORATED] 0
purism@pureos:~$ sudo mmcli -m 0 --location-enable-gps-nmea
successfully setup location gathering
purism@pureos:~$ sudo mmcli -m 0 --location-get


GPS | nmea: $GNGNS,NNN,XX
| $GPGSA,A,1,XX
| $PQWM1,XX
| $GPRMC,V,NXX
| $GPVTG,T,M,N,K,NXX
| $GPGGA,0,XX
| $PQWSXX
| $GNGSA,A,1,XX
purism@pureos:~$

Edit: Thanks for all these tips, btw.

1 Like

@amarok thank you for your patience and testing this. I have been interested for quite some time, if and how good GPS is working on the L5.

The data you posted doesn’t reveal your location. The part you XXed out at the end is the checksum. In case you are interested, here’s a description about the meaning of the NMEA sentences: https://www.rfwireless-world.com/Terminology/GPS-sentences-or-NMEA-sentences.html
Or if you want to decode the NMEA sentences, you can use an online tool like https://swairlearn.bluecover.pt/nmea_analyser

Now we know that we can query the GPS module via mmcli on the L5 - that’s cool. In this case, geoclue should be able to pick up the data as soon as you’ve got a GPS fix.

So the next step would be to get an actual GPS fix. You should get back a longer GPGGA NMEA sentence with an actual position from mmcli. This should look similar to that:

$GPGGA,122842.528,5231.277,N,01324.679,E,1,12,1.0,0.0,M,0.0,M,,*65
$GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30
$GPRMC,122842.528,A,5231.277,N,01324.679,E,026.8,028.6,121220,000.0,W*73

As soon as you’ve got a GPS fix, you can check again with where-am-i --accuracy-level=8.

Edit: For reference, here’s some sample output from where-am-i (without GPS fix, location XXed out):

mobian@pinephone:~$ /usr/libexec/geoclue-2.0/demos/where-am-i --accuracy-level=8
Client object: /org/freedesktop/GeoClue2/Client/4

New location:
Latitude:    XX.XXXXXX°
Longitude:   XX.XXXXXX°
Accuracy:    11.973171 meters
Speed:       0.009006 meters/second
Heading:     0.000000°
Timestamp:   2020年12月12日 14時07分01秒 (1607778421 seconds since the Epoch)

New location:
Latitude:    XX.XXXXXX°
Longitude:   XX.XXXXXX°
Accuracy:    11.876203 meters
Speed:       0.018885 meters/second
Heading:     0.000000°
Timestamp:   2020年12月12日 14時07分24秒 (1607778444 seconds since the Epoch)
4 Likes

The modem’s GPS antenna isn’t connected, you won’t be able to get a fix this way. Librem 5 has a separate GPS device that’s accessible via /dev/gnss0 node. AFAIK geoclue doesn’t have it fully wired up yet so you’d need something like https://github.com/zeenix/gps-share/pull/17 to make it show up in apps that use geoclue API. If you just want to verify how the module works, you can also use gpsd or even cat /dev/gnss0 and parse NMEA with your eyes :wink:

4 Likes

@dos: Thanks. I haven’t taken a closer look at the GPS hardware of the L5 so far. But it makes sense that you wouldn’t want the modem’s GPS to be used on a privacy focused device.

Well, I should have read https://puri.sm/posts/gps-tuning-the-librem-5-hardware/ before posting here… :sweat_smile:

And thanks for pointing me to the PR - seems like Angus Ainslie is already on the topic… :slight_smile:

1 Like

Thanks for all this anyway, @Kareema… I learned some things and that’s always good.

2 Likes

@dos: I just took a look at the state of https://github.com/zeenix/gps-share/pull/17 and it seems like it wouldn’t take long until the PR is merged. The FIXME to clean up the code should be easy enough for a rust beginner like me, so I’ll take a shot at it as soon as I find the time (after the merge is through).
I noticed, that there’s no Debian package for gps-share so far. Do you know if Angus Ainslie (or somebody else) is going to package it for the Librem 5?

Sorry to bump an old post, but where is the location service in settings? I cannot find it

Settings >> Privacy.

I got a PureMaps update yesterday, now the default map (mapbox) is displayed as follows:


Is this something I can fix somehow?

I tried to package it up, but it has a bunch of dependencies not found in Debian. Still, there’s someone in Debian who is watching this space, so I’m going to push what I have to relevant places.

Almost all is not displayed, but what is looks quite correct. :wink:

Text based/only map? :thinking: That does indeed show where everything is in relation to each other.

Is @Rinigus (the dev) still frequenting this forum?

@JR-Fi: getting notified when I’m pinged, thanks.

@fiacco: In general, bugs should be reported by issues at Github. Otherwise, it is by chance that I discover them. OK, looks like Mapbox map is not working. Can you try some raster map tiles? Like HERE or OpenCycleMap?

I did move Pure Maps to Qt 5.15 a day or two ago. I wonder if we are again hitting some Mesa issue or something is terribly wrong in the build. (Working to fix OSM Scout Server build on the same Flatpak runtime).

As for Debian packaging, so far I have only heard of interest but haven’t seen it packaged. There is a significant amount of dependencies that actually allow me to deliver such map application.

1 Like

For me, Mapbox, HERE, and Sputnik seem to be the ones that don’t work. All the other ones do work.

Good one! I immediately thought of a terminal version. Dwarf Fortress in real life?

1 Like

@amarok: Try to move away

~/.var/app/io.github.rinigus.PureMaps

somewhere else. This will move all your settings, but you could restore it later. I wonder if some caches are messed up

1 Like

They works. All except Mapbox. Also satellite view is OK.
Moving away ~/.var/app/io.github.rinigus.PureMaps doesn’t help

1 Like

@fiacco: thank for testing. Would you mind testing with offline mode as well using OSM Scout Server? Mapbox and offline maps use vector tiles and could stress GLES more than raster maps. So, would be interesting to know whether it is only Mapbox (more complicated style) or OSM Scout Server maps as well.

In addition, check if with raster maps you can see

  • POIs (such as search results)
  • routes (after routing calculation)

Would be great if someone could check your breakage with Pure Maps. As in your case, without the cache if something is broken.

One more test that can be done and suggested for PinePhone on https://wiki.mobian-project.org/doku.php?id=puremaps. Try to run from terminal:

LIBGL_ALWAYS_SOFTWARE=1 flatpak run io.github.rinigus.PureMaps

Please when reporting, also state if you use L5 or PinePhone.

1 Like

Using OSM Scout Server I get the same map (with different font).
With raster map (tried OpenCycle and OpenTopo) I get POIs after a search, but I cannot see graphically a route, even if apparently has been calculated it, because I can see “circles” POI along the route.

Do you want to move this discussion to Github?

EDIT: I’m on L5

1 Like

@fiacco: thanks for testing! This sounds like a bug coming from GLES stack (Mesa, kernel) which got triggered by a new Flatpak platform.

Have you tested with LIBGL_ALWAYS_SOFTWARE=1?

If my suspicion is right, it is not something I can fix on Pure Maps side but has to be fixed in L5 drivers (or interaction with Mesa on Flatpak). So, there is no point in opening an issue at Pure Maps Github repo.

Please do the test with software-based rendering and then let’s report an issue via Matrix L5 channel.

1 Like