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.