![]() |
|
Unsatisfactory GPS reception on PinePhone? - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120) +--- Forum: PinePhone Hardware (https://forum.pine64.org/forumdisplay.php?fid=122) +--- Thread: Unsatisfactory GPS reception on PinePhone? (/showthread.php?tid=11680) |
RE: Unsatisfactory GPS reception on PinePhone? - wibble - 12-16-2020 (12-16-2020, 08:23 AM)Benatti Wrote:Sorry if I misunderstand the question - I had to use google translate(12-15-2020, 06:55 AM)Benatti Wrote: Estive tentando habilitar gps no meu pinephone 32G emmc / 3G RAM e não funcionou, observei que quando uso um "gps usb dongle" nele aparece /dev/ttyACM0 e /dev/gps0 e os programas marble e foxtrotgps funcionam e sem o "gps usb dongle" nós temos /dev/ttyUSB1 (gps) mas não temos /dev/ttyS1. Parece que o /dev/ttyS1 está fazendo falta para o gpsd, sendo que a saída de gpsmon é quase a mesma com ou sem "gps usb dongle".esqueci de mencionar que estou usando mobian. I may have missed some changes to Mobian, so the information below may be out of date. I may also be wrong. Mobian normally uses ModemManager and Geoclue for location. It doesn't include configuration for gpsd on PinePhone so you would have to do that yourself. You would also need to stop ModemManager connecting to the gps port - something like: Code: mmcli -m 0 --location-disable-gps-nmea
mmcli -m 0 --location-enable-gps-unmanagedPostmarketOS used /etc/gpsd/device-hook to turn the gps on when needed. It may be possible to use this in Mobian to do this switching automatically when a client connects to gpsd. RE: Unsatisfactory GPS reception on PinePhone? - calinb - 12-16-2020 (12-16-2020, 08:23 AM)Benatti Wrote:(12-15-2020, 06:55 AM)Benatti Wrote: Estive tentando habilitar gps no meu pinephone 32G emmc / 3G RAM e não funcionou, observei que quando uso um "gps usb dongle" nele aparece /dev/ttyACM0 e /dev/gps0 e os programas marble e foxtrotgps funcionam e sem o "gps usb dongle" nós temos /dev/ttyUSB1 (gps) mas não temos /dev/ttyS1. Parece que o /dev/ttyS1 está fazendo falta para o gpsd, sendo que a saída de gpsmon é quase a mesma com ou sem "gps usb dongle".esqueci de mencionar que estou usando mobian. RE: Unsatisfactory GPS reception on PinePhone? - Benatti - 12-18-2020 (12-16-2020, 10:39 PM)calinb Wrote:(12-16-2020, 08:23 AM)Benatti Wrote:(12-15-2020, 06:55 AM)Benatti Wrote: Estive tentando habilitar gps no meu pinephone 32G emmc / 3G RAM e não funcionou, observei que quando uso um "gps usb dongle" nele aparece /dev/ttyACM0 e /dev/gps0 e os programas marble e foxtrotgps funcionam e sem o "gps usb dongle" nós temos /dev/ttyUSB1 (gps) mas não temos /dev/ttyS1. Parece que o /dev/ttyS1 está fazendo falta para o gpsd, sendo que a saída de gpsmon é quase a mesma com ou sem "gps usb dongle".esqueci de mencionar que estou usando mobian. Agradeço a atenção de todos, mas não consegui fazer funcionar ainda, vou continuar tentando e se funcionar aviso por aqui. RE: Unsatisfactory GPS reception on PinePhone? - calinb - 12-22-2020 (12-18-2020, 10:56 AM)Benatti Wrote:I am sorry it does not work for you. Based on mmcli commands, my phone GPS is not as sensitive as my other phones and it has trouble receiving sufficiently strong signals from satellites to find a position unless it has a very clear view of the sky. RE: Unsatisfactory GPS reception on PinePhone? - wibble - 12-22-2020 When checking basic GPS functionality I disabled ModemManager and used picocom to access the two USB serial ports - one with local echo enabled to send the AT commands to the modem, and the other to view the NMEA output. That way you see exactly what's going in and out, and don't have to worry about anything ModemManager may be hiding from you. RE: Unsatisfactory GPS reception on PinePhone? - calinb - 12-22-2020 (12-22-2020, 08:46 AM)wibble Wrote: When checking basic GPS functionality I disabled ModemManager and used picocom to access the two USB serial ports - one with local echo enabled to send the AT commands to the modem, and the other to view the NMEA output. That way you see exactly what's going in and out, and don't have to worry about anything ModemManager may be hiding from you.Thanks, wibble. I still haven't installed picocom or learned about it yet. Perhaps it might help me find a means of improvement. However, until a map program supports the caching of map data and not substituting an error screen for a perfectly good map screen just because of a glitch in location, I'm not too motivated. There are too many gaps in cellular data coverage where I live to make Linux ap maps useful and it's actually a problem throughout all of rural Idaho. I'm tired of using and supporting spy phones though so I'll just carry a dedicated GPS (even my old Garmin) when I need to know my location until things improve. RE: Unsatisfactory GPS reception on PinePhone? - wibble - 12-23-2020 You should investigate navit, or Pure Maps with the companion OSMScoutServer for caching map data, but both require a bit of manual configuration still. There's a fair bit on navit in this thread: https://forum.pine64.org/showthread.php?tid=10697 RE: Unsatisfactory GPS reception on PinePhone? - Benatti - 12-24-2020 (12-22-2020, 04:14 AM)calinb Wrote:Olá pessoal, finalmente o gps do pinephone está funcionando, vamos ao passo a passo:(12-18-2020, 10:56 AM)Benatti Wrote:I am sorry it does not work for you. Based on mmcli commands, my phone GPS is not as sensitive as my other phones and it has trouble receiving sufficiently strong signals from satellites to find a position unless it has a very clear view of the sky. 1 Instalei kde-marble, foxtrotgps, gpsd e gpsd-clients. 2 Editei o arquivo com o comando: sudo nano /etc/default/gpsd para ficar como assim: # Devices gpsd should collect to at boot time. # They need to be read/writeable, either by user gpsd or the group dialout. DEVICES="$GPS_LINE /dev/ttyUSB1" # Other options you want to pass to gpsd GPSD_OPTIONS="" # Automatically hot add/remove USB GPS devices via gpsdctl USBAUTO="true" GPS_LINE=/dev/ttyUSB1 Nos testes que eu fiz, demorou bastante para funcionar a primeira vez, e constatei que com o celular exposto ao sol ele pega sinal mais rapido, parece que com o aquecimento do aparelho ele melhora a sensibilidade, quando o aparelho está frio não pegou sinal de satélite. Não é preciso realizar os comandos : sudo mmcli -m 0 --location-enable-agps-msb sudo mmcli -m 0 --location-enable-gps-raw sudo mmcli -m 0 --location-enable-gps-nmea sudo mmcli -m 0 --location-get sudo mmcli -m 0 --location-status Sem acionar estes comandos foi só abrir o programa navegador de gps, eu testei tanto com marble quanto foxtrotgps e depois de algum tempo funcinou normalmente. Sugiro o marble, parece que esta mais maduro. Consegui marcar ponto de saida e ponto de chegada, definir rota, ele realça a rota no mapa e falta viajar para teste de estrada com ele, mas isto vai demorar. Voce pode usar o cabo serial/usb e monitorar no notebook com o programa cgps ou gpsmon no terminal, para verificar o andamento do processo de descoberta de satélites do gpsd. Abraços, e boa passagem de ano a todos. RE: Unsatisfactory GPS reception on PinePhone? - calinb - 12-27-2020 (12-24-2020, 11:40 AM)Benatti Wrote:(12-22-2020, 04:14 AM)calinb Wrote:Olá pessoal, finalmente o gps do pinephone está funcionando, vamos ao passo a passo:(12-18-2020, 10:56 AM)Benatti Wrote:I am sorry it does not work for you. Based on mmcli commands, my phone GPS is not as sensitive as my other phones and it has trouble receiving sufficiently strong signals from satellites to find a position unless it has a very clear view of the sky. I am happy to hear it is working! Thanks for the report. Very interesting about the cold. It was cold outside (Idaho, USA winters...brrrr) when I had problems too.(12-23-2020, 06:42 PM)wibble Wrote: You should investigate navit, or Pure Maps with the companion OSMScoutServer for caching map data, but both require a bit of manual configuration still. There's a fair bit on navit in this thread:Thanks for the link, wibble! RE: Unsatisfactory GPS reception on PinePhone? - xelalex - 01-06-2021 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. 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*54I'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 |