Librem 5 GPS/Location Tracking

Could someone share the files almanac.txt and ephemeris.txt from /var/cache/gnss_share after running gnss_share for those of us having trouble with the gps module?

Mine just sees a single gps and 6 glonass satellites. the parameter “signal strength” (ss) is missing on all satellites.

I wrote a super simple py script for debugging (if someone is interested i will publish that thing).

My Chip reports Position: {'latitude': 23.680298666666665, 'longitude': 116.15435566666665, 'speed': 0, 'course': None, 'fix': False, 'altitude': 31, 'satellites': 0} with no fix. The location is not changing nor the state (“no fix”) or 0 satellites changes. Anyway the Maps programm shows that very location after a while as a fix. I consider this a bug.

On my phone that directory does not exist. I assume that that is because I don’t have the relevant package installed. It is my understanding that GNSS will work fine without having the package installed i.e. if all you want to do is confirm that the GNSS hardware is working (which I have done).

no, i want those files to make mine work because it doesnt. :confused:

probably, but it’s not a package, it’s a py program which is able to store (and later use) the almanac & ephimeris data (the link is in my post). if someone has such stored data i could try to use those (the concept is called “AGPS” :wink: )

so your location is shown correctly?

The best way to see, if your GPS receiver is working correctly is:

Put the L5 below clear sky without buildings or trees around, SSH into it from your laptop and run:

sudo grep -a '$..GSV' /dev/gnss0

If you get records like this:


where in between the two commas above ,, is no number between 0-99 (which is the signal/noise ratio) and which must be at least 20 for a while (some 15 minutes), you will never get a fix.

I own two L5, one works fine and one does not.


yes, this is “ss”, the signal strength field and as i said i dont have that ever filled. yours sees 4 gPs and 3 gLonass satellites with no ss each - similar to mine. we have a cloudy sky today, will see if its getting better next days.

inbetween i am still looking for the data that is received from the satellites in those 15min (or a bit more) which is stored by gnss_share - have your tried that tool on the device which works? could you send me your files if so?

i remember to have such a bad gps module and antenna back than in the GTA01, 13 years ago. that one had troubles to receive something too. i hoped technology improved since than :frowning:




the file on my librem5 are up

thank you! i put it in and the in_view from GSV jumps to 11 while there is still no ss. i assume that “in_view” doesnt mean it’s seen while the ss is missing, there are just e.- and a.-data for those. so when i put in the data from @antpanlinux it knows about those satelites while it doesnt see it.

so maybe an antenna problem as @guru assumed already?

which files exactly do you want me to send?

btw: I still own some gta-02 devices, one runs SHR and the other qtmoko, still booting fine;

my mail addr is at

attention, I live in Italy and I don’t know if you receive the same satellites

i already used the ones above - it seems the data can be send to the module just fine allone it doesnt receive enough.

yes, i have one laying around too and the 02 had better gps while the 01 never worked for me - similar to the l5.

sure but at least it shows why i ses some satelites with no ss, it seems these are the sats that the device saw long ago when the tests occured in china (see location ‘latitude’: 23.680298666666665, ‘longitude’: 116.15435566666665).

so my l5 comes without gps. @purism: what can i do (and the others having the same problem)?

Yes, I get valid location data returned by the GNSS module and the location is correct to the extent that I can confirm it using my iPhone (and definitely not in China :rofl:).

Purism sent me a tool which gets a fix after ~120 secs as:

GPS 0.3
longitude      XX.62259400
latitude       XX.05272133
altitude (m)   563.77
accuracy       4.8
fix            3D
View sats
S24:31.0 S15:24.0 S13:30.0 S14:36.0 S23:20.0 S17:21.0 S05:21.0 S28:35.0
Solution sats
S24:31.0 S15:24.0 S13:30.0 S14:36.0
timestamp      2021-11-25 14:46:06.28
Fix time       1637851566.000
TTFF           120.5

(I deleted the real position with XX)
The values matches closely to what my UbuntuPhone E4.5 detects (in the pic the values in front of the decimal point are blanked-out):

I’m still struggling with a app Maps because even if the phone has a fix, the location shown in the map seems to be based on Wifi or cell towers.

1 Like

Where can one get this script?


The test scripts are currently available as snippets with the gnss-share repo

They will get packaged at some point into the librem5-devkit-tools. Those snippets will work with the python or go version of gnss-share. Do not install gpsd.


That’s still expected at this point, but we’re working on making it work out-of-box (so Geoclue can access GPS readings and forward it to applications like Maps).


Sadly the script doesn’t get a fix after being set outside for some time… Perhaps the gps is just busted on this thing.

What kind of output do you get from ?

socat unix-client:/var/run/gnss_share.sock - 

Does gnss_test show any satellites ?

I get:

purism@pureos:~$ socat unix-client:/var/run/gnss_share.sock -
-bash: socat: command not found

Which pkg I’m missing?

socat needs to be installed

sudo apt install socat