Bug 88166

Summary: mbim: GPS location unavailable
Product: ModemManager Reporter: bartsimpson
Component: generalAssignee: ModemManager bug user <modemmanager>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: low CC: freedesktop.org
Version: 1.4   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description bartsimpson 2015-01-07 17:16:45 UTC
The device has an internal GPS/GLONAS revicver, but mmcli don't report only:
mmcli --location-status  -m /org/freedesktop/ModemManager1/Modem/0
error: modem not enabled yet
mmcli -e -m /org/freedesktop/ModemManager1/Modem/0
error: couldn't enable the modem: 'GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Method Enable is not implemented on interface org.freedesktop.ModemManager1.Modem'
Comment 1 Aleksander Morgado 2015-01-07 19:10:57 UTC
Does it have the SIM inserted and unlocked? At this point ModemManager requires that to Enable the modem. The fact that you get "Method Enable is not implemented on interface..." could just mean that the modem is in Failed state because there's no SIM around.
Comment 2 bartsimpson 2015-01-08 10:33:32 UTC
No, I have try it without an SIM card.
After insert and unlock the pin I get:
mmcli -i /org/freedesktop/ModemManager1/SIM/0 --pin=XXXX
successfully sent PIN code to the SIM
mmcli --location-status  -m /org/freedesktop/ModemManager1/Modem/0
error: modem not enabled yet
mmcli -e -m /org/freedesktop/ModemManager1/Modem/0
successfully enabled the modem
Comment 3 bartsimpson 2015-01-08 10:37:58 UTC
But:
mmcli -m /org/freedesktop/ModemManager1/Modem/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 /org/freedesktop/ModemManager1/Modem/0 --location-get-gps-nmea
error: couldn't get NMEA GPS traces from the modem: 'not available'

mmcli -m /org/freedesktop/ModemManager1/Modem/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''

mmcli -m /org/freedesktop/ModemManager1/Modem/0 --location-get-gps-raw
error: couldn't get raw GPS location from the modem: 'not available'

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

mmcli -m /org/freedesktop/ModemManager1/Modem/0 --location-get

/org/freedesktop/ModemManager1/Modem/0
  -------------------------
  3GPP location   | Not available
  -------------------------
  GPS NMEA traces | Not available
  -------------------------
  Raw GPS         | Not available
  -------------------------
  CDMA BS         | Not available
Comment 4 Aleksander Morgado 2015-01-08 10:42:30 UTC
Can you try to run just this?

$ mmcli -m /org/freedesktop/ModemManager1/Modem/0

that should show the basic state info of the modem. And among that info you'll see the drivers being used to handle the modem.

If you're using the EM7345 with QMI firmware, you should really have GPS. If instead your modem is running MBIM firmware, then no GPS, at least not yet.
Comment 5 bartsimpson 2015-01-08 16:23:37 UTC
mmcli -m /org/freedesktop/ModemManager1/Modem/0

/org/freedesktop/ModemManager1/Modem/0 (device id 'ea9bb92303ce0e48753f9340cfa9de1b36919bbe')
  -------------------------
  Hardware |   manufacturer: 'Generic'
           |          model: 'MBIM [1199:A001]'
           |       revision: 'FIH7160_V1.1_MODEM_01.1349.12'
           |      supported: 'gsm-umts, lte'
           |        current: 'gsm-umts, lte'
           |   equipment id: 'XXXXXX'
  -------------------------
  System   |         device: '/sys/devices/pci0000:00/0000:00:14.0/usb2/2-10'
           |        drivers: 'cdc_mbim'
           |         plugin: 'Generic'
           |   primary port: 'cdc-wdm0'
           |          ports: 'wwp0s20u10 (net), cdc-wdm0 (mbim)'
  -------------------------
  Numbers  |           own : 'XXXXXXXXXXX'
  -------------------------
  Status   |           lock: 'none'
           | unlock retries: 'sim-pin (3)'
           |          state: 'registered'
           |    power state: 'on'
           |    access tech: 'gprs, hsdpa, hsupa'
           | signal quality: '61' (cached)
  -------------------------
  Modes    |      supported: 'allowed: 2g, 3g, 4g; preferred: none'
           |        current: 'allowed: 2g, 3g, 4g; preferred: none'
  -------------------------
  Bands    |      supported: 'unknown'
           |        current: 'unknown'
  -------------------------
  IP       |      supported: 'ipv4, ipv6, ipv4v6'
  -------------------------
  3GPP     |           imei: 'XXXXXXX'
           |  enabled locks: 'sim, fixed-dialing'
           |    operator id: '26202'
           |  operator name: 'Vodafone.de'
           |   subscription: 'unknown'
           |   registration: 'home'
  -------------------------
  SIM      |           path: '/org/freedesktop/ModemManager1/SIM/0'

  -------------------------
  Bearers  |          paths: 'none'

What do you mean with QMI firmware?
Comment 6 Aleksander Morgado 2015-01-08 16:33:59 UTC
This modem can handle different firmware images. The one you're using is MBIM based, so ModemManager uses MBIM to communicate with the modem. But using MBIM, we don't know how to use the GPS, as there is no standard MBIM service defined to use the GPS.

Leaving the bug open, but no clear way to fix this yet, at least until we get to know how the GPS is controlled via MBIM in Sierra.
Comment 7 bartsimpson 2015-08-22 07:39:02 UTC
Some good news, after some testing with help from other people I have found the way to get the data.
First it seems, there exits to modes.
Get an single coordinate and the second one will get values until it will stopped.
Here the AT command:
AT+XLCSLSR=1,1,,,,,1,,,,,  -> get an single position
AT+XLCSLSR=1,1,,,,,,,,,, -> get it until stop called
When call one of it you will get an ID as return code.
To clean complete the call or stop the position delivery call:
AT+XLSRSTOP=0,ID
This will terminate the previous call.

I hope this will help.
For this the modem don't require an SIM card.
Comment 8 Stefan Neufeind 2015-09-20 22:21:55 UTC
I can confirm the commands listed above for a Sierra-modem. However there was a slight mistake because

AT+XLCSLSR=1,1,,,,,,,,,,

will return you a single position. It will confirm your request with a request-ID and (when the location is available) return one location and then terminate.

To get a continuous feed (one line of information per second) you will use:

AT+XLCSLSR=1,1,,,,,1,,,,,

That returns:
+XLCSLSR: request id 5

OK

And after a while it starts returning data like:

+XLCSLSR: 2, 51.167369 N, 6.686144 E, 59.599643, 26.408845, 15.699341,114, 53.571681,67,2015/09/20,21:47:36,0,0,352.08,1.66,0.03,1.55,0.64,78473,78473.06,,,1 


Note the request id above. You'll need it to stop the feed:

AT+XLSRSTOP=0,5
                  
OK                                                                                                           
+XLSRSTOP: OK


I'd like to point out that reading the GPS-position works totally fine without any SIM. So it would be great to support it without a SIM inserted.
Comment 9 Jared Baldridge 2016-08-04 22:21:03 UTC
I have one of these cards as well, and it's worth mentioning that there is no QMI firmware. The EM7345 is based on an Intel chipset, not Qualcomm -- specifically this modem is a rebadged Intel XMM7160.

After a ton of digging through various OEMs docs on the XMM7160, it seems the standard practice is to use MBIM for setting up data connections, but to continue using the cdc-acm interface for location support.

Here's an interesting project I found that uses the AT port to feed GPS data to gpsd: https://github.com/tuxmaster/gpsd-tcp/tree/master/Plug-Ins/EM7345
Comment 10 GitLab Migration User 2018-06-10 09:02:22 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/25.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.