GPS support using Quectel EC21

Dan Williams dcbw at redhat.com
Mon Sep 11 15:44:26 UTC 2017


On Mon, 2017-09-11 at 17:11 +0200, Aleksander Morgado wrote:
> Hey,
> 
> > 
> > I am trying to use ModemManager with the Quectel EC21 modem to get
> > GPS data.
> > 
> > By default this modem uses QMI, but I see the following message
> > when
> > starting ModemManager:
> > 
> > [1504793139.991929] [../../git/src/mm-broadband-modem-qmi.c:11204]
> > qmi_port_allocate_client_ready(): Couldn't allocate client for
> > service
> > 'pds': Couldn't create client for service 'pds': Service 'pds' not
> > supported by the device
> > 
> > From that, I interpret that the modem firmware (I am using
> > EC21EFAR02A05M4G) is not implementing the PDS QMI service, which is
> > used for GPS support. I have asked Quectel about new firmware
> > versions
> > for this modem, just in case there is support for PDS service, but
> > I
> > am still waiting for their answer.
> > 
> > In the meanwhile, I decided to test without QMI, using the option
> > driver to probe the USB serial devices. I removed the QMI driver
> > and I
> > manually probed the USB serial ports with the option driver:
> > 
> > echo "2c7c 0121" > /sys/bus/usb-serial/drivers/option1/new_id
> > option 1-1.3:1.0: GSM modem (1-port) converter detected
> > usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB0
> > option 1-1.3:1.1: GSM modem (1-port) converter detected
> > usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1
> > option 1-1.3:1.2: GSM modem (1-port) converter detected
> > usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB2
> > option 1-1.3:1.3: GSM modem (1-port) converter detected
> > usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB3
> > 
> > In this mode, I have verified that the GPS seems to work. I use the
> > 'AT+QGPS=1' at command to enable GPS and then I can see NMEA traces
> > in
> > the ttyUSB1 port:
> > 
> > root at ccimx6ulsbc:~# mmcli -m 0 --command="AT+QGPS=1"
> > response: ''
> > root at ccimx6ulsbc:~# cat /dev/ttyUSB1
> > $GPVTG,,T,,M,,N,,K,N*2C
> > $GPGSA,A,1,,,,,,,,,,,,,,,*1E
> > $GPGGA,,,,,,0,,,,,,,,*66
> > $GPRMC,,V,,,,,,,,,,N*53
> > $GPVTG,,T,,M,,N,,K,N*2C
> > $GPGSA,A,1,,,,,,,,,,,,,,,*1E
> > $GPGGA,,,,,,0,,,,,,,,*66
> > $GPRMC,,V,,,,,,,,,,N*53
> > $GPVTG,,T,,M,,N,,K,N*2C
> > $GPGSA,A,1,,,,,,,,,,,,,,,*1E
> > $GPGGA,,,,,,0,,,,,,,,*66
> > $GPRMC,,V,,,,,,,,,,N*53
> > $GPVTG,,T,,M,,N,,K,N*2C
> > $GPGSA,A,1,,,,,,,,,,,,,,,*1E
> > $GPGGA,,,,,,0,,,,,,,,*66
> > 
> > The problem is trying to make this work with ModemManager. For some
> > reason (I don't quite understand why) seems like ModemManager
> > doesn't
> > recognize the ttyUSB1 port as the GPS port. I am not sure if
> > AT+QGPS
> > is a standard AT command or is something specific from Quectell
> > modems/Qualcomm chipsets.
> > 
> > Is this expected to work, am I missing something?
> > 
> 
> This is expected; AT+QGPS isn't standard and no plugins currently use
> it. The way to go would be to setup GPS location gathering in the
> same way as done in the Cinterion QMI plugin, where we have custom AT
> commands to enable/disable GPS and then we read NMEA traces from a
> TTY. ModemManager needs to know which tty will have the output of
> NMEA traces, and to do that we currently require some previous
> knowledge of the device (i.e. udev tags to specify which device
> interface handles the NMEA output). Again, the Cinterion plugin is a
> perfect example of how to subclass the QMI implementation to provide
> an AT/TTY based GPS location fallback.

Maybe this modem supports the LOC service instead of PDS?  I started
stubbing that out in libqmi a while back but haven't done the actual
"where am I" calls.

Dan


More information about the ModemManager-devel mailing list