Db820c : GPS not working on linux

Any update on GPS in DB820c Debian?
Can someone give pointers to debug this further?

@ndec
@Loic

Thanks,
Arun

Hello Team,

Any update on GPS in DB820c?

@Loic
@ndec

Thanks,
Arun

Hi,
Any update on GPS support on Dragonboard 820c?
Thanks,
Ashik

AFAIK, there is no plan for now.

I have tried to rebuild gpsd & after having replaced all new set of binaries (gpsd,cgps,gpsmon the systemd service & socket file also lib*.so files) to respective locations.
I found that in gpsd.service:

After=chronyd.service

But there is no such service:

systemctl status chronyd
Unit chronyd.service could not be found.

Is it the error causing gpsd service not to function properly??
I even tried reloading service with:
After=network-manager.service

This loaded /usr/bin/gpsd , still no luck with NMEA strings…
Any suggestions ?? Thanks in advance…

Hi all,

I have obtained NMEA strings working :smiley: with the updates in gpsd…
Its taking 10-20min to get proper location fix for first time. Until then it prints only PRN’s (noises).
The concerns I have are regarding effectiveness…

  1. Does gpsd have any methods to improve accuracy like in Android ?
  2. Are there any other daemons to test NMEA strings having GPS location ? (tried gpsmon, xgps & cgps all of these work on gpsd & take longer time to get location fix)…

There is nothing in Android that will improve the accuracy of GPS data.
Speed, perhaps, since most GPS HALs in Android will implement AGPS to reduce the time it takes to get a first fix, but the accuracy itself will be unaffected.

Without some kind of assistance data, 10-20 minutes for first fix seems like it could be perfectly reasonable, especially if the conditions are less than ideal, such as using a passive PCB antenna, or trying to use it from inside a building.

The last time I looked deeply at gpsd (several months ago when I wrote its Android HAL, which you will now find in gpsd’s android/ path), it didn’t implement any form of AGPS.

Hi, @ymj

I am also trying GPS with Debian (http://snapshots.linaro.org/96boards/dragonboard820c/linaro/debian/384/) release but have no success. I followed below steps:

sudo apt-get update
sudo apt-get install gnss-gpsd
sudo apt-get install qdsp-start

systemctl start gpsd
gpsdctl add /dev/ttyGPS0
OR
gpsdctl add pds://any

gpsmon

gpsmon output:

tcp://localhost:2947          JSON slave driver>
(82) {"class":"VERSION","release":"3.17","rev":"3.17","proto_major":3,"proto_min
or":12}
(172) {"class":"DEVICES","devices":[{"class":"DEVICE","path":"/dev/ttyGPS0","act
ivated":"2019-11-11T11:12:15.398Z","native":0,"bps":9600,"parity":"N","stopbits"
:1,"cycle":1.00}]}
(122) {"class":"WATCH","enable":true,"json":false,"nmea":false,"raw":2,"scaled":
false,"timing":false,"split24":false,"pps":true} 

Below is the output of Required service status:

root@linaro-alip:~# systemctl status qdsp-start
● qdsp-start.service - Start the Hexagon QDSP
Loaded: loaded (/lib/systemd/system/qdsp-start.service; enabled; vendor prese
Active: inactive (dead) since Mon 2019-11-11 10:45:35 UTC; 23min ago
Process: 2137 ExecStart=/usr/sbin/qdsp-start (code=exited, status=0/SUCCESS)
Main PID: 2137 (code=exited, status=0/SUCCESS)

root@linaro-alip:~# systemctl status gpsd
● gpsd.service - GPS (Global Positioning System) Daemon
Loaded: loaded (/lib/systemd/system/gpsd.service; disabled; vendor preset: en
Active: active (running) since Mon 2019-11-11 11:11:15 UTC; 2s ago
Process: 2712 ExecStart=/usr/sbin/gpsd $GPSD_OPTIONS $DEVICES (code=exited, st
Main PID: 2713 (gpsd)
Tasks: 1 (limit: 4445)
Memory: 1000.0K
CGroup: /system.slice/gpsd.service
└─2713 /usr/sbin/gpsd
root@linaro-alip:~#

root@linaro-alip:~# systemctl status gpsd.socket
● gpsd.socket - GPS (Global Positioning System) Daemon Sockets
Loaded: loaded (/lib/systemd/system/gpsd.socket; enabled; vendor preset: enab
Active: active (listening) since Mon 2019-11-11 10:45:34 UTC; 25min ago
Listen: /var/run/gpsd.sock (Stream)
[::1]:2947 (Stream)
127.0.0.1:2947 (Stream)
CGroup: /system.slice/gpsd.socket
root@linaro-alip:~#

What am i missing something here? can you please tell me what steps you followed to start GPS

Thanks,
Hiren

The NMEA strings where obtained after a lot of trials. According to me, major change I had to do was:

  1. To clone in latest gpsd sources which has pds support. Replace them with existing gpsd & gpsdctl.
  2. To test in proper environment(clear space) which helps by a large-factor.

I believe that guys in this forum had done a great job in helping me throughout. I have no idea why qpsd-start service is used,so forum members should be right people to solve the queries.Thanks…

hi,

i tried this release http://snapshots.linaro.org/96boards/dragonboard820c/linaro/debian/384/

i do not see this device in my build , please suggest
/dev/ttyGPS0

root@linaro-alip:~# ls /dev/tty
tty tty18 tty28 tty38 tty48 tty58 ttyMSM0 ttypa
tty0 tty19 tty29 tty39 tty49 tty59 ttyp0 ttypb
tty1 tty2 tty3 tty4 tty5 tty6 ttyp1 ttypc
tty10 tty20 tty30 tty40 tty50 tty60 ttyp2 ttypd
tty11 tty21 tty31 tty41 tty51 tty61 ttyp3 ttype
tty12 tty22 tty32 tty42 tty52 tty62 ttyp4 ttypf
tty13 tty23 tty33 tty43 tty53 tty63 ttyp5 ttyS0
tty14 tty24 tty34 tty44 tty54 tty7 ttyp6 ttyS1
tty15 tty25 tty35 tty45 tty55 tty8 ttyp7 ttyS2
tty16 tty26 tty36 tty46 tty56 tty9 ttyp8 ttyS3
tty17 tty27 tty37 tty47 tty57 tty96B1 ttyp9
root@linaro-alip:~# ls /dev/tty

regards,
vinaysimha

hi,

i am trying to build gpsd , but it is failing, please suggest

https://pastebin.com/6sV2233y

sudo apt remove gnss-gpsd
git clone https://github.com/andersson/gpsd
cd gpsd
sudo apt-get install python-dev scons -y
scons && scons check && sudo scons udev-install

regards,
vinaysimha

Try older snapshots : like 362 in my case.
Are you able to sucessfully install : sudo apt-get install python-dev scons -y
Put in complete logs for overall steps followed.

scons check might be failed, so apply command individually and after sudo scons udev-install you will get compiled gpsd at /usr/share/sbin/gpsd

Replace/usr/sbin/gpsd with this compiled gpsd and after that perform command to test GPS.

sudo apt-get update
sudo apt-get install gnss-gpsd
sudo apt-get install qdsp-start

git clone https://github.com/andersson/gpsd
cd gpsd
sudo apt-get install python-dev scons -y
scons && sudo scons udev-install

sudo cp gpsd /usr/sbin/gpsd

systemctl start gpsd
gpsdctl add /dev/ttyGPS0

@ymj
i am using 362 snapshots
root@linaro-alip:~# systemctl status qdsp-start
● qdsp-start.service - Start the Hexagon QDSP
Loaded: loaded (/lib/systemd/system/qdsp-start.service; enabled; vendor prese
Active: inactive (dead)

Dec 10 15:55:53 linaro-alip systemd[1]: Dependency failed for Start the Hexagon

root@linaro-alip:~# systemctl status gpsd
● gpsd.service - GPS (Global Positioning System) Daemon
Loaded: loaded (/lib/systemd/system/gpsd.service; disabled; vendor preset: en
Active: active (running) since Tue 2019-12-10 16:04:05 IST; 2min 18s ago
Process: 2447 ExecStart=/usr/sbin/gpsd $GPSD_OPTIONS $OPTIONS $DEVICES (code=e
Main PID: 2448 (gpsd)
Tasks: 1 (limit: 4447)
Memory: 1.0M
CGroup: /system.slice/gpsd.service
└─2448 /usr/sbin/gpsd

Dec 10 16:05:23 linaro-alip gpsd[2448]: gpsd:ERROR: SER: device open of /dev/tty
Dec 10 16:05:23 linaro-alip gpsd[2448]: gpsd:ERROR: SER: read-only device open o
Dec 10 16:05:23 linaro-alip gpsd[2448]: gpsd:ERROR: /dev/ttyGPS0: device activat
Dec 10 16:05:23 linaro-alip gpsd[2448]: gpsd:ERROR: /dev/ttyGPS0: activation fai
lines 1-14/14 (END)

$gpsmon
tcp://localhost:2947 JSON slave driver>
(117) {“class”:“VERSION”,“release”:“3.18~dev”,“rev”:“3.18~dev-2019-12-10T10:11:5
4.527852”,“proto_major”:3,“proto_minor”:12}
(32) {“class”:“DEVICES”,“devices”:[]}
(122) {“class”:“WATCH”,“enable”:true,“json”:false,“nmea”:false,“raw”:2,“scaled”:
false,“timing”:false,“split24”:false,“pps”:true}

please suggest.

regards,
vinaysimha

use below command instead. After that you might see gpsmon working but no satellite in view in my case.
gpsdctl add pds://any

it tried any , but it failed.

linaro@linaro-alip:~/gpsd$ systemctl status qdsp-start
● qdsp-start.service - Start the Hexagon QDSP
Loaded: loaded (/lib/systemd/system/qdsp-start.service; enabled; vendor prese
Active: inactive (dead) since Wed 2019-12-11 10:47:07 UTC; 3min 33s ago
Main PID: 4361 (code=exited, status=0/SUCCESS)

linaro@linaro-alip:~/gpsd$ systemctl status gpsd
● gpsd.service - GPS (Global Positioning System) Daemon
Loaded: loaded (/lib/systemd/system/gpsd.service; disabled; vendor preset: en
Active: active (running) since Wed 2019-12-11 10:49:25 UTC; 1min 24s ago
Process: 4727 ExecStart=/usr/sbin/gpsd $GPSD_OPTIONS $OPTIONS $DEVICES (code=e
Main PID: 4728 (gpsd)
Tasks: 1 (limit: 4447)
Memory: 352.0K
CGroup: /system.slice/gpsd.service
└─4728 /usr/sbin/gpsd
Dec 11 10:50:19 linaro-alip gpsd[4728]: gpsd:ERROR: QRTR open: No PDS service found.
Dec 11 10:50:19 linaro-alip gpsd[4728]: gpsd:ERROR: pds://any: device activation failed.
Dec 11 10:50:19 linaro-alip gpsd[4728]: gpsd:ERROR: pds://any: activation failed, freeing device

linaro@linaro-alip:~/gpsd$ systemctl status gpsd.socket
● gpsd.socket - GPS (Global Positioning System) Daemon Sockets
Loaded: loaded (/lib/systemd/system/gpsd.socket; enabled; vendor preset: enab
Active: active (running) since Thu 2019-02-14 10:12:00 UTC; 9 months 26 days
Listen: /var/run/gpsd.sock (Stream)
[::1]:2947 (Stream)
127.0.0.1:2947 (Stream)
Tasks: 0 (limit: 4447)
Memory: 0B
CGroup: /system.slice/gpsd.socket

linaro@linaro-alip:~/gpsd$

@ymj

could you please share your dmesg and working gps-gpsmon screenshot to check what is failing in my case.

outputs of these commands
systemctl status qdsp-start
systemctl status gpsd
systemctl status gpsd.socket

regards,
vinaysimha

@ymj @Loic @bamse

if i use 362 snapshot userspace it ends with remoteproc remoteproc0: crash detected in 2080000.remoteproc: type fatal error , board reboots,

did you face the same issue.

if we use latest userspace 407/430 snapshot, remoteproc reboot will not come. But these snapshot have intermittent userpace problem mesa moved to different versions

is there anything other than gpsd-src dependency wrt userspace for gps/remoteproc?

intermittent crashes observed, any suggestion how to debug this issue.

[ 52.471278] qcom-q6v5-pil 2080000.remoteproc: fatal error without message
[ 52.471356] remoteproc remoteproc1: crash detected in 2080000.remoteproc: type fatal error
[ 52.477262] remoteproc remoteproc1: handling crash #1 in 2080000.remoteproc
[ 52.485339] remoteproc remoteproc1: recovering 2080000.remoteproc
[ 54.271408] qcom-q6v5-pil 2080000.remoteproc: watchdog without message
[ 54.271488] remoteproc remoteproc1: crash detected in 2080000.remoteproc: type watchdog
[ 57.570020] qcom-q6v5-pil 2080000.remoteproc: failed receiving QMI response
[ 62.690009] qcom-q6v5-pil 2080000.remoteproc: timed out on wait
[ 62.701091] remoteproc remoteproc1: stopped remote processor 2080000.remoteproc
[ 62.762008] qcom-q6v5-pil 2080000.remoteproc: MBA booted, loading mpss

regards,
vinaysimha

As per my knowledge I have disabled auto loading of qcom,q6v5-pil
patch is here:

drivers/remoteproc/qcom,q6v5-pil.c +1136:

++ rproc->auto_boot = false;

qproc = (struct q6v5 *)rproc->priv;

While system reboot or shutdown, we cant stop the process adsprpcd running on qcom,adsp-pil.
So, this fixes your issue of not loading mba.mbn on boot-up, but causing remoteproc driver crash.

@ndec
@danielt
@Loic
@bamse
GPS fix taking 20-30 minutes after every reboot. Is it possible to store fix in modem_fs1,modem_fs2,modem_fsc and modem_fsg and use it for successive boots?

Thanks,
Arun