Unsatisfactory GPS reception on PinePhone?
#1
When looking at the results of GPS reception by typing in the console
Code:
mmcli -m 0 --location-enable-gps-nmea # Once only
mmcli -m 0 --location-get             # Many times
I get a maximum of 3 satellites even when absolutely no obstacle present and no clouds at the sky.
This command does not report any fix even after 30 minutes trial.

Is this the adequate method and what are your experiences?
  Reply
#2
It's hugely better if you use AGPS, which pretty much every smartphone does most of the time. If you're using Mobian you can try the proof of concept python script to fetch the AGPS data and load it into the modem:
https://gist.github.com/alastair-dm/2632...e555fa6628
If you're using a different distro you'll need to tweak it somewhat. ModemManager (as used by Phosh) gets most of its Quectel modem support from its generic Qualcom interface, but the AGPS part of that seems not to work with this modem - at least it hasn't when I've tried it. Using the Quectel AT commands as in the script does work, and gets a much faster and more stable fix than without the assistance data.

The unassisted performance isn't good, somewhat worse than an unassisted Garmin Geko or the old OpenMoko GTA02 doing a cold start. I suspect this is largely down to the antenna required to fit in the modern smartphone hardware, but there may be an unidentified interference issue similar to the early days of the GTA02. Whatever the cause, a marginal signal to noise ratio is a problem in an unassisted cold start as any interruption in the slow collection of the data from the sat signal means restarting collection. A small difference in signal makes the difference between a lock in ~2min and not getting one at all (or at least until the sats move into an advantageous position). The AGPS sidesteps this by downloading the necessary data from the internet.

I'm surprised you only get 3 sats though - I usually see more than that, but it does vary with the sat positions especially with the buildings around here. I've sometimes had no fix in 30 minutes, and sometimes got one in <2. I've not tied an unassisted cold start with another modern phone - they don't usually have an option to disable the AGPS. You'd need to remove network access and have the GPS disabled for long enough for any stored data to expire - 4hrs for ephemeris, up to 2 weeks for almanac - to make an apples-to-apples comparison.
  Reply
#3
(09-30-2020, 12:21 PM)wibble Wrote: It's hugely better if you use AGPS, which pretty much every smartphone does most of the time. If you're using Mobian you can try the proof of concept python script to fetch the AGPS data and load it into the modem:
https://gist.github.com/alastair-dm/2632...e555fa6628
Thanks for this help. With AGPS I got a fix within a few minutes and GPS reception works as expected Wink
  Reply
#4
(10-01-2020, 05:30 AM)LinAdmin2 Wrote:
(09-30-2020, 12:21 PM)wibble Wrote: It's hugely better if you use AGPS, which pretty much every smartphone does most of the time. If you're using Mobian you can try the proof of concept python script to fetch the AGPS data and load it into the modem:
https://gist.github.com/alastair-dm/2632...e555fa6628
Thanks for this help. With AGPS I got a fix within a few minutes and GPS reception works as expected Wink

Just wanted to report I am unable to get a fix on my new pinephone manjaro ce edition.
I've installed the updated modem firmware from https://forum.pine64.org/showthread.php?tid=11815 so I have "EG25GGBR07A08M2G_01.002.07"
As well as the AGPS fix mentioned in this thread as can be seen from the assistance server output in the console output I've included below.

Code:
[root@manjaro-arm ~]# mmcli -m 0 --location-status
Code:
  --------------------------------
Code:
  Location |        capabilities: 3gpp-lac-ci, gps-raw, gps-nmea, agps-msa, agps-msb
Code:
          |              enabled: 3gpp-lac-ci, gps-nmea
Code:
          |              signals: no
Code:
  --------------------------------
Code:
  GPS      |        refresh rate: 5 seconds
Code:
          | supported assistance: xtra
Code:
          |  assistance servers: http://xtrapath1.izatcloud.net/xtra3grc.bin
Code:
          |                      http://xtrapath2.izatcloud.net/xtra3grc.bin
Code:
          |                      http://xtrapath3.izatcloud.net/xtra3grc.bin
Code:
[root@manjaro-arm ~]# mmcli -m 0 --location-get
Code:
  --------------------------
Code:
  3GPP |      operator code: XXXX
Code:
      |      operator name: XX
Code:
      | location area code: XXXX
Code:
      | tracking area code: XXXX
Code:
      |            cell id: XXXXXXXX
Code:
  --------------------------
Code:
  GPS  |              nmea: $GPGSA,A,1,,,,,,,,,,,,,,,,*32
Code:
      |                    $GPRMC,,V,,,,,,,,,,N*53
Code:
      |                    $GPGSV,3,1,10,01,,,,02,,,,03,,,,06,,,,1*61
Code:
$GPGSV,3,2,10,10,31,210,,12,33,042,,15,,,,16,,,,1*62
Code:
$GPGSV,3,3,10,17,,,,18,,,,1*6A
Code:
      |                    $GPVTG,,T,,M,,N,,K,N*2C
Code:
      |                    $GPGGA,072623.52,,,,,0,,,,,,,,*4D

I've tried waiting for a number of hours and based on what I can understand from the output on the GPGSV line it looks like it's tracking 10 satellites with varying degrees of signal strength. I'm unsure why it's unable to get a fix though.

Is anyone else having difficulties, or does anyone have any other tips?
Thanks!
  Reply
#5
Tracking sats for a long time without getting a fix is not unusual if you haven't loaded the AGPS data. There's more about this in the mobian wiki:
https://wiki.mobian-project.org/doku.php?id=location
Can you post the output from the AGPS uploader script? I assume you're aware that it needs to be run every time you need a GPS cold start, not just once.
  Reply
#6
(11-27-2020, 06:30 AM)wibble Wrote: Tracking sats for a long time without getting a fix is not unusual if you haven't loaded the AGPS data. There's more about this in the mobian wiki:
https://wiki.mobian-project.org/doku.php?id=location
Can you post the output from the AGPS uploader script?  I assume you're aware that it needs to be run every time you need a GPS cold start, not just once.
I wasn't aware that I needed to run the script every time I was doing a cold start. It makes sense though as otherwise the data wouldn't be up to date.
Running the script didn't appear to make any difference in the ability to obtain a fix.
I've included the full output below from the script I used to disable the modem service, run the python script, re-enable the modem, and then finally enable nmea on the modem.


Quote:[root@manjaro-arm ~]# mmcli -m 0 --location-get
  --------------------------
  3GPP |      operator code: XXX
      |      operator name: XXX
      | location area code: XXXX
      | tracking area code: XXXX
      |            cell id: XXXXXXXX
[root@manjaro-arm ~]# mmcli -m 0 --location-status
  --------------------------------
  Location |        capabilities: 3gpp-lac-ci, gps-raw, gps-nmea, agps-msa, agps-msb
          |              enabled: 3gpp-lac-ci
          |              signals: no
  --------------------------------
  GPS      |        refresh rate: 30 seconds
          | supported assistance: xtra
          |  assistance servers: http://xtrapath3.izatcloud.net/xtra3grc.bin
          |                      http://xtrapath1.izatcloud.net/xtra3grc.bin
          |                      http://xtrapath2.izatcloud.net/xtra3grc.bin
[root@manjaro-arm ~]# ./start_gps.sh
Removed /etc/systemd/system/multi-user.target.wants/ModemManager.service.
Removed /etc/systemd/system/dbus-org.freedesktop.ModemManager1.service.
open serial port
Check modem will talk to us
AT
[b'\r\n', b'OK\r\n']
Is GPS turned on?
AT+QGPS?
[b'\r\n', b'+QGPS: 0\r\n', b'\r\n', b'OK\r\n']
Turn off GPS
AT+QGPSEND
[b'\r\n', b'+CME ERROR: 505\r\n']
Is AGPS enabled?
AT+QGPSXTRA?
[b'\r\n', b'+QGPSXTRA: 1\r\n', b'\r\n', b'OK\r\n']
Precautionary enabling of AGPS
AT+QGPSXTRA=1
[b'\r\n', b'OK\r\n']
Is valid AGPS data already loaded?
AT+QGPSXTRADATA?
[b'\r\n', b'+QGPSXTRADATA: 0,"1980/01/05,19:00:00"\r\n', b'\r\n', b'OK\r\n']
download status:  200
delete previous AGPS data file
AT+QFDEL="RAM:xtra.bin"
[b'\r\n', b'+CME ERROR: 418\r\n']
upload new AGPS data
AT+QFUPL="RAM:xtra.bin",38653
[b'\r\n', b'CONNECT\r\n']
[b'+QFUPL: 38653,e3a4\r\n', b'\r\n', b'OK\r\n']
set current UTC time using local system time
AT+QGPSXTRATIME=0,"2020/11/28,00:45:58"
[b'\r\n', b'OK\r\n']
set AGPS data to file we uploaded
AT+QGPSXTRADATA="RAM:xtra.bin"
[b'\r\n', b'OK\r\n']
what does it day about data validity now?
AT+QGPSXTRADATA?
[b'\r\n', b'+QGPSXTRADATA: 0,"1980/01/05,19:00:00"\r\n', b'\r\n', b'OK\r\n']
NOTE: it's given us the same response as before, despite having new data uploaded
enable gps
AT+QGPS=1
[b'\r\n', b'OK\r\n', b'\r\n', b'+QGPSURC: "xtradataexpire",0,"1980/01/05,19:00:00"\r\n']
close serial port
Created symlink /etc/systemd/system/dbus-org.freedesktop.ModemManager1.service → /usr/lib/systemd/system/ModemManager.service.
Created symlink /etc/systemd/system/multi-user.target.wants/ModemManager.service → /usr/lib/systemd/system/ModemManager.service.
successfully setup location gathering
[root@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-nmea
          |              signals: no
  --------------------------------
  GPS      |        refresh rate: 30 seconds
          | supported assistance: xtra
          |  assistance servers: http://xtrapath3.izatcloud.net/xtra3grc.bin
          |                      http://xtrapath1.izatcloud.net/xtra3grc.bin
          |                      http://xtrapath2.izatcloud.net/xtra3grc.bin
*** waited around 10 minutes ***
[root@manjaro-arm ~]# mmcli -m 0 --location-get
  --------------------------
  3GPP |      operator code: XXX
      |      operator name: XXX
      | location area code: XXXX
      | tracking area code: XXXX
      |            cell id: XXXXXXXX
  --------------------------
GPS  |              nmea:
      |                    $GPGSV,3,1,10,02,45,167,,05,64,036,,06,03,149,,07,12,040,,1*6F
$GPGSV,3,2,10,09,,,,12,,,,13,76,278,,15,38,254,,1*6C
$GPGSV,3,3,10,16,,,,18,10,319,,1*51
      |                    $GPGSA,A,1,,,,,,,,,,,,,,,,*32
      |                    $GPRMC,,V,,,,,,,,,,N*53
      |                    $GPVTG,,T,,M,,N,,K,N*2C
      |                    $GPGGA,,,,,,0,,,,,,,,*66

As an aside I ran into someone on reddit who seemed to think it might be a hardware issue. I'm not entirely sure though if that's the case for my phone.
https://www.reddit.com/r/PinePhoneOffici...atellites/
  Reply
#7
You need to enable agps first, then gps-raw then gps-nmea. The detail are somewhere in this forum
HTH
LF
  Reply
#8
My script is based on the process described in the Quectel docs. I thought these were already in the wiki but apparently not:
https://www.quectel.com/UploadImage/Down...l_V1.0.pdf
https://sixfab.com/wp-content/uploads/20...l_V1.1.pdf

The 'CME ERROR: 505' is because the GPS is already off.
The 'CME ERROR: 418' is a failure to delete the file, which suggests it's the first time you've run the script since a modem reset.

I don't see anything obviously wrong, although it seems I didn't paste the output into my notes so I'm going from memory. How good is your view of the sky? I was testing from indoors by a window, and it was usually hard to get a fix without AGPS. With AGPS it was often very quick, but not always. When I was testing I kept modemmanager disabled and used picocom to access the serial devices directly.

I can't comment with certainty on a potential hardware error on the 1.2a boards as I only have a 1.1, but there's no mention of changes to the GPS antenna board layout.
  Reply
#9
(11-28-2020, 09:53 AM)Lousy Fisherman Wrote: You need to enable agps first, then gps-raw then gps-nmea. The detail are somewhere in this forum
HTH
LF

I tried doing this and waiting 10 seconds in between enabling each, it didn't effect the end result I was still unable to obtain a lock/fix on a single satellite, let along enough to actually acquire my location. I'm going to troubleshoot with a friend who also has the phone and see if they can get it working, then I can copy there configuration and see if mine is a hardware issue or something else. Thanks for your tips though, any one else with other tips is more very welcome to suggest.

By the way there are two agps modes, agps-msa and agps-msb, which one are you enabling and using?

(11-28-2020, 11:49 AM)wibble Wrote: My script is based on the process described in the Quectel docs. I thought these were already in the wiki but apparently not:
https://www.quectel.com/UploadImage/Down...l_V1.0.pdf
https://sixfab.com/wp-content/uploads/20...l_V1.1.pdf

The 'CME ERROR: 505' is because the GPS is already off.
The 'CME ERROR: 418' is a failure to delete the file, which suggests it's the first time you've run the script since a modem reset.

I don't see anything obviously wrong, although it seems I didn't paste the output into my notes so I'm going from memory. How good is your view of the sky? I was testing from indoors by a window, and it was usually hard to get a fix without AGPS. With AGPS it was often very quick, but not always. When I was testing I kept modemmanager disabled and used picocom to access the serial devices directly.

I can't comment with certainty on a potential hardware error on the 1.2a boards as I only have a 1.1, but there's no mention of changes to the GPS antenna board layout.

Thanks for the comment, perhaps once I am more familiar I will feel more comfortable to use picocom to interact with them directly instead of using modem manmager.
I contacted pine microsystems about the post on https://www.reddit.com/r/PinePhoneOffici...atellites/ and they said that there shouldn't be any hardware issue "Please to inform that we had confirmed with design engineer is the GNSS ant suppose short to ground and this is normal behavior."
So if there is some hardware issue it is most likely internal to the modem module itself in my case, I will need to diagnose further. Thanks for your feedback.
  Reply
#10
So far as I can tell ModemManager is treating the modem as a generic Qualcom device via QMI for many purposes, including its AGPS capability, rather than using the Quectel AT commands. I did try enabling AGPS using ModemManager's commands, and the URLs it provides, but either it doesn't work with the Quectel modem or I didn't use it correctly. You'll see that the URLs are similar to, but not quite the same as, the ones in Quectel's documentation, and the data they return isn't the same.

If you do use picocom (or whatever other serial terminal you prefer) you'll need to turn on local echo for the terminal sending commands, otherwise you won't be able to see what you're sending.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  various tricks to open the pinephone shengchieh 2 521 03-23-2024, 09:27 AM
Last Post: Ferriah
  pinephone can provide more than 500mA to a usb-c displayport device? unrznbl 2 157 03-21-2024, 08:52 AM
Last Post: unrznbl
  my pinephone melted norayr 2 410 02-26-2024, 04:53 PM
Last Post: tllim
  pinephone keyboard + dock question tuxcall 7 2,447 02-05-2024, 03:17 PM
Last Post: wigan
  PinePhone Pro not booting (Cap error!, pctl timeout) jealda 2 1,199 11-16-2023, 05:03 AM
Last Post: DrYak
  Pinephone frame damages Uturn 2 781 10-23-2023, 02:49 AM
Last Post: Uturn
  PinePhone Keyboard KJ6OHG 11 7,602 08-23-2023, 03:25 AM
Last Post: Kali
  PinePhone constantly vibrating and won't take charge ImmyChan 5 5,197 07-23-2023, 03:49 PM
Last Post: kb-zealot
  Using optical drives with Pinephone cdforever 2 1,047 07-18-2023, 01:28 PM
Last Post: cdforever
  Pinephone - broken power button rorus 10 8,820 05-18-2023, 09:11 AM
Last Post: kbm

Forum Jump:


Users browsing this thread: 2 Guest(s)