Assisted GPS on Sierra Wireless RC7620

Aleksander Morgado aleksander at aleksander.es
Mon Jul 26 22:25:22 UTC 2021


Hey Tom,

> I've got a Sierra Wireless RC7620 connected to my ARM device running
> embedded Linux. I can get the network connected using qmicli but now I
> want to use the GPS. I came across an old post that suggested:
>     qmicli -d /dev/cdc-wdm0 --device-open-qmi --loc-start
>     qmicli -d /dev/cdc-wdm0 --device-open-qmi
> --loc-follow-gnss-sv-info --loc-follow-nmea
> should work, but it doesn't seem to do anything. The first command gives me:
>     [/dev/cdc-wdm0] Successfully started location tracking (session id 0)
> so I wasn't sure if it should be:
>     qmicli -d /dev/cdc-wdm0 --device-open-qmi --loc-session-id=0
> --loc-follow-gnss-sv-info --loc-follow-nmea
> but that didn't work either.
>

It's all a bit tricky; you should not have the QMI client implicitly
released after the LOC start operation, otherwise it will internally
stop it right away. You should be able to do what you want with qmicli
in the following way (note, using the qmi-proxy with the "-p" option
here):

        aleksander at ares:~$ sudo qmicli -d /dev/cdc-wdm3 -p --loc-start
--client-no-release-cid
        [/dev/cdc-wdm3] Successfully started location tracking (session id 0)
        [/dev/cdc-wdm3] Client ID not released:
            Service: 'loc'
                CID: '1'

        aleksander at ares:~$ sudo qmicli -d /dev/cdc-wdm3 -p
--client-no-release-cid --client-cid=1 --loc-follow-nmea
        $GPGSA,A,1,,,,,,,,,,,,,,,*1E
        $GPGGA,,,,,,0,,,,,,,,*66
        $GPGSA,A,1,,,,,,,,,,,,,,,*1E
        $GPGGA,,,,,,0,,,,,,,,*66
        $GPGSA,A,1,,,,,,,,,,,,,,,*1E
        $GPGGA,,,,,,0,,,,,,,,*66
        $GPGSA,A,1,,,,,,,,,,,,,,,*1E
        $GPGGA,,,,,,0,,,,,,,,*66
        $GPGSA,A,1,,,,,,,,,,,,,,,*1E
        $GPGGA,,,,,,0,,,,,,,,*66
        $GPGSA,A,1,,,,,,,,,,,,,,,*1E
        $GPGGA,,,,,,0,,,,,,,,*66
        $GPGSA,A,1,,,,,,,,,,,,,,,*1E
        $GPGGA,,,,,,0,,,,,,,,*66
        ^C
        cancelling the operation...
        [/dev/cdc-wdm3] Client ID not released:
            Service: 'loc'
                CID: '1'

        aleksander at ares:~$ sudo qmicli -d /dev/cdc-wdm3 -p --loc-stop
--client-cid=1
        [/dev/cdc-wdm3] Successfully stopped location tracking (session id 0)


> How can I:
> 1. Get a standalone GPS fix.

If using the default, you'll get the standalone GPS fix.

> 2. Get an assisted GPS fix with a network connection.
>

You can enable A-GPS (MSA/MSB...) using the following command (also
with "-p --client-no-release-cid --client-cid=1")
--loc-set-operation-mode=[default|msb|msa|standalone|cellid|wwan]

Not even sure what the last two are really.

-- 
Aleksander
https://aleksander.es


More information about the libqmi-devel mailing list