EM9191 does not bring up the serial interface, works in MBIM-only USB composition

Hi all,
i started testing an EM9191 with a compatible adapter. I am using the Ubuntu 20.04 lts with 5.11.0-27-generic kernel. The modem is recognized and brings up the cdc-mbim interface but not serial interface (/dev/ttyUSBxx). I was able to connect successfully via mbim.
I know that is has to do with the USB composition mode or (and) maybe with the kernel version i am using does not configures correctly the device.
Unfortunately I cannot access the USBCOMP via the at commands to check the programmed value.

I am providing the kernel logs:

[ 7075.385205] usb 2-6: new SuperSpeed Gen 1 USB device number 4 using xhci_hcd
[ 7075.406015] usb 2-6: config 1 has an invalid interface number: 4 but max is 3
[ 7075.406027] usb 2-6: config 1 has no interface number 2
[ 7075.406426] usb 2-6: New USB device found, idVendor=1199, idProduct=90d3, bcdDevice= 0.06
[ 7075.406435] usb 2-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 7075.406440] usb 2-6: Product: Sierra Wireless EM9191
[ 7075.406445] usb 2-6: Manufacturer: Sierra Wireless, Incorporated
[ 7075.406449] usb 2-6: SerialNumber: XXXXXXXXXXXX
[ 7075.437925] cdc_mbim 2-6:1.0: setting rx_max = 16384
[ 7075.438392] cdc_mbim 2-6:1.0: cdc-wdm1: USB WDM device
[ 7075.438732] cdc_mbim 2-6:1.0 wwan0: register 'cdc_mbim' at usb-0000:00:14.0-6, CDC MBIM, 26:5e:43:f6:8d:1c

cat /sys/kernel/debug/usb/devices

T:  Bus=02 Lev=01 Prnt=01 Port=05 Cnt=01 Dev#=  4 Spd=5000 MxCh= 0
D:  Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs=  1
P:  Vendor=1199 ProdID=90d3 Rev= 0.06
S:  Manufacturer=Sierra Wireless, Incorporated
S:  Product=Sierra Wireless EM9191
C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=896mA
A:  FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim
E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
I:  If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
E:  Ad=8e(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=0f(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=83(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=(none)
E:  Ad=84(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms

udevadm info -p /sys/bus/usb/devices/2-6

P: /devices/pci0000:00/0000:00:14.0/usb2/2-6
N: bus/usb/002/004
L: 0
E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb2/2-6
E: DEVNAME=/dev/bus/usb/002/004
E: DEVTYPE=usb_device
E: PRODUCT=1199/90d3/6
E: TYPE=0/0/0
E: MAJOR=189
E: MINOR=131
E: ID_VENDOR=Sierra_Wireless__Incorporated
E: ID_VENDOR_ENC=Sierra\x20Wireless\x2c\x20Incorporated
E: ID_MODEL=Sierra_Wireless_EM9191
E: ID_MODEL_ENC=Sierra\x20Wireless\x20EM9191
E: ID_SERIAL=Sierra_Wireless__Incorporated_Sierra_Wireless_EM9191_8W1042018701A118
E: ID_BUS=usb
E: ID_USB_INTERFACES=:020e00:0a0002:ff0000:ffff30:
E: ID_VENDOR_FROM_DATABASE=Sierra Wireless, Inc.
E: ID_PATH=pci-0000:00:14.0-usb-0:6
E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_6

Until now I was lucky and my other modems worked out of the box so I have no experience configuring the USB composition mode (usb_modeswitch whatsoever), but any hints and information would be greatly appreciated.

Thanks in advance!

I tested it also tested with Windows drivers, the modem only exposes the Serial Wireless DM port and not the AT serial port.
So I have to find a way to make the modem to expose the serial AT port , it has not to do with Windows or Linux.

This is a serial function with no driver bound. Most likely the AT command port you are looking for.

This is a DM function with no driver bound. We recongnize that based on the ff/ff/30 class/subclass/protocol code, which seems to be used universally by the newer Qualcomm chips (sdx55 etc).

So your modem is exposing the functions you are looking for. There just isn’t any driver for them yet. There was a patch posted earlier, but it needed some minor adjustmends and the process stopped for some reason. See the thread around Re: [PATCH v2] USB: serial: qcserial: Support for SDX55 based Sierra Wireless 5G modules — Linux USB

(Johan is the usb-serial maintainer)

You could patch one of the usb serial drivers yourself, or you can temporarily workound the lack of support by dynamically add the device to one of them. I usually recommend the option driver for such temporary workarounds because it makes few assumptions about device layout and will bind to pretty much anything. The only problem with that is that the command order is important. If you do this before other drivers have had a chance, then you might end up with the option driver “stealing” all device functions.

Temporary workaround until the device is supported:

modprobe option
echo 1199 90d3 >/sys/bus/usb-serial/drivers/option1/new_id
1 Like

@ dl5162 Thank you for the workaround and the information about the pending patch i will take a look into it.
The workaround with the option driver worked and brought up the usb-serial interfaces !

[   45.672459] usbcore: registered new interface driver usbserial_generic
[   45.672479] usbserial: USB Serial support registered for generic
[   45.677324] usbcore: registered new interface driver option
[   45.677334] usbserial: USB Serial support registered for GSM modem (1-port)
[   50.148315] option 2-5:1.3: GSM modem (1-port) converter detected
[   50.148648] usb 2-5: GSM modem (1-port) converter now attached to ttyUSB0
[   50.148781] option 2-5:1.4: GSM modem (1-port) converter detected
[   50.149007] usb 2-5: GSM modem (1-port) converter now attached to ttyUSB1

The only unexplained issue is why the windows driver does not bring up the AT serial interface.