Librem 5 GPS/Location Tracking

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

It gives a bunch of data like this:

$GNGSA,A,1,,,,,,,,,,,,,99.0,99.0,99.0*1E
$GNGSA,A,1,,,,,,,,,,,,,99.0,99.0,99.0*1E
$GPGSV,3,1,11,01,77,077,,07,65,227,,30,52,292,,21,50,043,*75
$GPGSV,3,2,11,17,32,277,,22,28,121,,14,27,322,,03,21,131,*75
$GPGSV,3,3,11,08,20,048,,19,10,257,,09,06,203,,,,,*48
$GLGSV,1,1,02,87,41,012,,81,27,233,,,,,,,,,*60
$GPGLL,2256.33128,N,11351.74301,E,144745.000,V,N*48
$PSTMCPU,25.46,-1,49*4A
$GPRMC,144746.000,V,2256.33128,N,11351.74301,E,0.0,0.0,281121,,,N*75
$GPGGA,144746.000,2256.33128,N,11351.74301,E,0,00,99.0,031.00,M,0.0,M,,*65
$GPVTG,0.0,T,,M,0.0,N,0.0,K,N*02

The GSV lines are lacking the value which I inserted as ss:

$GPGSV,3,1,11,01,77,077,ss,07,65,227,ss,30,52,292,ss,21,50,043,*

which should be a two digit value between 00 and 99 and measures the signal/noise ratio. Without having them above 20++ for some minutes for some satellites, there will not be a fix.

@guru is correct. If that dump is from inside that is expected, please try the dump outside > 12 minutes.

The fact that the module is showing satellites is good, either it means the module has downloaded at least a partial almanac or you’ve uploaded an almanac to the module.

15 minutes outside, here’s a tail of the GPPSV:

$GPGSV,3,3,11,02,12,249,,01,11,042,,09,06,145,,,,,*4F
$GPGSV,3,1,11,14,81,157,,06,51,273,,17,49,008,,19,39,331,*70
$GPGSV,3,2,11,03,27,049,,22,20,044,,30,19,199,,11,18,244,*70
$GPGSV,3,3,11,02,12,249,,01,11,042,,09,06,145,,,,,*4F
$GPGSV,3,1,11,14,81,157,,06,51,273,,17,49,008,,19,39,331,*70
$GPGSV,3,2,11,03,27,049,,22,20,044,,30,19,199,,11,18,244,*70
$GPGSV,3,3,11,02,12,249,,01,11,042,,09,06,145,,,,,*4F
$GPGSV,3,1,11,14,81,157,,06,51,273,,17,49,008,,19,39,331,*70
$GPGSV,3,2,11,03,27,049,,22,20,044,,30,19,199,,11,18,244,*70
$GPGSV,3,3,11,02,12,249,,01,11,042,,09,06,145,,,,,*4F

It still has a few blank values in the commas. Does this mean the GPS is not working correctly?

Was in a open area and there wasn’t a cloud in the sky

I do not see any ss value between the commas.

There’s no SNR values in there so it’s not seeing any satellites. I’d contact support@puri.sm .

1 Like

I tried to get a fix on my L5, but I also do not see any ss values when I do:
socat unix-client:/var/run/gnss_share.sock - | grep -ai --line-buffered gsv

Here some output that I see:

$GPGSV,3,1,09,16,64,308,,27,48,175,,26,47,021,,31,36,071,*73
$GPGSV,3,2,09,04,35,320,,08,22,197,,03,23,258,,22,19,235,*74
$GPGSV,3,3,09,32,15,147,,,,,,,,,,,,,*47
$GLGSV,1,1,03,87,28,117,,86,16,051,,88,13,158,,,,,*57

I had the L5 outside for roughly 30 minutes, and for more than half a day close to the a window at the top of my house. The sky is cloudy nowadays here in the Netherlands. When the L5 was outside the number of satellites increased IIRC.

In the /var/cache/gnss_share/ directory, I only have a recent almanac.txt that I did not put there myself. It seems to update every day.

Should there also automatically appear an ephemeris.txt ?

# ls -l /var/cache/gnss_share/  
total 8  
-rw-r--r-- 1 root root 4464 Nov 30 08:57 almanac.txt

@steve: Did you contact Purism support? If so, what was their response?