EM7565 stuck in a USB composition without QMI or AT ports

I’m trying to bring up a single EM7565 modem on a Linux system.

The modem appears to have nonstandard VID:PID of 1199:90c3:

$ lsusb
Bus 002 Device 007: ID 1199:90c3 Sierra Wireless, Inc. Sierra Wireless EM7565 with Qualcomm Snapdragon X16 LTE

I patched qcserial and qmi_wwan to accept this PID:

diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index 8b4ad10cf940..225a57ecb2ef 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -1320,6 +1320,7 @@ static const struct usb_device_id products[] = {
 	{QMI_QUIRK_SET_DTR(0x1199, 0x907b, 8)},	/* Sierra Wireless EM74xx */
 	{QMI_QUIRK_SET_DTR(0x1199, 0x907b, 10)},/* Sierra Wireless EM74xx */
 	{QMI_QUIRK_SET_DTR(0x1199, 0x9091, 8)},	/* Sierra Wireless EM7565 */
+	{QMI_QUIRK_SET_DTR(0x1199, 0x90c3, 8)},	/* Sierra Wireless EM7565 (Lenovo) */
 	{QMI_FIXED_INTF(0x1bbb, 0x011e, 4)},	/* Telekom Speedstick LTE II (Alcatel One Touch L100V LTE) */
 	{QMI_FIXED_INTF(0x1bbb, 0x0203, 2)},	/* Alcatel L800MA */
 	{QMI_FIXED_INTF(0x2357, 0x0201, 4)},	/* TP-LINK HSUPA Modem MA180 */
diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c
index 613f91add03d..f7512f8daa4d 100644
--- a/drivers/usb/serial/qcserial.c
+++ b/drivers/usb/serial/qcserial.c
@@ -164,6 +164,8 @@ static const struct usb_device_id id_table[] = {
 	{DEVICE_SWI(0x1199, 0x907b)},	/* Sierra Wireless EM74xx */
 	{DEVICE_SWI(0x1199, 0x9090)},	/* Sierra Wireless EM7565 QDL */
 	{DEVICE_SWI(0x1199, 0x9091)},	/* Sierra Wireless EM7565 */
+	{DEVICE_SWI(0x1199, 0x90c2)},	/* Sierra Wireless EM7565 (Lenovo) QDL */
+	{DEVICE_SWI(0x1199, 0x90c3)},	/* Sierra Wireless EM7565 (Lenovo) */
 	{DEVICE_SWI(0x413c, 0x81a2)},	/* Dell Wireless 5806 Gobi(TM) 4G LTE Mobile Broadband Card */
 	{DEVICE_SWI(0x413c, 0x81a3)},	/* Dell Wireless 5570 HSPA+ (42Mbps) Mobile Broadband Card */
 	{DEVICE_SWI(0x413c, 0x81a4)},	/* Dell Wireless 5570e HSPA+ (42Mbps) Mobile Broadband Card */

The problem is that the module appears to be locked in a USB composition without QMI/MBIM or AT interfaces:

lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/15p, 480M
    |__ Port 10: Dev 7, If 2, Class=Vendor Specific Class, Driver=qcserial, 480M
    |__ Port 10: Dev 7, If 0, Class=Vendor Specific Class, Driver=qcserial, 480M
    |__ Port 10: Dev 7, If 1, Class=Vendor Specific Class, Driver=, 480M

Is it possible to change the USB composition using only the diagnostic port?

Why don’t you use the official GobiSerial driver?

Btw, seems your module is stuck in boot mode, try if yiu can upgrade the fw by windows exe file.

Will it help?
I tend to stick to upstream drivers whenever possible.

Nope, boot mode is 1199:90c2. I already upgraded the module’s firmware using the sample app from the official SDK (libqmi segfaults unfortunately); it didn’t change anything.

Windows drivers and firmware bundle don’t even detect this modem, they only look for 1199:9091 .

Gobiserial driver should be validated for em7565.

Nope. GobiSerial has no support for the 90c3 device. You can obviously add it just like for qcserial, but it’s a meaningless exercise.

Yes. Definitely not boot mode, as your device shows 3 interfaces. Boot mode has never more than one USB interface.

Could you post the output of
lsusb -vd 1199:90c3
or the relevant part of /sys/kernel/debug/usb/devices? This will show which USB classes your interfaces belong to, and we can start guessing which drivers to try. I take it that you already tried AT commands without success on two /dev/ttyUSBx devices you got after modifying qcserial?

1 Like


/sys/kernel/debug/usb/devices (excerpt):

T:  Bus=02 Lev=01 Prnt=01 Port=09 Cnt=04 Dev#=  7 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1199 ProdID=90c3 Rev= 0.06
S:  Manufacturer=Sierra Wireless, Incorporated
S:  Product=Sierra Wireless EM7565 with Qualcomm Snapdragon X16 LTE
S:  SerialNumber=c31c44d3
C:* #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=qcserial
E:  Ad=82(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=84(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=qcserial
E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

lsusb -v (excerpt): http://ix.io/1UZB


At least one of them is I thought was the diagnostic port (i. e. qmi-firmware-update -t /dev/ttyUSB0 -b reboots the modem into the boot configuration), the other two I have no idea about.

Interfaces 0 and 1 look like NMEA or AT. Interface 2 looks like DIAG. So interface 1 is the remaining hope since you’ve already eliminated the two others.

Your USB config layout does not match any of the variants hard coded into the qcserial driver. It’s easier to use the option driver as a temporary solution, since that driver will happily bind to almost anything. Try

modprobe option
echo 1199 90c3 >/sys/bus/usb-serial/drivers/option1/new_id

This should result in a /dev/ttyUSBx device bound to interface 1. Let’s hope that is AT. If so, then use it to change your modem config to what you want, using the AT!USBCOMP etc commands. Read the AT command docs carefully first.

If interface 1 isn’t AT, then I don’t have any other suggestions…

1 Like

Plot twist: interface 0 (which I assumed to be diag) is (was) actually a strange non-echoing AT port (which did NOT react to ATE). I blindly wrote at!reset into it and the modem rebooted in 10 seconds, so… long story short, at!usbcomp=1,1,100d worked, the AT port also fixed itself and is now echoing.

The fimware was even nice enough to tell me the default usbcomp, which was at!usbcomp=1,3,10F (diag, nmea, modem, rmnet0 in a nonstandard layout according to the doc, but there were just 3 interfaces, weird).