EM9191 - NMEA GPS Stream - Can not find the ttyUSB Interface

We use many generations of Sierra Wireless modems. Now with the new EM9191 generation we can no longer find GPS via ttyUSB. With the previous generations (e.g. EM7565, 7455) there was always a ttyUSB interface for the NMEA stream.

Why was this removed?

Can this interface be activated via AT?

Is there a firmware where this interface is available again?

Does this help?

Do not help.
It is QMI not a tty Interface.

Then I don’t see other method according to the response of AT!USBCOMP=?
BTW, is your product based on linux?

yes, we use linux.
our architecture use gpsd. that is the reason, why we need ttyUSB NMEA Stream.

can the gpsd get the NMEA data from QMI?
can you create a virtual port and forward those NMEA stream obtained by QMI to that port?

Sounds like a theoretical solution.

Do you have any experience or tools?

Why did Sierra Wireless decide to eliminate this interface? It could have remained adjustable via USBCOMP or via the interface bit mask.

Is it possible to offer the setting option again in the next firmware?

see if this helps to create virutal port:

maybe, I will check it. However, it sounds like a lot of work and testing to ensure that everything runs smoothly and reliably.

what about my other questions? Is it possible to unlock the NMEA stream again via the bitmask or has the NMEA -ttyUSB stream been completely removed from the firmware?

i don’t quite see there is such plan

That is very bad. Then we will probably have to rely on other modules in the future, although we were very satisfied with the performance and stability of the SW modems.

I have just tried the virtual port, it is working fine for my Ubuntu 18 to output NMEA frame in virtual port:

  1. sudo apt-get install libmbim-utils
  2. make sure MBIM port is enabled in AT!USBCOMP?
  3. connect antenna to AUX antenna port
  4. power on the EM9191 with FW SWIX55C_03.09.11.00
  5. Make sure GPSENABLE has been enabled in AT!CUSTOM?
  6. type AT!GPSAUTOSTART=1
  7. kernel log should show the following:
[  355.731518] usb 3-2.1: Product: Sierra Wireless EM9191
[  355.731519] usb 3-2.1: Manufacturer: Sierra Wireless, Incorporated
[  355.731520] usb 3-2.1: SerialNumber: 7821475120012345
[  355.842587] usbcore: registered new interface driver cdc_ncm
[  355.844384] usbcore: registered new interface driver cdc_wdm
[  355.975016] cdc_mbim 3-2.1:1.0: setting rx_max = 16384
[  356.012935] usbcore: registered new interface driver usbserial
[  356.013726] usbcore: registered new interface driver usbserial_generic
[  356.013811] usbserial: USB Serial support registered for generic
[  356.017132] usb_wwan: loading out-of-tree module taints kernel.
[  356.017170] usb_wwan: module verification failed: signature and/or required key missing - tainting kernel
[  356.020363] usbcore: registered new interface driver qcserial
[  356.021087] usbserial: USB Serial support registered for Qualcomm USB modem
[  356.021156] usbserial: USB Serial support registered for Qualcomm USB modem
[  356.023816] cdc_mbim 3-2.1:1.0: cdc-wdm0: USB WDM device
[  356.024230] cdc_mbim 3-2.1:1.0 wwan0: register 'cdc_mbim' at usb-0000:03:00.0-2.1, CDC MBIM, 5a:49:43:0c:a8:d1
[  356.025267] usbcore: registered new interface driver cdc_mbim
[  356.026301] qcserial 3-2.1:1.3: Qualcomm USB modem converter detected
[  356.026444] usb 3-2.1: Qualcomm USB modem converter now attached to ttyUSB0
[  356.030435] qcserial 3-2.1:1.4: Qualcomm USB modem converter detected
[  356.030631] usb 3-2.1: Qualcomm USB modem converter now attached to ttyUSB1
  1. Get the CID
owner@ubuntu:~/Downloads$  sudo qmicli -p --device=/dev/cdc-wdm0 --loc-start --client-no-release-cid --loc-session-id=53
[sudo] password for owner: 
[/dev/cdc-wdm0] Successfully started location tracking (session id 53)
[/dev/cdc-wdm0] Client ID not released:
	Service: 'loc'
	    CID: '4'
  1. Put the CID in the following command and NMEA frame should be coming out.
owner@ubuntu:~/Downloads$ sudo qmicli -p --device=/dev/cdc-wdm0 --loc-follow-nmea --client-cid=4 --client-no-release-cid --loc-session-id=53 
$GPGSV,1,1,03,30,26,203,13,07,10,178,,08,,,,1*63
$GQGSV,1,1,02,02,56,143,24,04,,,28,1*58
$GBGSV,2,1,08,01,47,122,,02,45,234,,03,63,188,,04,33,108,,1*72
$GBGSV,2,2,08,22,30,125,,24,44,286,,25,,,,26,50,209,,1*4C
$GAGSV,1,1,01,21,,,27,7*74
$GNDTM,P90,,,N,,W,,W84*4F
$GPGGA,034719.00,,,,,0,,,,,,,,*40
$GBGGA,034719.00,,,,,0,,,,,,,,*52
$GNGGA,034719.00,,,,,0,,,,,,,,*5E
$GNGNS,034719.00,,,,,NNN,,,,,,,V*41
$GBVTG,,T,,M,,N,,K,N*3E
$GNVTG,,T,,M,,N,,K,N*32
$GPRMC,,V,,,,,,,,,,N,V*29
$GBRMC,,V,,,,,,,,,,N,V*3B
$GNRMC,,V,,,,,,,,,,N*4D
$GBGSA,A,1,,,,,,,,,,,,,,,,*20
$GNGSA,A,1,,,,,,,,,,,,,,,,*2C
$GPGSV,1,1,03,30,26,203,13,07,10,178,,08,,,,1*63
$GQGSV,1,1,02,02,56,143,23,04,,,30,1*56
$GBGSV,2,1,08,01,47,122,,02,45,234,,03,63,188,,04,33,108,,1*72
$GBGSV,2,2,08,22,30,125,,24,44,286,,25,,,,26,50,209,,1*4C
$GAGSV,1,1,01,21,,,27,7*74
$GNDTM,P90,,,N,,W,,W84*4F
$GPGGA,034720.00,,,,,0,,,,,,,,*4A
$GBGGA,034720.00,,,,,0,,,,,,,,*58
$GNGGA,034720.00,,,,,0,,,,,,,,*54
$GNGNS,034720.00,,,,,NNN,,,,,,,V*4B
$GBVTG,,T,,M,,N,,K,N*3E
$GNVTG,,T,,M,,N,,K,N*32
$GPRMC,,V,,,,,,,,,,N,V*29
$GBRMC,,V,,,,,,,,,,N,V*3B
$GNRMC,,V,,,,,,,,,,N*4D
$GBGSA,A,1,,,,,,,,,,,,,,,,*20
$GNGSA,A,1,,,,,,,,,,,,,,,,*2C
^Ccancelling the operation...
[/dev/cdc-wdm0] Client ID not released:
	Service: 'loc'
	    CID: '4'
  1. install socat by “sudo apt-get install socat”
  2. sudo socat -d -d PTY,raw,echo=0,link=/dev/ttyVA00 PTY,raw,echo=0,link=/dev/ttyVB00
  3. now /dev/pts/1 and /dev/pts/2 should be generated
  4. sudo chmod 777 /dev/pts/1
  5. sudo chmod 777 /dev/pts/2
  6. to make sure these virtual ports work, you can use minicom to open these two ports and type some characters to verify
  7. use minicom to open /dev/pts/2
  8. sudo qmicli -p --device=/dev/cdc-wdm0 --loc-follow-nmea --client-cid=4 --client-no-release-cid --loc-session-id=53 > /dev/pts/1
  9. now the port /dev/pts/2 in minicom should output NMEA frame

Sorry, why can’t I find the loc in qmicli?
Error message:
error: Unknown option --loc-start
error: Unknown option --help-loc

How do I update it? I have try this,

sudo apt-get install libmbim-utils
Reading package lists… Done
Building dependency tree
Reading state information… Done
libmbim-utils is already the newest version (1.14.0-1ubuntu0.16.04.1).
0 upgraded, 0 newly installed, 0 to remove and 101 not upgraded.

Maybe you try the same procedure first with --loc-follow-nmea

I can’t view the loc in qmicli, do you know why?

AT!USBCOMP=?
!USBCOMP:
AT!USBCOMP=<Config Index>,<Config Type>,<Interface bitmask>
  <Config Index>      - configuration index to which the composition applies, s1

  <Config Type>       - 1:Generic              (Not supported),
                        2:USBIF MBIM           (Not supported),
                        3:RNDIS                (Not supported),
                        4:USBIF MBIM V2        (Supported),
                        5:USBIF RMNET          (Not supported),
                        6:USBIF MBIM_V2_CUSTOM (Supported)

  <Interface bitmask> - DIAG     - 0x00000001,
                        ADB      - 0x00000002,
                        MODEM    - 0x00000008,
                        MBIM     - 0x00001000,
                        RmNET    - 0x00000100,
  e.g.
  9  - diag,modem interfaces enabled
  1009 - diag,modem,mbim interfaces enabled

OK
AT!CUSTOM?
!CUSTOM:
             GPSENABLE          0x01
             IPV6ENABLE         0x01
             SIMLPM             0x02
             IMCONFIG           0x02
             ICMPINTSRVDIS      0x01
             QXDMLOGENABLE      0x01


OK

root@localhost:/usr/bin# sudo qmicli --help-all
Usage:
  qmicli [OPTION...] - Control QMI devices

Help Options:
  -h, --help                                                                                   Show help options
  --help-all                                                                                   Show all help options
  --help-dms                                                                                   Show Device Management Service options
  --help-nas                                                                                   Show Network Access Service options
  --help-wds                                                                                   Show Wireless Data Service options
  --help-pbm                                                                                   Show Phonebook Management options
  --help-uim                                                                                   Show User Identity Module options
  --help-wms                                                                                   Show Wireless Messaging Service options
  --help-wda                                                                                   Show Wireless Data Administrative options
  --help-voice

i don’t see problem, maybe you can check the version:

owner@ubuntu:~$ sudo qmicli --help
[sudo] password for owner: 
Usage:
  qmicli [OPTION…] - Control QMI devices

Help Options:
  -h, --help                                                                                   Show help options
  --help-all                                                                                   Show all help options
  --help-dms                                                                                   Show Device Management Service options
  --help-nas                                                                                   Show Network Access Service options
  --help-wds                                                                                   Show Wireless Data Service options
  --help-pbm                                                                                   Show Phonebook Management options
  --help-pdc                                                                                   Show platform device configurations options
  --help-uim                                                                                   Show User Identity Module options
  --help-wms                                                                                   Show Wireless Messaging Service options
  --help-wda                                                                                   Show Wireless Data Administrative options
  --help-voice                                                                                 Show Voice Service options
  --help-loc                                                                                   Show location options
  --help-qos                                                                                   Show Quality of Service options

Application Options:
  -d, --device=[PATH]                                                                          Specify device path
  -w, --get-wwan-iface                                                                         Get the WWAN iface name associated with this control port
  -e, --get-expected-data-format                                                               Get the expected data format in the WWAN iface
  -E, --set-expected-data-format=[802-3|raw-ip]                                                Set the expected data format in the WWAN iface
  --get-service-version-info                                                                   Get service version info
  --device-set-instance-id=[Instance ID]                                                       Set instance ID
  --device-open-version-info                                                                   Run version info check when opening device
  --device-open-sync                                                                           Run sync operation when opening device
  -p, --device-open-proxy                                                                      Request to use the 'qmi-proxy' proxy
  --device-open-qmi                                                                            Open a cdc-wdm device explicitly in QMI mode
  --device-open-mbim                                                                           Open a cdc-wdm device explicitly in MBIM mode
  --device-open-auto                                                                           Open a cdc-wdm device in either QMI or MBIM mode (default)
  --device-open-net=[net-802-3|net-raw-ip|net-qos-header|net-no-qos-header]                    Open device with specific link protocol and QoS flags
  --client-cid=[CID]                                                                           Use the given CID, don't allocate a new one
  --client-no-release-cid                                                                      Do not release the CID when exiting
  -v, --verbose                                                                                Run action with verbose logs, including the debug ones
  --silent                                                                                     Run action with no logs; not even the error/warning ones
  -V, --version                                                                                Print version

owner@ubuntu:~$ sudo qmicli --version

qmicli 1.22.0
Copyright (C) 2012-2019 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.

It seems to be a version problem, but I did confirm the update, are there any restrictions?

root@localhost:/usr/bin# sudo qmicli --version

qmicli 1.16.2
Copyright (C) 2015 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.

root@localhost:/usr/bin# sudo apt-get install libqmi-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
libqmi-utils is already the newest version (1.16.2-1ubuntu0.16.04.1).
0 upgraded, 0 newly installed, 0 to remove and 101 not upgraded.

Seems you are using ubuntu 16, have you tried ubuntu 18 or ubuntu 20?
My test is based on ubuntu 18.

https://ubuntu.pkgs.org/20.04/ubuntu-universe-arm64/libqmi-utils_1.24.8-1_arm64.deb.html