EM9291 how to get data connection to work in Linux

I have two identical devices with two different modems. Device A has the ability to switch between Windows and Linux (I have two SSDs that I switch.) Device B, is closed and can only run Linux (no access to the SSD.) For production, we will only run Linux and not have the option of Windows.

For device A, using an EM9291 with T-Mobile. The hardware works in Windows after putting the firmware into “AUTO-SIM” mode. If I think go into Linux, I’m able to ping and get data over the cellular connection.

If I use the same T-Mobile SIM in device B the data connection still doesn’t work. Device B is in AUTO-SIM mode using /fw-download-toolhostx86_64 (see How to set "AUTO-SIM" mode in Linux with default drivers)

Both devices run FC40 with NetworkManager and ModemManager enabled. I also have mobile-broadband-provider-info installed. Device A will work with the APN either determined from the mobile-broadband-provider-info database or set manually. Device B never works. If I set the APN manually, the device gets an IPv4 address, but cannot ping anything.

Is there a way to compare the settings between the two devices to understand why it won’t connect if its not brough up in Windows first?

What modem is used in device B?
EM9291?

You can compare the following AT commands:

ATI3
at!impref?
at+Cfun?
at!PCinfo?
at!gstatus?
AT+Cpin?
at+cgdcont?
at!uims?
at!selrat?
AT!band?

Hi,

Device A and Device B’s hardware are identical. Both have EM9291. The only different is device A is open, so I can change the SSD.

Is there a way to get the output of those commands using the standard Linux drivers? Because the SW drivers aren’t available as an RPM, I can’t install them, so it makes getting the serial interface difficult. (I can’t change the device to USB mode because of a PCIe issue), so I’m stuck with MBIM over PCIe.

are you able to install VMware in Device B?
In this case, you can install a Ubuntu 18 to use AT command

Device A is the engineering machine and device B is the production version. We can’t install a VM. Is it possible to get these over QMI or MBIM?

no, i don’t think you can do AT command over QMI or MBIM

Installing a VMWARE or installing USB driver in device B seems to be the easiest way to debug

BTW, did you see the qcserial driver has been installed in your Fedora?
If yes, you can try the following to add VID PID to qcserial and see if the AT command port can be enumerated:

I’ve spent some time trying to debug this. I have two modems, both with T-Mobile SIMs. One won’t pick up a data connection, ModemManager has an error about cannot disable multiplex support. Everything else looks similar between the two devices. Any thoughts about what’s happening?

Modem with issue: mmcli bearer output

$ mmcli -m 0 -b 0
  --------------------------------------
  General    |                     path: /org/freedesktop/ModemManager1/Bearer/0
             |                     type: default
  --------------------------------------
  Status     |                connected: no
             |    connection error name: org.freedesktop.ModemManager1.Error.Core.Unsupported
             | connection error message: Cannot disable multiplex support
             |                suspended: no
             |              multiplexed: no
             |               ip timeout: 20
  --------------------------------------
  Properties |                      apn: fast.t-mobile.com
             |                  roaming: allowed
             |                  ip type: ipv4v6
  --------------------------------------
  Statistics |                 attempts: 13
             |                 attempts: 13

Modem with issue: AT Commands

ATI3

Manufacturer: Sierra Wireless, Incorporated
Model: EM9291
Revision: SWIX65C_02.15.01.00 5268b2 jenkins 2023/11/17 22:12:47
IMEI: 3***7
IMEI SV:  2
FSN: 8***1
+GCAP: +CGSM


OK
AT!IMPREF?

!IMPREF:
 preferred fw version:    00.00.00.00
 preferred carrier name:  AUTO-SIM
 preferred config name:   AUTO-SIM_000.000_000
 preferred subpri index:  000
 current fw version:      02.15.01.00
 current carrier name:    GENERIC
 current config name:     GENERIC_030.054_001
 current subpri index:    000

OK
AT+CFUN?

+CFUN: 1

OK
AT!PCINFO?

State: Online
LPM voters - Temp:0, Volt:0, User:0, W_DISABLE:0, IMSWITCH:0, BIOS:0, LWM2M:0, OMADM:0, FOTA:0, NVCRIT:0, RFCAL:0, MMWCAL:0, RFC_INIT:0
LPM persistence - None

OK
AT!GSTATUS?

!GSTATUS:
Current Time:  5215             Temperature: 33
Thermal Mitigation Level: 0

Reset Counter: 1                Mode:        ONLINE
System mode:   NR5G             PS state:    Attached
MM5G state:    Registered       Normal Service
RRC state:     RRC Idle
IMS reg state: NOT REGISTERED   IMS mode:    Normal
IMS Srv State: UNKNOWN SMS,UNKNOWN VoIP

NR5G TAC:        59ed00                 NR5G Cell ID:    147AF9137 (5497655607)
NR5G band:       n41                    NR5G Carrier ID: 0
NR5G dl bw:      40 MHz                 NR5G ul bw:      40 MHz
NR5G Tx Power:   ---                    NR5G Tx chan:    0
NR5G Rx chan:    530124
NR5G dl MIMO:    4                      NR5G ul MIMO:    1
NR5G(sub6) Rx0 RSSI (dBm):   -78.9      NR5G(sub6) Rx1 RSSI (dBm):   -49.9
NR5G(sub6) Rx2 RSSI (dBm):   ---        NR5G(sub6) Rx3 RSSI (dBm):   ---

NR5G RSRP (dBm): -77                    NR5G RSRQ (dB):  -11
NR5G SINR (dB):  23.5


OK
AT+CPIN?

+CPIN: READY

OK
AT+CGDCONT?

+CGDCONT: 1,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0,,,,,,,,,"",,,,0
+CGDCONT: 2,"IPV4V6","ims","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0,,,,,,,,,"",,,,0

OK
AT!UIMS?

!UIMS: 0

OK
AT!SELRAT?

!SELRAT: 00, Automatic


OK
AT!BAND?

Index, Name
00, All bands

OK

Modem without issue: AT commands

OK
ATI3

Manufacturer: Sierra Wireless, Incorporated
Model: EM9291
Revision: SWIX65C_02.15.01.00 5268b2 jenkins 2023/11/17 22:12:47
IMEI: 3***3
IMEI SV:  2
FSN: 8***1
+GCAP: +CGSM


OK
AT!IMPREF?

!IMPREF:
 preferred fw version:    00.00.00.00
 preferred carrier name:  AUTO-SIM
 preferred config name:   AUTO-SIM_000.000_000
 preferred subpri index:  000
 current fw version:      02.15.01.00
 current carrier name:    GENERIC
 current config name:     GENERIC_030.054_001
 current subpri index:    000

OK
AT+CFUN?

+CFUN: 1

OK
AT!PCINFO?

State: Online
LPM voters - Temp:0, Volt:0, User:0, W_DISABLE:0, IMSWITCH:0, BIOS:0, LWM2M:0, OMADM:0, FOTA:0, NVCRIT:0, RFCAL:0, MMWC0
LPM persistence - None

OK
AT!GSTATUS?

!GSTATUS:
Current Time:  27772            Temperature: 27
Thermal Mitigation Level: 0

Reset Counter: 1                Mode:        ONLINE
System mode:   LTE              PS state:    Attached
LTE band:      B66              LTE bw:      10 MHz
LTE Rx chan:   67086            LTE Tx chan: 132622
EMM state:     Registered       Normal Service
RRC state:     RRC Idle
IMS reg state: REGISTERED       IMS mode:    Normal
IMS Srv State: FULL SMS,NO VoIP

PCC Rx0 RSSI:  -68.9            PCC Rx0 RSRP:  -97.8
PCC Rx1 RSSI:  -97.6            PCC Rx1 RSRP:  -134.5
PCC Tx Power:  ---              TAC:         6a44 (27204)
RSRQ (dB):     -12.0            Cell ID:     07F1F016 (133296150)
SINR (dB):      4.4

NR5G band:       ---            NR5G bw:         ---
NR5G Tx Power:   ---            NR5G Tx chan:    ---
NR5G Rx chan:    ---            NR5G RSRP (dBm): ---
NR5G RSRQ (dB):  ---            NR5G SINR (dB):  ---


OK
AT+CPIN?

+CPIN: READY

OK
at+cgdcont?

+CGDCONT: 1,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0,,,,,,,,,"",,,,0
+CGDCONT: 2,"IPV4V6","ims","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0,,,,,,,,,"",,,,0

OK
at!uims?

!UIMS: 0

OK
at!selrat?

!SELRAT: 00, Automatic


OK
at!band?

Index, Name
00, All bands

OK

how about using the latest version of TMO FW?
https://source.sierrawireless.com/resources/airprime/software/em929x/em92-approved-fw-packages/#sthash.HdU4SQ9q.x6av1O6b.dpbs

How about using TMO in AT!IMPREF? instead of using AUTO-SIM?

I don’t know where the units will be located, or what carrier they will use so I would like to use the auto-sim mode. Also, the two modems have identical firmware, and one works but one doesn’t. We have now about 10 modems and no pattern as to which modems will with and which won’t. We do notice that most don’t work right away, but then once they start working, they are fairly likely to continue working, even if we change carriers

Are there some other commands we can look at?

What does the error about the multiplexor mean?

how about comparing AT+CGPADDR=1 which is the IP address assigned from the network?

I can see there is no APN set in AT+CGDCONT?, is it normal?
I remember for TMO, we need to set APN.

In addition, are you able to establish data connection via MBIM interface in linux?


owner@CNHKG-EX-001367:~/legato/workspace/git/mangOH_2-7-2019$ cat /etc/mbim-network.conf 
APN=hkcsl
APN_USER=
APN_PASS=
APN_AUTH=
PROXY=yes

owner@CNHKG-EX-001367:~/legato/workspace/git/mangOH_2-7-2019$sudo mbim-network /dev/cdc-wdm0 start
Loading profile...
    APN: hkcsl
Querying subscriber ready status 'mbimcli -d /dev/cdc-wdm0 --query-subscriber-ready-status --no-close'...
[/dev/cdc-wdm0] Subscriber ready status retrieved: Ready state: 'initialized' Subscriber ID: '454003074155184' SIM ICCID: '8985200012741551847' Ready info: 'unknown' Telephone numbers: (0) 'unknown' [/dev/cdc-wdm0] Session not closed: TRID: '3'
Saving state... (TRID: 3)
Querying registration state 'mbimcli -d /dev/cdc-wdm0 --query-registration-state --no-open=3 --no-close'...
[/dev/cdc-wdm0] Registration status: Network error: 'unknown' Register state: 'home' Register mode: 'automatic' Available data classes: 'lte' Current cellular class: 'gsm' Provider ID: '45400' Provider name: '1O1O' Roaming text: 'unknown' Registration flags: 'unknown' [/dev/cdc-wdm0] Session not closed: TRID: '4'
Saving state... (TRID: 4)
Attaching to packet service with 'mbimcli -d /dev/cdc-wdm0 --attach-packet-service --no-open=4 --no-close'...
Saving state... (TRID: 5)
Starting network with 'mbimcli -d /dev/cdc-wdm0 --connect=hkcsl --no-open=5 --no-close'...
Network started successfully
Saving state... (TRID: 6)

Lastly, if you swap the device B (NOK case originally in linux) to device A (OK case originally in windows), what will happen?

I checked AT+CGDCONT? and it is the same between the working and not working modem. The APN is set automatically by ModemManager when you have the mobile-broadband-service-provider package installed. This is installed on both units. You can see the non-working modem’s bearer output has the correct APN populated.

I checked AT+CGPADDR=1 the working modem has an IP address the non-working modem does not.

I also tried mbim-network start and it completed successfully, but network manager still is not able get an IP. See the output below.

# sudo mbim-network /dev/wwan0mbim0 start
Loading profile at /etc/mbim-network.conf...
    APN: fast.t-mobile.com
    APN auth protocol: unset
    APN user: unset
    APN password: unset
    mbim-proxy: no
Loading previous state from /tmp/mbim-network-state-wwan0mbim0...
    Previous Transaction ID: 6
error: no actions specified
Clearing state at /tmp/mbim-network-state-wwan0mbim0...
Querying subscriber ready status 'mbimcli -d /dev/wwan0mbim0 --query-subscriber-ready-status --no-close'...
[/dev/wwan0mbim0] Subscriber ready status retrieved: Ready state: 'initialized' Subscriber ID: '310260443004628' SIM ICCID: '8901260444730046287F' Ready info: 'none' Telephone numbers: (1) '15517552412' [/dev/wwan0mbim0] Session not closed: TRID: '3'
Querying registration state 'mbimcli -d /dev/wwan0mbim0 --query-registration-state --no-open=3 --no-close'...
[/dev/wwan0mbim0] Registration status: Network error: 'none' Register state: 'home' Register mode: 'automatic' Available data classes: 'custom' Current cellular class: 'gsm' Provider ID: '310260' Provider name: 'T-Mobile' Roaming text: 'unknown' Registration flags: 'packet-service-automatic-attach' [/dev/wwan0mbim0] Session not closed: TRID: '4'
Attaching to packet service with 'mbimcli -d /dev/wwan0mbim0 --attach-packet-service --no-open=4 --no-close'...
[/dev/wwan0mbim0] Successfully attached to packet service [/dev/wwan0mbim0] Packet service status: Network error: 'none' Packet service state: 'attached' Available data classes: 'custom' Uplink speed: '1497000000 bps' Downlink speed: '3951000000 bps' [/dev/wwan0mbim0] Session not closed: TRID: '5'
Starting network with 'mbimcli -d /dev/wwan0mbim0 --connect=apn='fast.t-mobile.com' --no-open=5 --no-close'...
warning: key 'apn' is deprecated, use 'access-string' instead
Network started successfully
Saving state at /tmp/mbim-network-state-wwan0mbim0... (TRID: 7)

One thing I noticed, is on the working modem, the “access tech” listed in mmcli is usually LTE and 5gnr (although it can work with only 5gnr). In the non-working modem it is only 5gnr. I’ve only seen the modem work when it has both access techs.

Also, when I try to activate the connection with nmcli, I get the follow error:

# sudo nmcli connection up gsm
Error: Connection activation failed: Unknown error
Hint: use 'journalctl -xe NM_CONNECTION=7b1e1dd0-8201-4296-bea4-dba7e325335f + NM_DEVICE=wwan0qmi0' to get more details.

# journalctl -xe NM_CONNECTION=7b1e1dd0-8201-4296-bea4-dba7e325335f + NM_DEVICE=wwan0qmi0
Dec 19 03:04:34 hostname NetworkManager[3284]: <warn>  [1734595474.5668] modem-broadband[wwan0qmi0]: failed to connect modem: Cannot disable multiplex support
Dec 19 03:04:34 hostname NetworkManager[3284]: <info>  [1734595474.5668] device (wwan0qmi0): state change: prepare -> failed (reason 'unknown', sys-iface-state: 'managed')
Dec 19 03:04:34 hostname NetworkManager[3284]: <warn>  [1734595474.5670] device (wwan0qmi0): Activation: failed for connection 'gsm'
Dec 19 03:04:34 hostname NetworkManager[3284]: <info>  [1734595474.5671] device (wwan0qmi0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Dec 19 03:04:43 hostname NetworkManager[3284]: <info>  [1734595483.2707] device (wwan0qmi0): Activation: starting connection 'gsm' (e9cdbaae-4fdd-455d-a9de-16203974292a)
Dec 19 03:04:43 hostname NetworkManager[3284]: <info>  [1734595483.2708] device (wwan0qmi0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Dec 19 03:04:43 hostname NetworkManager[3284]: <warn>  [1734595483.3630] modem-broadband[wwan0qmi0]: failed to connect modem: Cannot disable multiplex support
Dec 19 03:04:43 hostname NetworkManager[3284]: <info>  [1734595483.3630] device (wwan0qmi0): state change: prepare -> failed (reason 'unknown', sys-iface-state: 'managed')
Dec 19 03:04:43 hostname NetworkManager[3284]: <warn>  [1734595483.3636] device (wwan0qmi0): Activation: failed for connection 'gsm'
Dec 19 03:04:43 hostname NetworkManager[3284]: <info>  [1734595483.3639] device (wwan0qmi0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')

From the AT log above, the working modem is using LTE in AT!GSTATUS?
But the NOK modem is using NR5G.
I wonder if you force the NOK module to use LTE mode by AT!SELRAT, will it work?

I tried setting AT!SELRAT=06 and saw it was restricted to LTE, but when I go to activate the connection in NetworkManager, I still get the modem-broadband[wwan0qmi0]: failed to connect modem: Cannot disable multiplex support error and the connection fails to activate.

The OK modem goes through the process and has no warning or errors.

Here is a successful activation:

Dec 19 03:19:58 hostname NetworkManager[1326]: <info>  [1734596398.9652] manager: (wwan0qmi0): new Broadband device (/org/freedesktop/NetworkManager/Devices/16)
Dec 19 03:19:58 hostname NetworkManager[1326]: <info>  [1734596398.9653] device (wwan0qmi0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Dec 19 03:19:58 hostname NetworkManager[1326]: <info>  [1734596398.9654] device (wwan0qmi0): modem state 'enabling'
Dec 19 03:19:58 hostname NetworkManager[1326]: <info>  [1734596398.9655] device (wwan0qmi0): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'managed')
Dec 19 03:19:58 hostname NetworkManager[1326]: <info>  [1734596398.9658] device (wwan0qmi0): Activation: starting connection 'gsm' (23f9118b-8083-4c96-a968-6de9dcc4f6ee)
Dec 19 03:19:58 hostname NetworkManager[1326]: <info>  [1734596398.9658] device (wwan0qmi0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Dec 19 03:19:59 hostname NetworkManager[1326]: <info>  [1734596399.5717] device (wwan0qmi0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Dec 19 03:19:59 hostname NetworkManager[1326]: <info>  [1734596399.5728] device (wwan0qmi0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Dec 19 03:19:59 hostname NetworkManager[1326]: <info>  [1734596399.5743] device (wwan0qmi0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
Dec 19 03:19:59 hostname NetworkManager[1326]: <info>  [1734596399.6078] device (wwan0qmi0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Dec 19 03:19:59 hostname NetworkManager[1326]: <info>  [1734596399.6079] device (wwan0qmi0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Dec 19 03:19:59 hostname NetworkManager[1326]: <info>  [1734596399.6082] device (wwan0qmi0): Activation: successful, device activated.
``

if you force it to LTE mode now, can it get IP address in AT+CGPADDR=1 just like the OK module ?

BTW, it is also quite strange to use wwan0qmi0
I assume you have set the module to use MBIM in AT!USBCOMP?

Lastly, after “sudo mbim-network /dev/cdc-wdm0 start”, if you type “sudo dhclient wwan0”, are you able to get the IP address for the host linux platform?

We wound up changing the modem from PCIe communication to USB, since it seems like PCIe isn’t well supported. USB communications seem to work better. When we put the modems in USB mode, they connect right away.

One note, when we put the modem in USB mode it pulls PCIE_PERST_N low even though it’s an input. We had this pin shared with other device’s reset pins, and caused issue.

However, the modem is still not supported natively in Linux. I did use the echo 1199 90c3 >/sys/bus/usb-serial/drivers/option1/new_id trick to get the serial interfaces to show up. It would like to change the PID to 9190, like the linked article suggested, but I’m unable to get the modem to take the new PID.

AT
OK
AT!ENTERCND="A710"
OK
AT!USBPID?
!USBPID:
APP : 90E3
BOOT: 90E2

OK
AT!USBPID=?
APP   BOOT
90E3, 90E2


OK
AT!USBPID=9091
ERROR
AT!USBPID="9091"
ERROR
AT!USBPID="9091,9091"
ERROR
AT!USBPID=APP=9091
ERROR
AT!USBPID="APP=9091"
ERROR

Any thoughts on how to get it to take the new PID?

Have you installed the official MBPL driver in linux?

https://source.sierrawireless.com/resources/airprime/software/mbpl/mbpl-software-latest/

Yes, we installed the official MBPL drivers (both version r40 and r42). However, we noticed that the signal strength is reported incorrectly. It shows between 0 and 30%. If we use the Semtech MHI driver, it reports correctly (around 80%).

How can we get the MBPL USB drivers to report the correct value to ModemManager?

what is the return of “AT!GSTATUS?” now?
How many antennas have been connected?

The USB mode shows the following for AT!GSTATUS?

AT!GSTATUS?

!GSTATUS:
Current Time:  1628             Temperature: 30
Thermal Mitigation Level: 0

Reset Counter: 1                Mode:        ONLINE

We have four antennae connected. We see the same behavior with either 3 (ANT0,1 and 3) or 4 antennae connected.

Not quite sure why you cannot see the system mode to be LTE/WCDMA/ENDC etc…
Even with no SIM card, I can still see the system mode with my module in dev kit:

ati3
Manufacturer: Sierra Wireless, Incorporated
Model: EM9291
Revision: SWIX65C_02.17.08.00 944ad5 jenkins 2024/08/01 20:22:05
IMEI: 358186652112345
IMEI SV:  5
FSN: 83403270212345
+GCAP: +CGSM


OK
at!gstatus?
!GSTATUS:
Current Time:  40               Temperature: 25

Reset Counter: 1                Mode:        LOW POWER MODE


OK
at+cfun?
+CFUN: 0

OK
at+cfun=1
OK
at!gstatus?
!GSTATUS:
Current Time:  50               Temperature: 25

Reset Counter: 1                Mode:        ONLINE
System mode:   WCDMA            PS state:    Not attached
WCDMA band:    WCDMA 2100
WCDMA channel: 10564
GMM (PS) state:DEREGISTERED     NO IMSI
MM (CS) state: IDLE             NO IMSI

WCDMA L1 state:L1M_PCH_SLEEP    LAC:         1F4A (8010)
RRC state:     DISCONNECTED     UTRAN Cell ID: 006595C6 (6657478)
Rx0 RSSI C0:   -75.6            Rx1 RSSI C0:  ---
Rx0 RSSI C1:    ---             Rx1 RSSI C1:  ---


OK
at!pcinfo?
State: Low Power Mode
LPM voters - Temp:0, Volt:0, User:1, W_DISABLE:0, IMSWITCH:0, BIOS:0, LWM2M:0, OMADM:0, FOTA:0, NVCRIT:0, RFCAL:0, MMWCAL:0, RFC_INIT:0
LPM persistence - User:1

OK
at!selrat?
!SELRAT: 00, Automatic


OK
at!band?
Index, Name
00, All bands

OK
at!impref?
!IMPREF:
 preferred fw version:    02.17.08.00
 preferred carrier name:  GENERIC
 preferred config name:   GENERIC_030.081_000
 preferred subpri index:  000
 current fw version:      02.17.08.00
 current carrier name:    GENERIC
 current config name:     GENERIC_030.081_000
 current subpri index:    000

OK
at!uims?
!UIMS: 0

OK
at+cpin?
+CME ERROR: SIM not inserted