ModemManager with Sierra EM7305 and GPS

Petr Kloc petr_kloc at yahoo.com
Mon Jun 12 12:41:42 UTC 2017


Dear developers.


I have a device with embedded Sierra Wireless EM7305 modem. The device is running custom based linux alongside MS Windows (dualboot). I am trying to use the full modem capability in linux while retaining its basic functionality in MS Windows.

The EM7305 modem has several USB compositions it can be switched to (see list at the end of the email). Unfortunately switching it to different composition than the default #14 cause the modem to stop working in MS Windows. 

By default the modem is switched to Configuration 2 (MBIM only) and supported by cdc_mbim module. In this state the networking part does work flawlessly. But I did not find a way how to enable the GPS functionality.

I can switch the module to Configuration 1 (DM NMEA AT QMI) and use either qcserial or qmi_wwan module to grab the device. Unfortunately here I run into problems. The qmi_wwan does grab 3 out of 4 exposed interfaces, but the ModemManager still claims, that no modem is present.

The qcserial module exposes AT command interface and i can issue commands to the modem. The modem is even recognized and can be controlled using AT command. Unfortunately an attempt to establish connection via NetworkManager result in failure and rejection of successive commands. The logs are also included at the end of this email. 

I would appreciate any advice how to get both GPS and modem capability working. 

On the unrelated not I did not manage to find out which kernel module is responsible for handling the NMEA interface. If I force-load qcserail, it grabs 3 out of the 4 exposed interfaces, but neither of the associated device nodes seems to be NMEA port.

I would appreciate any help on this topic.

Regards
Petr Kloc 






USB compositions:
   0 - HIP  DM    NMEA  AT    MDM1  MDM2  MDM3  MS      NOT SUPPORTED
   1 - HIP  DM    NMEA  AT    MDM1  MS                  SUPPORTED
   2 - HIP  DM    NMEA  AT    NIC1  MS                  NOT SUPPORTED
   3 - HIP  DM    NMEA  AT    MDM1  NIC1  MS            NOT SUPPORTED
   4 - HIP  DM    NMEA  AT    NIC1  NIC2  NIC3  MS      NOT SUPPORTED
   5 - HIP  DM    NMEA  AT    ECM1  MS                  NOT SUPPORTED
   6 - DM   NMEA  AT    QMI                             SUPPORTED
   7 - DM   NMEA  AT    RMNET1 RMNET2 RMNET3            SUPPORTED
   8 - DM   NMEA  AT    MBIM                            SUPPORTED
   9 - MBIM                                             SUPPORTED
  10 - NMEA MBIM                                        SUPPORTED
  11 - DM   MBIM                                        SUPPORTED
  12 - DM   NMEA  MBIM                                  SUPPORTED
  13 - Config1: comp6    Config2: comp8                 NOT SUPPORTED
* 14 - Config1: comp6    Config2: comp9                 SUPPORTED
  15 - Config1: comp6    Config2: comp10                NOT SUPPORTED
  16 - Config1: comp6    Config2: comp11                NOT SUPPORTED
  17 - Config1: comp6    Config2: comp12                NOT SUPPORTED
  18 - Config1: comp7    Config2: comp8                 NOT SUPPORTED
  19 - Config1: comp7    Config2: comp9                 SUPPORTED
  20 - Config1: comp7    Config2: comp10                NOT SUPPORTED
  21 - Config1: comp7    Config2: comp11                NOT SUPPORTED
  22 - Config1: comp7    Config2: comp12                NOT SUPPORTED


ModemManager --debug log part:
ModemManager[1463]: <info>  [1497037357.892382] [mm-iface-modem-simple.c:641] connect_auth_ready(): Simple connect started...
ModemManager[1463]: <debug> [1497037357.892412] [mm-iface-modem-simple.c:651] connect_auth_ready():    PIN: unspecified
ModemManager[1463]: <debug> [1497037357.892423] [mm-iface-modem-simple.c:653] connect_auth_ready():    Operator ID: unspecified
ModemManager[1463]: <debug> [1497037357.892434] [mm-iface-modem-simple.c:655] connect_auth_ready():    Allowed roaming: yes
ModemManager[1463]: <debug> [1497037357.892444] [mm-iface-modem-simple.c:657] connect_auth_ready():    APN: internet.t-mobile.cz
ModemManager[1463]: <debug> [1497037357.892458] [mm-iface-modem-simple.c:662] connect_auth_ready():    IP family: ipv4v6
ModemManager[1463]: <debug> [1497037357.892470] [mm-iface-modem-simple.c:673] connect_auth_ready():    Allowed authentication: unspecified
ModemManager[1463]: <debug> [1497037357.892499] [mm-iface-modem-simple.c:675] connect_auth_ready():    User: unspecified
ModemManager[1463]: <debug> [1497037357.892511] [mm-iface-modem-simple.c:677] connect_auth_ready():    Password: unspecified
ModemManager[1463]: <debug> [1497037357.892528] [mm-iface-modem-simple.c:679] connect_auth_ready():    Number: *99#
ModemManager[1463]: <info>  [1497037357.892537] [mm-iface-modem-simple.c:469] connection_step(): Simple connect state (4/8): Wait to get fully enabled
ModemManager[1463]: <info>  [1497037357.892581] [mm-iface-modem-simple.c:478] connection_step(): Simple connect state (5/8): Register
ModemManager[1463]: <debug> [1497037357.892607] [mm-iface-modem-3gpp.c:400] mm_iface_modem_3gpp_register_in_network(): Already registered in network '23001', automatic registration not launched...
ModemManager[1463]: <info>  [1497037357.892631] [mm-iface-modem-simple.c:501] connection_step(): Simple connect state (6/8): Bearer
ModemManager[1463]: <debug> [1497037357.892645] [mm-iface-modem-simple.c:521] connection_step(): Creating new bearer...
ModemManager[1463]: <debug> [1497037357.892656] [mm-broadband-modem.c:297] modem_create_bearer(): Creating Broadband bearer in broadband modem
ModemManager[1463]: <debug> [1497037357.892878] [mm-port-serial.c:1292] mm_port_serial_open(): (ttyUSB1) device open count is 2 (open)
ModemManager[1463]: <debug> [1497037357.892902] [mm-port-serial.c:1349] _close_internal(): (ttyUSB1) device open count is 1 (close)
ModemManager[1463]: <debug> [1497037357.892950] [mm-broadband-modem.c:258] modem_create_bearer_finish(): New bearer created at DBus path '/org/freedesktop/ModemManager1/Bearer/0'
ModemManager[1463]: <info>  [1497037357.893053] [mm-iface-modem-simple.c:583] connection_step(): Simple connect state (7/8): Connect
ModemManager[1463]: <debug> [1497037357.893076] [mm-base-bearer.c:703] mm_base_bearer_connect(): Connecting bearer '/org/freedesktop/ModemManager1/Bearer/0'
ModemManager[1463]: <info>  [1497037357.893096] [mm-iface-modem.c:1433] __iface_modem_update_state_internal(): Modem /org/freedesktop/ModemManager1/Modem/0: state changed (registered -> connecting)
ModemManager[1463]: <debug> [1497037357.893279] [mm-broadband-bearer.c:1263] connect(): Launching 3GPP connection attempt with APN 'internet.t-mobile.cz'
ModemManager[1463]: <debug> [1497037357.893298] [mm-broadband-bearer.c:1052] connect_3gpp(): Looking for best CID...
ModemManager[1463]: <debug> [1497037357.893313] [mm-port-serial.c:1292] mm_port_serial_open(): (ttyUSB1) device open count is 2 (open)
ModemManager[1463]: <debug> [1497037357.893340] [mm-port-serial-at.c:459] debug_log(): (ttyUSB1): --> 'AT+CGDCONT?<CR>'
ModemManager[1463]: <debug> [1497037357.908702] [mm-port-serial-at.c:459] debug_log(): (ttyUSB1): <-- '<CR><LF>+CGDCONT: 1,"IP","internet.t-mobile.cz","0.0.0.0",0,0<CR><LF>+CGDCONT: 2,"IPV4V6","internet.t-mobile.cz","0.0.0.0",0,0<CR><LF>+CGDCONT: 3,"IPV4V6","","0.0.0.0",0,0<CR><LF><CR><LF>OK<CR><LF>'
ModemManager[1463]: <debug> [1497037357.909020] [mm-broadband-bearer.c:969] parse_pdp_list(): Found '3' PDP contexts
ModemManager[1463]: <debug> [1497037357.909053] [mm-broadband-bearer.c:978] parse_pdp_list():   PDP context [cid=1] [type='ipv4'] [apn='internet.t-mobile.cz']
ModemManager[1463]: <debug> [1497037357.909065] [mm-broadband-bearer.c:978] parse_pdp_list():   PDP context [cid=2] [type='ipv4v6'] [apn='internet.t-mobile.cz']
ModemManager[1463]: <debug> [1497037357.909074] [mm-broadband-bearer.c:978] parse_pdp_list():   PDP context [cid=3] [type='ipv4v6'] [apn='']
ModemManager[1463]: <debug> [1497037357.909085] [mm-broadband-bearer.c:1002] parse_pdp_list(): Found PDP context with CID 2 and PDP type ipv4v6 for APN 'internet.t-mobile.cz'
ModemManager[1463]: <debug> [1497037357.909114] [mm-port-serial.c:1292] mm_port_serial_open(): (ttyUSB1) device open count is 3 (open)
ModemManager[1463]: <debug> [1497037357.909127] [mm-broadband-bearer.c:214] common_get_at_data_port(): Connection through a plain serial AT port (ttyUSB1)
ModemManager[1463]: <debug> [1497037357.909152] [mm-port-serial.c:1292] mm_port_serial_open(): (ttyUSB1) device open count is 4 (open)
ModemManager[1463]: <debug> [1497037357.909182] [mm-port-serial.c:1349] _close_internal(): (ttyUSB1) device open count is 3 (close)
ModemManager[1463]: <debug> [1497037357.909212] [mm-port-serial-at.c:459] debug_log(): (ttyUSB1): --> 'ATD*99***2#<CR>'
ModemManager[1463]: <debug> [1497037357.924504] [mm-port-serial-at.c:459] debug_log(): (ttyUSB1): <-- '<CR><LF>CONNECT 100000000<CR><LF>'
ModemManager[1463]: <debug> [1497037357.924688] [mm-port.c:95] mm_port_set_connected(): (ttyUSB1): port now connected
ModemManager[1463]: <debug> [1497037357.924811] [mm-port-serial.c:1349] _close_internal(): (ttyUSB1) device open count is 2 (close)
ModemManager[1463]: <debug> [1497037357.924911] [mm-base-bearer.c:601] connect_ready(): Connected bearer '/org/freedesktop/ModemManager1/Bearer/0'
ModemManager[1463]: <info>  [1497037357.925197] [mm-iface-modem.c:1433] __iface_modem_update_state_internal(): Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connecting -> connected)
ModemManager[1463]: <info>  [1497037357.925555] [mm-iface-modem-simple.c:602] connection_step(): Simple connect state (8/8): All done
ModemManager[1463]: <debug> [1497037357.942041] [mm-base-bearer.c:874] mm_base_bearer_disconnect(): Disconnecting bearer '/org/freedesktop/ModemManager1/Bearer/0'
ModemManager[1463]: <info>  [1497037357.942129] [mm-iface-modem.c:1433] __iface_modem_update_state_internal(): Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connected -> disconnecting)
ModemManager[1463]: <debug> [1497037357.942491] [mm-broadband-bearer.c:1571] data_reopen_3gpp(): Reopening data port (ttyUSB1)...
ModemManager[1463]: <debug> [1497037357.942541] [mm-port-serial.c:1612] mm_port_serial_reopen(): (ttyUSB1) reopening port (2)
ModemManager[1463]: <debug> [1497037357.942607] [mm-port-serial.c:1349] _close_internal(): (ttyUSB1) device open count is 1 (close)
ModemManager[1463]: <debug> [1497037357.942621] [mm-port-serial.c:1349] _close_internal(): (ttyUSB1) device open count is 0 (close)
ModemManager[1463]: <debug> [1497037357.942649] [mm-port-serial.c:1365] _close_internal(): (ttyUSB1) closing serial port...
ModemManager[1463]: <debug> [1497037357.942672] [mm-port.c:95] mm_port_set_connected(): (ttyUSB1): port now disconnected
ModemManager[1463]: <debug> [1497037357.943118] [mm-port-serial.c:1413] _close_internal(): (ttyUSB1) serial port closed
ModemManager[1463]: <debug> [1497037358.945191] [mm-port-serial.c:1162] mm_port_serial_open(): (ttyUSB1) opening serial port...
ModemManager[1463]: <warn>  [1497037358.945578] [mm-port-serial.c:513] real_config_fd(): (ttyUSB1): port attributes not fully set
ModemManager[1463]: <debug> [1497037358.945699] [mm-port-serial.c:1292] mm_port_serial_open(): (ttyUSB1) device open count is 1 (open)
ModemManager[1463]: <debug> [1497037358.945753] [mm-port-serial-at.c:495] mm_port_serial_at_run_init_sequence(): (ttyUSB1): running init sequence...
ModemManager[1463]: <debug> [1497037358.945865] [mm-port-serial.c:1292] mm_port_serial_open(): (ttyUSB1) device open count is 2 (open)
ModemManager[1463]: <debug> [1497037358.945983] [mm-broadband-bearer.c:1559] data_reopen_3gpp_ready(): Flashing data port (ttyUSB1)...
ModemManager[1463]: <debug> [1497037358.946112] [mm-port-serial-at.c:459] debug_log(): (ttyUSB1): --> 'ATE0<CR>'
ModemManager[1463]: <debug> [1497037359.948294] [mm-port-serial.c:1349] _close_internal(): (ttyUSB1) device open count is 1 (close)
ModemManager[1463]: <debug> [1497037359.948396] [mm-broadband-bearer.c:1529] data_flash_3gpp_ready(): Sending PDP context deactivation in primary/data port...
ModemManager[1463]: <debug> [1497037359.948547] [mm-port-serial.c:1292] mm_port_serial_open(): (ttyUSB1) device open count is 2 (open)
ModemManager[1463]: <debug> [1497037361.923992] [mm-port-serial-at.c:459] debug_log(): (ttyUSB1): --> 'ATV1<CR>'
ModemManager[1463]: <debug> [1497037364.925279] [mm-port-serial-at.c:459] debug_log(): (ttyUSB1): --> 'AT+CMEE=1<CR>'
ModemManager[1463]: <debug> [1497037367.924638] [mm-port-serial-at.c:459] debug_log(): (ttyUSB1): --> 'ATX4<CR>'
ModemManager[1463]: <debug> [1497037370.924851] [mm-port-serial-at.c:459] debug_log(): (ttyUSB1): --> 'AT&C1<CR>'
ModemManager[1463]: <debug> [1497037373.925172] [mm-port-serial-at.c:459] debug_log(): (ttyUSB1): --> 'AT+CGACT=0,2<CR>'
ModemManager[1463]: <debug> [1497037380.929008] [mm-broadband-modem.c:1991] modem_load_signal_quality(): loading signal quality...
ModemManager[1463]: <debug> [1497037380.929133] [mm-port-serial.c:1292] mm_port_serial_open(): (ttyUSB1) device open count is 3 (open)
ModemManager[1463]: <debug> [1497037383.924600] [mm-broadband-bearer.c:1470] cgact_data_ready(): PDP context deactivation failed (not fatal): Serial command timed out
ModemManager[1463]: <debug> [1497037383.924727] [mm-port-serial.c:1349] _close_internal(): (ttyUSB1) device open count is 2 (close)
ModemManager[1463]: <debug> [1497037383.924899] [mm-base-bearer.c:807] disconnect_ready(): Disconnected bearer '/org/freedesktop/ModemManager1/Bearer/0'
ModemManager[1463]: <info>  [1497037383.925039] [mm-iface-modem.c:1433] __iface_modem_update_state_internal(): Modem /org/freedesktop/ModemManager1/Modem/0: state changed (disconnecting -> registered)
ModemManager[1463]: <debug> [1497037383.927719] [mm-port-serial-at.c:459] debug_log(): (ttyUSB1): --> 'AT+CIND?<CR>'
ModemManager[1463]: <debug> [1497037386.924734] [mm-port-serial.c:1292] mm_port_serial_open(): (ttyUSB1) device open count is 3 (open)
ModemManager[1463]: <debug> [1497037386.924899] [mm-port-serial.c:1349] _close_internal(): (ttyUSB1) device open count is 2 (close)
ModemManager[1463]: <debug> [1497037386.925032] [mm-port-serial-at.c:459] debug_log(): (ttyUSB1): --> 'AT+CSQ<CR>'
ModemManager[1463]: <debug> [1497037389.924885] [mm-port-serial.c:1349] _close_internal(): (ttyUSB1) device open count is 1 (close)
ModemManager[1463]: <debug> [1497037389.925056] [mm-iface-modem.c:1262] signal_quality_check_ready(): Couldn't refresh signal quality: 'Serial command timed out'
ModemManager[1463]: <debug> [1497037410.923033] [mm-broadband-modem.c:1991] modem_load_signal_quality(): loading signal quality...
ModemManager[1463]: <debug> [1497037410.923173] [mm-port-serial.c:1292] mm_port_serial_open(): (ttyUSB1) device open count is 2 (open)
ModemManager[1463]: <debug> [1497037410.923285] [mm-iface-modem.c:1142] expire_signal_quality(): Signal quality value not updated in 60s, marking as not being recent
ModemManager[1463]: <debug> [1497037410.924333] [mm-port-serial-at.c:459] debug_log(): (ttyUSB1): --> 'AT+CIND?<CR>'
ModemManager[1463]: <info>  [1497037411.530741] [mm-iface-modem-simple.c:641] connect_auth_ready(): Simple connect started...
ModemManager[1463]: <debug> [1497037411.530838] [mm-iface-modem-simple.c:651] connect_auth_ready():    PIN: unspecified
ModemManager[1463]: <debug> [1497037411.530862] [mm-iface-modem-simple.c:653] connect_auth_ready():    Operator ID: unspecified
ModemManager[1463]: <debug> [1497037411.530885] [mm-iface-modem-simple.c:655] connect_auth_ready():    Allowed roaming: yes
ModemManager[1463]: <debug> [1497037411.530908] [mm-iface-modem-simple.c:657] connect_auth_ready():    APN: internet.t-mobile.cz
ModemManager[1463]: <debug> [1497037411.530931] [mm-iface-modem-simple.c:662] connect_auth_ready():    IP family: ipv4v6
ModemManager[1463]: <debug> [1497037411.530954] [mm-iface-modem-simple.c:673] connect_auth_ready():    Allowed authentication: unspecified
ModemManager[1463]: <debug> [1497037411.530974] [mm-iface-modem-simple.c:675] connect_auth_ready():    User: unspecified
ModemManager[1463]: <debug> [1497037411.530994] [mm-iface-modem-simple.c:677] connect_auth_ready():    Password: unspecified
ModemManager[1463]: <debug> [1497037411.531014] [mm-iface-modem-simple.c:679] connect_auth_ready():    Number: *99#
ModemManager[1463]: <info>  [1497037411.531123] [mm-iface-modem-simple.c:469] connection_step(): Simple connect state (4/8): Wait to get fully enabled
ModemManager[1463]: <info>  [1497037411.531321] [mm-iface-modem-simple.c:478] connection_step(): Simple connect state (5/8): Register
ModemManager[1463]: <debug> [1497037411.531467] [mm-iface-modem-3gpp.c:400] mm_iface_modem_3gpp_register_in_network(): Already registered in network '23001', automatic registration not launched...
ModemManager[1463]: <info>  [1497037411.531643] [mm-iface-modem-simple.c:501] connection_step(): Simple connect state (6/8): Bearer
ModemManager[1463]: <debug> [1497037411.531746] [mm-iface-modem-simple.c:574] connection_step(): Using already existing bearer at '/org/freedesktop/ModemManager1/Bearer/0'...
ModemManager[1463]: <info>  [1497037411.531811] [mm-iface-modem-simple.c:583] connection_step(): Simple connect state (7/8): Connect
ModemManager[1463]: <debug> [1497037411.531889] [mm-base-bearer.c:703] mm_base_bearer_connect(): Connecting bearer '/org/freedesktop/ModemManager1/Bearer/0'
ModemManager[1463]: <info>  [1497037411.531990] [mm-iface-modem.c:1433] __iface_modem_update_state_internal(): Modem /org/freedesktop/ModemManager1/Modem/0: state changed (registered -> connecting)
ModemManager[1463]: <debug> [1497037411.532642] [mm-broadband-bearer.c:1263] connect(): Launching 3GPP connection attempt with APN 'internet.t-mobile.cz'
ModemManager[1463]: <debug> [1497037411.532703] [mm-broadband-bearer.c:1052] connect_3gpp(): Looking for best CID...
ModemManager[1463]: <debug> [1497037411.532748] [mm-port-serial.c:1292] mm_port_serial_open(): (ttyUSB1) device open count is 3 (open)
ModemManager[1463]: <debug> [1497037413.924638] [mm-port-serial.c:1292] mm_port_serial_open(): (ttyUSB1) device open count is 4 (open)
ModemManager[1463]: <debug> [1497037413.924770] [mm-port-serial.c:1349] _close_internal(): (ttyUSB1) device open count is 3 (close)
ModemManager[1463]: <debug> [1497037413.924891] [mm-port-serial-at.c:459] debug_log(): (ttyUSB1): --> 'AT+CGDCONT?<CR>'
ModemManager[1463]: <debug> [1497037416.923658] [mm-broadband-bearer.c:950] parse_pdp_list(): Unexpected +CGDCONT? error: 'Serial command timed out'
ModemManager[1463]: <debug> [1497037416.923824] [mm-port-serial-at.c:459] debug_log(): (ttyUSB1): --> 'AT+CSQ<CR>'
ModemManager[1463]: <debug> [1497037419.924451] [mm-port-serial.c:1349] _close_internal(): (ttyUSB1) device open count is 2 (close)


More information about the ModemManager-devel mailing list