I get these results for the status of the gnss-share.service:
systemctl status gnss-share.service
● gnss-share.service - Manage access to and AGPS on GNSS devices
Loaded: loaded (/lib/systemd/system/gnss-share.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2024-04-23 00:39:30 CEST; 4min 4s ago
Docs: https://gitlab.com/postmarketOS/gnss-share
Main PID: 2553 (gnss-share)
Tasks: 10 (limit: 3015)
Memory: 4.9M
CPU: 201ms
CGroup: /system.slice/gnss-share.service
└─2553 /usr/bin/gnss-share
Apr 23 00:39:30 morgana systemd[1]: Started Manage access to and AGPS on GNSS devices.
Apr 23 00:39:30 morgana gnss-share[2553]: Starting GNSS server, accepting connections at: /var/run/gnss-share.sock
Apr 23 00:39:39 morgana gnss-share[2553]: server: unable to subscribe to topic: stm unable to open device: stm device is not ready
Apr 23 00:43:25 morgana gnss-share[2553]: stm received a request to start but it seems to already be started...
Apr 23 00:43:25 morgana gnss-share[2553]: Client connected
Apr 23 00:43:25 morgana gnss-share[2553]: Checking date/time on module...
Apr 23 00:43:30 morgana gnss-share[2553]: error: stm unable to set time: stm/setTime: timed out waiting for device
I tested the above now on another Librem 5. There I do see the sentences from the GPS module being printed in the terminal when running:
sudo socat unix:///var/run/gnss-share.sock -
The phone where it does not work was flashed yesterday to byzantium stable. I did try to use the assisted GPS scripts from here: Assisted GNSS ($1207) · Snippets · GitLab
Could that be the reason for not getting any GPS strings from gnss-share?
All kill switches are up, so everything is unlocked.
I booted and did the sudo socat unix:///var/run/gnss-share.sock - as the first thing.
There are still no GPS strings. Could it be that the GPS module is somehow switched off? Or wrongly configured? Is there any firmware involved?
Do sudo systemctl disable gnss-share.service, unplug USB, turn the phone off, wait half a minute, turn it back on and retry sudo cat /dev/gnss0 before doing anything else.
Wow. I followed your instructions (actually waited several minutes before turning the phone on again) and I see the GPS sentences now. Would you mind explaining what could have caused this behavior?
It really needs to be investigated by someone who actually knows stuff but my speculation would be a timing / dependency problem. By disabling the service and starting the underlying program manually, you are changing the timing of events at system boot.
Anyway, you got good news: The GNSS module is fine. It just needs work on the software.
After that the gnss-share service started working, I put the Librem 5 outside, and it had quite quickly a GPS fix. Note that I did ran the agps.py script from Assisted GNSS ($1207) · Snippets · GitLab roughly a day earlier. Thanks for all support and information!