Db820c : GPS not working on linux

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.

@anon91830841
@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

I can confirm that I’m seeing the same behavior on mainline, that the modem (2080000.remoteproc) crashes continuously, if I let the adsp start (i.e. the firmware is present). I remember seeing this problem in the past, but I know it has been possible to boot them both at the same time.

Note that this behavior is slightly different from the one ymj refers to, which results in a “no reason” crash every 40 seconds.

Regards,
Bjorn

In my case satellite in view is coming in GPGSV but no location fix in GPGGA. I have tried to run gpsmon more that 30 minutes but not able to fix the GPS.

Can you please tell me which firmware binaries you are using in /lib/firmware?

I am using https://releases.linaro.org/96boards/dragonboard820c/qualcomm/firmware/linux-board-support-package-r01700.1.zip
and copied modem related binaries in my /lib/firmware.

I am using same modem binaries, https://releases.linaro.org/96boards/dragonboard820c/qualcomm/firmware/linux-board-support-package-r01700.1.zip

  1. Is mba.mbn loaded? check status,
    #cat /sys/devices/platform/soc/2080000.remoteproc/remoteproc/remoteproc0/state

  2. Use latest gpsd from, https://github.com/andersson/gpsd

Thanks,
Arun

Hi,

  1. Yes, mba.mbn is loaded successfully. I have checked it using this command and state is running.

  2. I am already using https://github.com/andersson/gpsd

I have followed below steps:

  • Copy all firmware files from linux-board-support-package-r01700.1 to /lib/firmware.

  • Cloning gpsd source from https://github.com/andersson/gpsd

    • git clone https://github.com/andersson/gpsd.git
    • apt-get install scons python-dev -y
    • scons && scons check && sudo scons udev-install (We got “Qualcomm PDS has event hook but no send” error while scons check)
  • Copy compiled gpsd file: cp /usr/local/sbin/gpsd /usr/sbin/

  • $ echo start > /sys/devices/platform/soc/2080000.remoteproc/remoteproc/remoteproc1/state

  • $ systemctl start gpsd

  • $ /usr/sbin/gpsdctl add pds://any

  • $ gpsmon

After that satellite view is coming but location is not getting fixed.

Thank,
Hiren

copy both gpsd and gpsdctl
All steps seems correct. check outside with clear sky. sometimes it will take more than 30 minutes to get fix.

For quicker fix, LNA circuit is required.

Thanks,
Arun

Thanks for this suggestion. It worked. i am able to start the modem at userspace, not seeing any remoteproc crash.

regards,
vinaysimha

gps fix will be very rare. But we always get the channels and PRN. S/N never goes above 30. Is it possible to get the gps lat/long fix though signal strenth is <30 also?

regards,
vinaysimha

use LNA(Low noise amplifier) for faster fix.

Thanks,
Arun

On the same board and location in android we get the fix. But in the linux s/n is <30.

can we fix this in software LNA?

regards,
vinaysimha

Could you explain to me by what means you are getting gps in Android?

GPS fix lat and long in android on the same board and same location.

But same board and same location in Linux using gpsmon not able to get the fix, satellites are available and <30 s/n. As attached the screenshot in the above discussion.

That is not what I asked.
I asked you by what means, as in HOW did you get GPS on android?

By using gpstest.apk, Android Nougat 7.1.1

Let me be more blunt then.
There is no functioning GPS at all on android on dragonboard 820c.

And not only that, but there is no android 7.1 for it. If you build AOSP, what you get is approximately android 10.