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:

$GPGSV,1,1,04,15,54,011,,05,36,068,,13,29,034,,02,07,146,*7E
$GLGSV,1,1,03,84,58,295,,83,41,186,,78,18,062,,,,,*5A
$GPGSV,1,1,04,15,54,011,,05,36,068,,13,29,034,,02,07,146,*7E
$GLGSV,1,1,03,84,58,295,,83,41,186,,78,18,062,,,,,*5A

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.

2 Likes

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:

almanac
$PSTMALMANAC,1,40,01890824145ba51c5bfd0000100da100b562ef00031824001919170010eabf0000000000000000001F
$PSTMALMANAC,2,40,0289082431a88d0e48fd0000060ea1004ed2eb00bcc6c300a4311f005e0580000000000000000000
46
$PSTMALMANAC,3,40,03890839cc1ff81268fd0000800da100838a1900ffb72800f87fe600eaefbf0000000000000000001C
$PSTMALMANAC,4,40,04890839900caf0b58fd0000f10ca1009d9845009d488000979261002d0780000000000000000000
47
$PSTMALMANAC,5,40,0589082411317c0a60fd0000980ca100fbf717005d6a29002f2d8200bf07800000000000000000001C
$PSTMALMANAC,6,40,06890839db133f1c55fd00009d0ca1008205ef00eca0d50048742600831880000000000000000000
18
$PSTMALMANAC,7,40,07890824987dcd0555fd00004f0da100a72d6f00f83fa200acdffc002709800000000000000000004D
$PSTMALMANAC,8,40,08890890f037ef0e4efd00001c0da1002c4ec3001b5c0200feeeba00d00780000000000000000000
42
$PSTMALMANAC,9,40,098908395e13150751fd0000e00ca1000e7743003d8c4a008935820085068000000000000000000048
$PSTMALMANAC,10,40,0a8908392c3bdf126bfd0000150da100226d1900143497007613c600f7f6bf000000000000000000
7E
$PSTMALMANAC,11,40,0b89087b1803640c3ffd0000810da1002621f100c1086a000818c00012f8ff00000000000000000022
$PSTMALMANAC,12,40,0c890863af44f7125efd0000cd0ca1000c639c00df283200a854de0076f7bf000000000000000000
28
$PSTMALMANAC,13,40,0d890824d82e961059fd0000f30ca10021ab4900c9da27009c5f5b00e510800000000000000000002B
$PSTMALMANAC,14,40,0e890839d80934085afd0000c70ca10060389b00e74e7e004405df00d2f7bf000000000000000000
74
$PSTMALMANAC,15,40,0f890839dd714ef73efd00001e0da100863b3f00ee0f2b00b1a14b00930f8000000000000000000021
$PSTMALMANAC,16,40,108908244565fb1266fd00002b0ca100bf3a9d001ae51b00ac7394003ff6bf000000000000000000
70
$PSTMALMANAC,17,40,1189087bce70ba185ffd0000560da100839fc600dd93c100f260b80035128000000000000000000024
$PSTMALMANAC,18,40,12890824061110124efd0000c10ca10043c1ef000abe7c006e26200032f1bf000000000000000000
2F
$PSTMALMANAC,19,40,1389087b3949e0175cfd0000000da100be74c80042985000471819005908800000000000000000007E
$PSTMALMANAC,20,40,14890890c02cedfe2bfd0000180da100533d1300bf0f7c0012098a001f0280000000000000000000
7C
$PSTMALMANAC,21,40,15890839c9c6c70a43fd0000880ca10090bfeb003703d500d0a176009f008000000000000000000079
$PSTMALMANAC,22,40,1689087b6737c3fc2efd0000f00ca100e1231500a16edc00a7d78900221e80000000000000000000
79
$PSTMALMANAC,23,40,1789087b830fa90f4bfd00001e0da1001d581800798172006b9246001ef8bf00000000000000000073
$PSTMALMANAC,24,40,188908399d62f6fa41fd00001d0da100abd66b001edc1f0028c023001b0980000000000000000000
20
$PSTMALMANAC,25,40,198908246f52d10a5cfd0000a60da100896299008e492700a401d9000111800000000000000000007B
$PSTMALMANAC,26,40,1a89083922355bfe4ffd0000dd0ca100a481970058cf0c00a9b9bd00a60880000000000000000000
72
$PSTMALMANAC,27,40,1b890839904f971448fd0000cf0ca100d72fc4002f921900c6c1700016ffbf00000000000000000076
$PSTMALMANAC,29,40,1d890839fb0e021a4ffd00000f0ca100d23bc7003f006100d3bd72002efebf000000000000000000
21
$PSTMALMANAC,30,40,1e890839d32b21fc42fd00006c0ca100edbc6f00441f90001e5ffa00fafdbf00000000000000000077
$PSTMALMANAC,31,40,1f8908392455920853fd0000b90ca100aadf6f0041c00d00aad3e90061ffbf000000000000000000
28
$PSTMALMANAC,32,40,20890839aa2a9f0953fd00007a0da10009e8430039a89e007c8c8e00e5ffbf00000000000000000076
$PSTMALMANAC,68,40,447908008051217880c21e009db00500b9ee0f002928380193bf3400fadb020008000000443a0000
26
$PSTMALMANAC,71,40,477908008051c17e41ae130093bf0900e88b18001022280118c0340027b4020008000000443a000026
$PSTMALMANAC,73,40,497908008051114215220600adcb0200d7011e00b31d3801b1be34002a83020008000000443a0000
25
$PSTMALMANAC,77,40,4d7908008051314a0ada1d0087220800730a0e0064243c018ebf34007fd8020008000000443a00002A
$PSTMALMANAC,78,40,4e7908008051414c199e0f00f28b0a003e380c008b2b40019dbf34004cc3020008000000443a0000
24
$PSTMALMANAC,84,40,547908008051d17c0f10050084250c00816c1a00cf201c0188c034006c49020008000000443a00007F
$PSTMALMANAC,87,40,57790800805151421406090052f40c0098660a00e52b4001b4bf340098e1020008000000443a0000
7B

Ephemeris
$PSTMEPHEM,6,64,880894119411636363b80c00dbacff008d02f118ea1471022000f7ff2a280000ee772a28a9bc3601caef0ca144c5805c13db2af4c2aca7d5090050003addc3030A
$PSTMEPHEM,19,64,8808cc0ecc0e0101010000000000000100000000000000000000000000000a0025d7e527e5028d04a1d20ba1c33d0dc5bbaab4cd733b8f5000002c005f98c20b
65
$PSTMEPHEM,31,64,8808cc0ecc0e0101010000000000000100000000000000000000000000000c003a4df22678875305522a0ea1790679dcd3540775499c890d0000efff9e14fb0b*64
Regards

2 Likes

the file on my librem5 are up
Regards

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 www.unixarea.de

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 gnss_test.py 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 gnss_test.py script?

2 Likes

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.

2 Likes

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).

6 Likes

Hmm,
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