MC7455: GPS configuration to work with ModemManager, gpsd, etc

I am developing an embedded system using the MC7455 mounted to an i.MX 6 board running Digi Embedded Yocto 4.14.170. Cellular communication has been fairly reliable so far, but my question has to do with getting GPS configured correctly.

While the modem is able to produce GPS fixes, I am not able to figure out what I need to do to get the GPS position available (for example, exposed to ModemManager.) I can manually enter the AT commands to set up ongoing GPS tracking but I’d like to be able to use something like gpsd, and so far I’ve not been able to do that.

I’ll try to provide as much relevant technical information about software/hardware versions below.

# uname -r
4.14.170-dey+g6d16c57cf952

# mmcli -V

mmcli 1.8.2
Copyright (2011 - 2016) Aleksander Morgado
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Running mmcli -m 0, I get the following output (imei has been removed). Note that I am using QMI with the latest modem firmware:

/org/freedesktop/ModemManager1/Modem/0 (device id '09dd5c461ce9b9fbacce9d8819210a50a67de993')
  -------------------------
  Hardware |   manufacturer: 'Sierra Wireless, Incorporated'
           |          model: 'MC7455'
           |       revision: 'SWI9X30C_02.33.03.00 r8209 CARMD-EV-FRMWR2 2019/08/28 20:59:30'
           |   H/W revision: '1.0'
           |      supported: 'gsm-umts
           |                  lte
           |                  gsm-umts, lte'
           |        current: 'gsm-umts, lte'
           |   equipment id: 'xxxxxxxxxxxxxxx'
  -------------------------
  System   |         device: '/sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.3'
           |        drivers: 'qcserial, qmi_wwan'
           |         plugin: 'Sierra'
           |   primary port: 'cdc-wdm0'
           |          ports: 'ttyUSB0 (qcdm), ttyUSB2 (at), cdc-wdm0 (qmi), wwan0 (net)'
  -------------------------
  Numbers  |           own : 'unknown'
  -------------------------
  Status   |           lock: 'sim-pin2'
           | unlock retries: 'sim-pin (3), sim-pin2 (10), sim-puk (10), sim-puk2 (10)'
           |          state: 'connected'
           |    power state: 'on'
           |    access tech: 'lte'
           | signal quality: '100' (recent)
  -------------------------
  Modes    |      supported: 'allowed: 2g, 3g, 4g; preferred: none'
           |        current: 'allowed: 2g, 3g, 4g; preferred: none'
  -------------------------
  Bands    |      supported: 'utran-1, utran-3, utran-4, utran-5, utran-8, utran-2, eutran-1, eutran-2, eutran-3, eutran-4, eutran-5, eutran-7, eutran-8, eutran-12, eutran-13, eutran-20, eutran-25, eutran-41'
           |        current: 'utran-1, utran-3, utran-4, utran-5, utran-8, utran-2, eutran-1, eutran-2, eutran-3, eutran-4, eutran-5, eutran-7, eutran-8, eutran-12, eutran-13, eutran-20, eutran-25, eutran-41'
  -------------------------
  IP       |      supported: 'ipv4, ipv6, ipv4v6'
  -------------------------
  3GPP     |           imei: 'xxxxxxxxxxxxxxx'
           |  enabled locks: 'none'
           |    operator id: '302220'
           |  operator name: 'TELUS'
           |   subscription: 'unknown'
           |   registration: 'roaming'
           |    EPS UE mode: 'csps-2'
  -------------------------
  SIM      |           path: '/org/freedesktop/ModemManager1/SIM/0'

  -------------------------
  Bearers  |          paths: '/org/freedesktop/ModemManager1/Bearer/0'

It does not appear that the modem currently supports or is configured to emit GPS data other than from cell tower locations:

# mmcli -m 0 --location-status

/org/freedesktop/ModemManager1/Modem/0
  ----------------------------
  Location |   capabilities: '3gpp-lac-ci'
           |        enabled: '3gpp-lac-ci'
           |        signals: 'no'

Attempting to enable those capabilities, I get errors:

# mmcli -m 0 --location-enable-gps-nmea
error: couldn't setup location gathering: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Unsupported: Cannot enable unsupported location sources: 'gps-nmea''

# mmcli -m 0 --location-enable-gps-raw
error: couldn't setup location gathering: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Unsupported: Cannot enable unsupported location sources: 'gps-raw''

Stopping ModemManager and issuing AT commands, I’m able to query the modem properties:

AT!USBINFO?
VID: 0x1199
APP PID: 0x9071
BOOT PID: 0x9070
Manufacturer: Sierra Wireless, Incorporated
Product: Sierra Wireless MC7455 Qualcomm® Snapdragon▒
                                                     ▒ X7 LTE-A

AT!CUSTOM?
!CUSTOM:
             GPSENABLE          0x01
             IPV6ENABLE         0x01
             UIM2ENABLE         0x01
             SIMLPM             0x01
             USBSERIALENABLE    0x01

Based on my understanding, I have the correct ports enabled:

AT!USBCOMP?
Config Index: 1
Config Type:  1 (Generic)
Interface bitmask: 0000010D (diag,nmea,modem,rmnet0)

Just to be sure, I can manually initiate GPS tracking:

AT!GPSTRACK=1,20,10,1000,1
OK

And after about 45 seconds, I can query my position (exact location sanitized with asterisks):

AT!GPSLOC?
Lat: 43 Deg ** Min **** Sec N  (**********)
Lon: 81 Deg ** Min **** Sec W  (**********)
Time: 2020 05 22 4 15:54:59 (GPS)
LocUncAngle: 0.0 deg  LocUncA: 3 m  LocUncP: 2 m  HEPE: 3.605 m
3D Fix
Altitude: 357 m  LocUncVe: 8.0 m
Heading: 0.0 deg  VelHoriz: 0.0 m/s  VelVert: 0.0 m/s

AT!GPSSTATUS?
Current time: 2020 05 22 4 15:57:39

2020 05 22 4 15:57:38 Last Fix Status    = SUCCESS
2020 05 22 4 15:57:38 Fix Session Status = ACTIVE

TTFF (sec) = 45

So while GPS seems to work, I’m stuck on getting it working so that my device automatically starts GPS tracking, with ModemManager or gpsd able to “see” the position.

I don’t know if this is an issue with the version of ModemManager I’m using, or an issue with the modem or its firmware, or more likely, some settings on the modem I’m not setting correctly. I’m hoping someone here has some experience with getting this sort of thing working properly.

Hi Charles,

I am testing on Ubuntu 18.04 desktop and seems it works after I update the modemmanager to latest version (1.10.0).
Below my test log:

legato@ubuntu:~$ lsusb -d 1199:
Bus 001 Device 002: ID 1199:9071 Sierra Wireless, Inc. 
legato@ubuntu:~$ mmcli -V

mmcli 1.10.0
Copyright (2011 - 2019) Aleksander Morgado
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

legato@ubuntu:~$ mmcli -m 0 --enable
successfully enabled the modem
legato@ubuntu:~$ mmcli -m 0 --location-enable-gps-nmea --location-enable-gps-raw --location-disable-3gpp
successfully setup location gathering
legato@ubuntu:~$ mmcli -m 0 --location-status
  --------------------------------
  Location |         capabilities: 3gpp-lac-ci, gps-raw, gps-nmea, agps
           |              enabled: gps-raw, gps-nmea
           |              signals: no
  --------------------------------
  GPS      |         refresh rate: 30 seconds
           | supported assistance: xtra
           |   assistance servers: http://xtrapath2.izatcloud.net/xtra3grc.bin
           |                       http://xtrapath3.izatcloud.net/xtra3grc.bin
           |                       http://xtrapath1.izatcloud.net/xtra3grc.bin
legato@ubuntu:~$ mmcli -m 0 --location-get
  -----------
  GPS | nmea: $GPGGA,,,,,,0,,,,,,,,*66
      |       $GPGSA,A,1,,,,,,,,,,,,,,,*1E
      |       $GPVTG,,T,,M,,N,,K,N*2C
      |       $GPRMC,,V,,,,,,,,,,N*53
      |       $GPGSV,3,1,10,01,51,167,,03,05,126,,06,,,,07,55,314,*4B
      |       $GPGSV,3,2,10,08,57,293,,09,23,229,,10,,,,11,40,217,*4B
      |       $GPGSV,3,3,10,13,,,,16,,,*7D
legato@ubuntu:~$ 

Is this what you expected?
Would you please try the latest version on your desktop and i.MX board?

Hope it helps.
Thx

I have the same result with the latest ModemManager ver 1.10.0.
Observation from my module

vm123@ubuntu:~$ mmcli -m 0 --location-status

Location | capabilities: 3gpp-lac-ci, gps-raw, gps-nmea, agps
| enabled: gps-raw, gps-nmea
| signals: no

GPS | refresh rate: 30 seconds
| supported assistance: xtra
| assistance servers: http://xtrapath3.izatcloud.net/xtra3grc.bin
| http://xtrapath1.izatcloud.net/xtra3grc.bin
| http://xtrapath2.izatcloud.net/xtra3grc.bin
vm123@ubuntu:~$ mmcli -m 0 --location-get

GPS | nmea: $GPGGA,0,66
| $GPGSA,A,1,1E
| $GPVTG,T,M,N,K,N
2C
| $GPRMC,V,N
53
| $GPGSV,4,1,14,02,38,016,05,68,257,07,09,34,092,*4E
| $GPGSV,4,2,14,12,48,195,13,02,192,17,18,*7D
| $GPGSV,4,3,14,20,29,236,23,39,118,24,25,41,286,*4E
| $GPGSV,4,4,14,28,31,172,30,*43

For the first time, I got the same your issue but It’s gone after I installed modem-manager-gui. I’m not sure that is the fix but you can try it

sudo apt update
sudo apt install modem-manager-gui

Please share any concerns you have and help us tick Solution if your problem is solved
Thanks

I’ve backported ModemManager 1.10.8, libmbim 1.18.0 and libqmi 1.24.2 to my local copy of Digi Embedded Yocto 2.6-r3 and I now see the behaviour I expect.

I appreciate the suggestion, but keep in mind this is an embedded system where I do not have a package manager configured, and the system runs headless. I wish that I could apt-get install but I don’t have that option.

Thank you both for your suggestions - it looks like the solution here is to make sure ModemManager is current. As I pointed out to Vianney, updating to the latest version of something isn’t trivial as it usually is on desktop or server systems, and I wanted to make sure my basic modem configuration was sound before I tackled any source code changes.