Unable To Get GPS Working - Linaro Debian #260-8165c999


#1

In my current project, I want to use a headless linux setup to post GPS co-ordinates to an API that I’m yet to build. I’ve been following the documentation at 96boards GitHub repository and I’ve got my Dragonboard 410c booting linux.

From what I’ve gleaned in the release notes, per the Using the onboard GPS documentation, I should be able to install the necessary packages, turn on the DSP and access the GPS information.

However, all attempts at turning on the DSP has returned an error. Here is some additional info:

linaro@linaro-alip:~$ uname -a

Linux linaro-alip 4.9.39-linaro-lt-qcom #1 SMP PREEMPT Wed Aug 2 14:44:02 UTC 2017 aarch64 GNU/Linux

linaro@linaro-alip:~$ lsb_release -a

No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.2 (stretch)
Release:        9.2
Codename:       stretch

root@linaro-alip:~# apt-get install gnss-gpsd gpsd gpsd-clients

Reading package lists... Done
Building dependency tree       
Reading state information... Done
gpsd is already the newest version (3.16-4).
gpsd-clients is already the newest version (3.16-4).
gnss-gpsd is already the newest version (0.0+0+df3b976-6).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

root@linaro-alip:~# systemctl start qdsp-start.service

Job for qdsp-start.service failed because the control process exited with error code.
See "systemctl status qdsp-start.service" and "journalctl -xe" for details.

root@linaro-alip:~# journalctl -xe

Oct 15 21:41:31 linaro-alip qdsp-start[2289]: Found Hexagon at /sys/class/remoteproc/remoteproc0
Oct 15 21:41:31 linaro-alip qdsp-start[2289]: sh: echo: I/O error
Oct 15 21:41:31 linaro-alip systemd[1]: Failed to start Start the Hexagon QDSP.
-- Subject: Unit qdsp-start.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit qdsp-start.service has failed.
-- 
-- The result is failed.
Oct 15 21:41:31 linaro-alip systemd[1]: qdsp-start.service: Failed with result 'exit-code'.

I’ve also looked at the information here: GPS Software. Based on the git commit logs, I can see that my qdsp-start script already has the necessary workaround so I’m not sure if I should be modifying my file manually.

root@linaro-alip:/usr/sbin# cat qdsp-start
#!/bin/sh

# check if we have a qDSP available on the platform

# new implementation of remoteproc use /sys/class/remoteproc
# instead of debugfs
for f in $(ls -d /sys/class/remoteproc/* 2> /dev/null); do
    device=$(readlink -f "$f"/device)
    name=$(basename "$device")
    if [ "${name%.hexagon}" != "$name" ] ; then
        echo "Found Hexagon at $f"
        echo start > "$f"/state
        exit
    fi
done

for f in $(ls /sys/kernel/debug/remoteproc/*/name 2> /dev/null); do
    name=$(cat "$f")
    if [ "${name%.hexagon}" != "$name" ] ; then
        f=$(dirname "$f")
        echo "Found Hexagon at $f"
        echo start > "$f"/state
        exit
    fi
done

# no found, then move on..
exit

Lastly per https://git.linaro.org/landing-teams/working/qualcomm/pkg/qdsp-config.git/commit/?id=5a0170d6a0e37ec78c8e2109842a47659a1c3535, it looks like th QCOM firmware has been fixed so now the DSP should be starting on boot. However, I’m not sure if this patch has made it into the release I’m using.

Any pointers on moving further will be greatly appreciated.


#2

Hi @karthicr

I tried your steps and received exactly the same response. So I restarted the system and simply checked the status of the DSP:

linaro@linaro-alip:~$ sudo systemctl status qdsp-start.service
● qdsp-start.service - Start the Hexagon QDSP
   Loaded: loaded (/lib/systemd/system/qdsp-start.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Mon 2017-10-16 14:49:44 UTC; 5min ago
  Process: 1864 ExecStart=/usr/sbin/qdsp-start (code=exited, status=0/SUCCESS)
 Main PID: 1864 (code=exited, status=0/SUCCESS)

Oct 16 14:49:43 linaro-alip qdsp-start[1864]: Found Hexagon at /sys/class/remoteproc/remoteproc0
linaro@linaro-alip:~$

The DSP appears to be up and running without needing to explicitly start the service. I then ran gpsmon and it came up and is searching for satellites. Of course I am inside a steel and concrete office building so I did not receive any gpsdata from any satellites, but this to be expected. You need clear skies to actually receive data.

Full Disclosure: I am an employee of Qualcomm Canada, any opinions I may have expressed in this or any other post may reflect the opinions of my employer.


#3

indeed, with this change: https://git.linaro.org/landing-teams/working/qualcomm/pkg/qdsp-config.git/commit/?id=5a0170d6a0e37ec78c8e2109842a47659a1c3535, it is no longer needed to manually start the DSP, it will be done automatically at boot and also when the qdsp-config package is installed the first time (without a reboot)


#4

Hi @ndec

Can you update the release notes to remove the

systemctl start qdsp-start.service

step in the gps section. Thanks

Full Disclosure: I am an employee of Qualcomm Canada, any opinions I may have expressed in this or any other post may reflect the opinions of my employer.


#5

hi @ljking, yes, of course. This change was implemented in September, so it will be included in the next release, and the release notes for the next release have been modified to take this into account.

since all packages are published in the Linaro overlay, it is indeed possible to update the packages before the official release is done!


#6

Thanks @ljking and @ndec for the updates.

Checking the status of the qdsp-start service indeed reveals that it was already started. I should have done this prior to posting my question. May be a better error message, something along the lines of “the service is already started” would have steered me in the right direction.

Onward and upward!