01-06-2021, 07:20 AM
I've been trying to get GPS working on my PinePhone running Manjaro CE (latest s/w updates) without much success. Here's my test procedure (I've written a short BASH script to automate most of this, from which I'm quoting below):
1) Reboot phone
2) Download xtra data for step 3
3) Stop & disable modem manager, then run alastair-dm's script for uploading the xtra data into the modem. I've modified this script to use the data downloaded in step 2. Since the modem is off while running the script, downloading would not be possible without Wifi. Finally, enable & start modem manager again.
4) Wait for the modem to come up, then enable desired GPS capabilities in the modem. During all my tests, these were 10 seconds refresh rate, signal on, don't set supl
5) Go for a walk, open field, no obstructions.
Observations:
- location status usually reports this:
- location get has this to say:
- checking the NMEA stream for visible satellites, I get this:
I've tried this several times during the past week, but never got anything else than the samples above, i.e. no satellites, no GPS fix. I also checked with the Maps application, and that occasionally gives me a location. However, it's usually pretty far off the actual position (100 to 200m), and since GPS actually doesn't see satellites, I guess that's location via the cell towers.
Questions:
- Am I missing anything?
- In step 4, should I enable agps-msb, gps-nmea, and gps-raw via separate calls to mmcli, in that order?
- Has anyone found a reproducible procedure for reliably getting GPS location?
- Could there be a hardware failure? Has anyone experienced an actual broken GPS receiver?
- What kind of performance can we expect at best from the particular GPS receiver that's built into the modem?
Kind regards,
Alex
1) Reboot phone
2) Download xtra data for step 3
3) Stop & disable modem manager, then run alastair-dm's script for uploading the xtra data into the modem. I've modified this script to use the data downloaded in step 2. Since the modem is off while running the script, downloading would not be possible without Wifi. Finally, enable & start modem manager again.
Code:
function upload_gps_data {
echo "loading AGPS data into modem via Python script"
systemctl disable ModemManager.service
systemctl stop ModemManager.service
/home/manjaro/load_gps_data.py
systemctl enable ModemManager.service
systemctl start ModemManager.service
}
4) Wait for the modem to come up, then enable desired GPS capabilities in the modem. During all my tests, these were 10 seconds refresh rate, signal on, don't set supl
Code:
#
# $1 modem ID
# $2 GPS refresh rate in seconds
# $3 `signal` for activating signals, anything else for off
# $4 `supl` for activating supplemental servers, anything else for off
#
function set_gps_capabilities {
echo "setting GPS capabilities for modem $1"
mmcli -m "$1" \
--location-enable-agps-msb \
--location-enable-gps-nmea \
--location-enable-gps-raw
mmcli -m "$1" --location-set-gps-refresh-rate="$2"
if [[ "$3" == "signal" ]]; then
mmcli -m "$1" --location-set-enable-signal
fi
if [[ "$4" == "supl" ]]; then
mmcli -m "$1" --location-set-supl-server=xtrapath1.izatcloud.net:80
fi
mmcli -m "$1" --location-status
}
5) Go for a walk, open field, no obstructions.
Observations:
- location status usually reports this:
Code:
[manjaro@manjaro-arm ~]$ mmcli -m 0 --location-status
--------------------------------
Location | capabilities: 3gpp-lac-ci, gps-raw, gps-nmea, agps-msa, agps-msb
| enabled: 3gpp-lac-ci, gps-raw, gps-nmea, agps-msb
| signals: yes
--------------------------------
GPS | refresh rate: 10 seconds
| supported assistance: xtra
| assistance servers: http://xtrapath2.izatcloud.net/xtra3grc.bin
| http://xtrapath3.izatcloud.net/xtra3grc.bin
| http://xtrapath1.izatcloud.net/xtra3grc.bin
- location get has this to say:
Code:
[manjaro@manjaro-arm ~]$ sudo mmcli -m 0 --location-get
--------------------------
3GPP | operator code: 262
| operator name: 1
| location area code: FFFE
| tracking area code: 5222
| cell id: 01AC4800
--------------------------
GPS | nmea: $GPGSA,A,1,,,,,,,,,,,,,,,,*32
| $GPRMC,,V,,,,,,,,,,N*53
| $GPVTG,,T,,M,,N,,K,N*2C
| $GPGGA,125451.31,,,,,0,,,,,,,,*4C
- checking the NMEA stream for visible satellites, I get this:
Code:
sudo cat /dev/ttyUSB1 | grep GPGSV
$GPGSV,1,1,01,31,55,268,,1*5B
$GPGSV,1,1,01,31,55,268,,1*5B
$GPGSV,1,1,01,31,55,267,,1*54
$GPGSV,1,1,01,31,55,267,,1*54
$GPGSV,1,1,01,31,55,267,,1*54
I've tried this several times during the past week, but never got anything else than the samples above, i.e. no satellites, no GPS fix. I also checked with the Maps application, and that occasionally gives me a location. However, it's usually pretty far off the actual position (100 to 200m), and since GPS actually doesn't see satellites, I guess that's location via the cell towers.
Questions:
- Am I missing anything?
- In step 4, should I enable agps-msb, gps-nmea, and gps-raw via separate calls to mmcli, in that order?
- Has anyone found a reproducible procedure for reliably getting GPS location?
- Could there be a hardware failure? Has anyone experienced an actual broken GPS receiver?
- What kind of performance can we expect at best from the particular GPS receiver that's built into the modem?
Kind regards,
Alex