Cant receive raw GPS data from ModemManager

I’m trying to request raw GPS data from my MC7750 card using ModemManager. Every step seems to work perfectly up until receiving the actual RAW gps data. For some reason all I am able to receive is GLGSV data. Maybe I’m missing a step, but I just can’t figure this out. My goal is just to be able to receive coord/UTM data.

Everything seems to enable just fine as shown below:

$ mmcli -m 0 --enable
successfully enabled the modem

$ mmcli -m 0 --location-enable-gps-nmea --location-enable-gps-raw --location-disable-3gpp
successfully setup location gathering

$ mmcli -m 0 --location-status
  ------------------------
  Location | capabilities: 3gpp-lac-ci, gps-raw, gps-nmea, cdma-bs, agps-msa, agps-msb
           |      enabled: gps-raw, gps-nmea
           |      signals: yes
  ------------------------
  GPS      | refresh rate: 30 seconds

$ mmcli -m 0 --location-get
  -----------
  GPS | nmea: $GPGSA,A,1,,,,,,,,,,,,,,,*1E
      |       $GNGNS,,,,,,NN,,,,,,*53
      |       $GPRMC,,V,,,,,,,,,,N*53
      |       $PSTIS,*61
      |       $GNGSA,A,1,,,,,,,,,,,,,,,*00
      |       $GPGSV,3,1,09,01,17,043,,05,,,,06,26,160,,07,,,*75
      |       $GPGSV,3,2,09,08,,,,09,,,,13,30,227,,22,,,*46
      |       $GPGSV,3,3,09,23,,,*71
      |       $GLGSV,3,1,09,66,,,,86,59,050,,77,43,330,,76,61,066,*58
      |       $GLGSV,3,2,09,79,,,,87,45,182,,85,14,028,,67,09,275,*5C
      |       $GLGSV,3,3,09,68,07,322,*56
      |       $GPVTG,,T,,M,,N,,K,N*2C
      |       $GPGGA,,,,,,0,,,,,,,,*66

If I try to run “mmcli -m 0 --location-get-gps-raw”, it returns with “error: no actions specified

Here’s my Modem Status as well if it helps

$ mmcli -m 0 
  --------------------------------
  General  |                 path: /org/freedesktop/ModemManager1/Modem/0
           |            device id: e8162efb86655cf95045d2f59fb0d36c82e4a49c
  --------------------------------
  Hardware |         manufacturer: Sierra Wireless, Incorporated
           |                model: MC7750
           |    firmware revision: SWI9600M_03.05.10.13ap r6237 cnszxd00000132 2014/04/18 16:55:52
           |         h/w revision: 20
           |            supported: gsm-umts, lte
           |                       cdma-evdo, lte
           |                       lte
           |                       cdma-evdo, gsm-umts, lte
           |              current: cdma-evdo, lte
           |         equipment id: 990000780819803
  --------------------------------
  System   |               device: /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6
           |              drivers: qcserial, qmi_wwan
           |               plugin: sierra
           |         primary port: cdc-wdm0
           |                ports: cdc-wdm0 (qmi), ttyUSB0 (qcdm), ttyUSB2 (at), 
           |                       wwp0s26u1u6i8 (net)
  --------------------------------
  Numbers  |                  own: 197######56
  --------------------------------
  Status   |                 lock: sim-pin2
           |       unlock retries: sim-pin (3), sim-puk (10), sim-pin2 (3), sim-puk2 (10)
           |                state: registered
           |          power state: on
           |          access tech: lte
           |       signal quality: 88% (cached)
  --------------------------------
  Modes    |            supported: allowed: 2g; preferred: none
           |                       allowed: 3g; preferred: none
           |                       allowed: 2g, 3g; preferred: 3g
           |                       allowed: 2g, 3g; preferred: 2g
           |                       allowed: 2g, 4g; preferred: 4g
           |                       allowed: 2g, 4g; preferred: 2g
           |                       allowed: 3g, 4g; preferred: 4g
           |                       allowed: 3g, 4g; preferred: 3g
           |                       allowed: 2g, 3g, 4g; preferred: 4g
           |                       allowed: 2g, 3g, 4g; preferred: 3g
           |                       allowed: 2g, 3g, 4g; preferred: 2g
           |              current: allowed: 2g, 3g, 4g; preferred: 2g
  --------------------------------
  Bands    |            supported: eutran-13, cdma-bc0, cdma-bc1
           |              current: eutran-13, cdma-bc0, cdma-bc1
  --------------------------------
  IP       |            supported: ipv4, ipv6, ipv4v6
  --------------------------------
  3GPP     |                 imei: 990000780819803
           |        enabled locks: fixed-dialing
           |          operator id: 311480
           |        operator name: Home
           |         registration: home
  --------------------------------
  3GPP EPS | ue mode of operation: ps-2
  --------------------------------
  CDMA     |                 meid: A00000E6207668
           |                  esn: 80E2832B
           |           activation: activated
  --------------------------------
  SIM      |     primary sim path: /org/freedesktop/ModemManager1/SIM/0

I’ve tried using other gps utilities, as well as using ModemManager-gui to no avail.

Any help with this issue would be greatly appreciated. (:

The “raw” location data reported by ModemManager (i.e. lat/long…) is processed from the GGA NMEA traces. There won’t be any location data reported until that trace reports correct values.

What it looks like here is that the modem didn’t get any fixed location yet, and so, nothing is returned. Do you have good sky coverage in your location? Are you testing inside a building, or outside?

That command doesn’t exist, the only one returning location results is --location-get. Once you have fixed position, you’ll see the “raw” location info reported in that same command if you enabled it with --location-enable-gps-raw.

You can also try to enable A-GPS with --location-enable-agps-msa or --location-enable-agps-msb, depending on whether you want MS-Assisted or MS-Based A-GPS.

I am currently testing outdoors with average cloud-cover. Trying to enable Agps returns

error: couldn't setup location gathering: 'GDBus.Error:org.freedesktop.libqmi.Error.Protocol.DeviceInUse: Couldn't enable location 'agps-msa' gathering: Couldn't set default tracking session: QMI protocol error (23): 'DeviceInUse''

When I was able to get it agps-msa working, the only output I was able to receive from location-get was

$ mmcli -m 0 --location-get
  -----------
  GPS | nmea: $PSTIS,*61

This is with gps-raw and gps-nmea still enabled.

I’m not sure as to why I’m not receiving any location data, as cloud-cover is pretty moderate and I’m pretty close to the equator. I’m going to check to ensure my antenna isn’t damaged, however I doubt that this is the issue. if you have any other ideas, i’d love to hear them.

I just got it to work!
The main thing I think was causing a lack of return was not enabling --location-set-enable-signal . Additionally, my gps antenna in my toughbook was way out of alignment. Although it’s still a bit slow to connect, I was able to get Lat/Long after only 2 minutes with moderate/poor weather conditions.

@aleksander0m Thank you very much for your help!

That is actually completely orthogonal to the logic enabling the GNSS module. That command just makes the “Location” property in the DBus interface usable, in addition to the “GetLocation” method. The “Location” property is otherwise disabled by default because it’s not policy-protected and every user would be able to read it, and location data can be considered “personal” sensitive info.

That probably made it work?