EG21-G GPS location working, but not seeing GPS port

We have an existing IoT platform that was previously using the Sierra Wireless MC7455. We are looking at switching to the EG21 and hoping that it is mostly a drop-in replacement. We worked through an unrelated issue here involving the establishment of a cell connection to the network.

We’re now looking to get GPS working on this device. We have gpsd previously set up to run with the previous module. So as far as I can tell, this is a matter of getting the NMEA sentences being written to a port that gpsd can read.

I have previously set GPS to automatically run on boot:

AT+QGPSCFG="autogps"
+QGPSCFG: "autogps",1

and I do get location information when querying manually:

AT+QGPSLOC?
+QGPSLOC: 183448.0,43[redacted]N,081[redacted]W,1.1,365.8,3,223.03,0.0,0.0,090224,07

I think this setting may be relevant; it’s set to usbnmea by default.

AT+QGPSCFG="outport"
+QGPSCFG: "outport",usbnmea

I don’t see a GPS/NMEA port listed in ModemManager, though, like I have seen with different modems in the past:

--------------------------------
  General  |            dbus path: /org/freedesktop/ModemManager1/Modem/0
           |            device id: 39c06785d5d506a40d1ddaa901292b089700ed81
  --------------------------------
  Hardware |         manufacturer: QUALCOMM INCORPORATED
           |                model: QUECTEL Mobile Broadband Module
           |    firmware revision: EG21GGBR07A11M1G
           |         h/w revision: 10000
           |            supported: gsm-umts, lte
           |              current: gsm-umts, lte
           |         equipment id: 862771047885127
  --------------------------------
  System   |               device: /sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.3
           |              drivers: option1, qmi_wwan
           |               plugin: Quectel
           |         primary port: cdc-wdm0
           |                ports: ttyUSB0 (qcdm), ttyUSB2 (at), cdc-wdm0 (qmi), wwan0 (net),
           |                       ttyUSB3 (at)
  --------------------------------
  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: 47% (recent)
  --------------------------------
  Modes    |            supported: allowed: 2g; preferred: none
           |                       allowed: 3g; preferred: none
           |                       allowed: 4g; 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: 3g
           |                       allowed: 3g, 4g; preferred: 4g
           |                       allowed: 2g, 3g, 4g; preferred: 4g
           |                       allowed: 2g, 3g, 4g; preferred: 3g
           |                       allowed: 2g, 3g, 4g; preferred: 2g
           |              current: allowed: 2g, 3g, 4g; preferred: 4g
  --------------------------------
  Bands    |            supported: egsm, dcs, pcs, g850, utran-1, utran-4, utran-6, 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-18, eutran-19,
           |                       eutran-20, eutran-25, eutran-26, eutran-28, eutran-38, eutran-39,
           |                       eutran-40, eutran-41, utran-19
           |              current: egsm, dcs, pcs, g850, utran-1, utran-4, utran-6, 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-18, eutran-19,
           |                       eutran-20, eutran-25, eutran-26, eutran-28, eutran-38, eutran-39,
           |                       eutran-40, eutran-41, utran-19
  --------------------------------
  IP       |            supported: ipv4, ipv6, ipv4v6
  --------------------------------
  3GPP     |                 imei: 862771047885127
           |          operator id: 302220
           |         registration: roaming
  --------------------------------
  3GPP EPS | ue mode of operation: csps-2
  --------------------------------
  SIM      |            dbus path: /org/freedesktop/ModemManager1/SIM/0
  --------------------------------
  Bearer   |            dbus path: /org/freedesktop/ModemManager1/Bearer/0

In simple terms: what’s the best approach for getting gpsd to “see” the GPS location that the module has?

What is in AT+QCFG="usbcfg" output?

AT+QCFG="usbcfg"
+QCFG: "usbcfg",0x2C7C,0x0121,1,1,1,1,1,0,0

Then connect with any dumb terminal to /dev/ttyUSB1 and check the output.

Running something like screen /dev/ttyUSB1 connects without errors but does not produce any output. The cursor just blinks.

Letting it run, though, I see some data come through… it wasn’t instantaneous:

,4,15,22,26,286,,27,03,053,,51,,,34,1*6B
$GPGGA,192043.00,4312.143640,N,08103.762054,W,1,07,1.1,353.8,M,-35.0,M,,*5A
$GPVTG,286.9,T,293.5,M,0.0,N,0.0,K,A*2B
$GPRMC,192043.00,A,4312.143640,N,08103.762054,W,0.0,286.9,090224,6.6,W,A,V*42
$GPGSA,A,3,02,07,08,14,21,22,30,,,,,,1.5,1.1,0.9,1*2A
62056,W,0.0,286.9,090224,6.6,W,A,V*4B
$GPGSA,A,3,02,07,08,14,21,22,30,,,,,,1.4,1.1,0.9,1*2B
0.0,286.9,090224,6.6,W,A,V*4F
$GPGSA,A,3,02,07,08,14,21,22,30,,,,,,1.6,1.3,0.9,1*2B
9
$GPGSA,A,3,02,07,08,14,17,21,22,30,,,,,1.4,1.1,0.9,1*2D
.9,090224,6.6,W,A,V*4E
$GPGSA,A,3,02,07,08,21,22,30,,,,,,,1.6,1.3,0.9,1*2E
PGSA,A,3,02,07,08,14,17,21,30,,,,,,1.4,1.1,0.9,1*2D
5.0,M,,*56
$GPVTG,286.9,T,293.5,M,0.0,N,0.0,K,A*2B
$GPRMC,192128.00,A,4312.143652,N,08103.762062,W,0.0,286.9,090224,6.6,W,A,V*48
$GPGSA,A,3,02,07,08,21,30,,,,,,,,1.7,1.4,1.0,1*20
2.00,A,4312.143653,N,08103.762062,W,0.0,286.9,090224,6.6,W,A,V*42
$GPGSA,A,3,02,07,08,21,30,,,,,,,,1.9,1.7,1.0,1*2D
2E
43652,N,08103.762062,W,1,06,1.2,353.9,M,-35.0,M,,*5C
$GPVTG,286.9,T,293.5,M,0.0,N,0.0,K,A*2B
$GPRMC,192150.00,A,4312.143652,N,08103.762062,W,0.0,286.9,090224,6.6,W,A,V*47
$GPGSA,A,3,02,07,08,17,21,30,,,,,,,1.5,1.2,0.9,1*2A

This seems like it should be correct? Might the problem be further downstream with gpsd, then?

Looks good to me. See if you can find a tool called gpspipe, this is what I used last time for testing few years ago.

1 Like