EM7565 1199:90b1 USBx qcserial issue Ubuntu 20.04 MBPL driver fail to compile

Hi guys,

Sierra module: EM7565 vid: 1199 pid: 90b1
Laptop model: Dell latitude 5420
OS version: Ubuntu 20.04 server x86_64 installed with enabled HWE
Kernel: 5.13.0-30-generic
Bios: wwan module is presented as USB device

As far as i am awared there are two modes in which this module can operate

  • MBIM : cdc_mbim and qcserial drivers are required <<— i decided to use this mode
  • RmNet : qmi_wwan and qcserial drivers are required
type or paste code hereroot@x:~#dmesg 
[ 8868.229561] usb 4-4: new SuperSpeed USB device number 3 using xhci_hcd
[ 8868.251397] usb 4-4: New USB device found, idVendor=1199, idProduct=90b1, bcdDevice= 0.06
[ 8868.251406] usb 4-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 8868.251409] usb 4-4: Product: EM7565
[ 8868.251412] usb 4-4: Manufacturer: Sierra Wireless, Incorporated
[ 8868.256058] usb 4-4: Enable of device-initiated U1 failed.
[ 8868.256518] usb 4-4: Enable of device-initiated U2 failed.
[ 8868.278918] cdc_mbim 4-4:1.0: cdc-wdm0: USB WDM device
[ 8868.279260] cdc_mbim 4-4:1.0 wwan0: register 'cdc_mbim' at usb-0000:00:14.0-4, CDC MBIM, 52:54:35:02:12:ce
[ 8868.279720] usb 4-4: Enable of device-initiated U1 failed.
[ 8868.280197] usb 4-4: Enable of device-initiated U2 failed.


root@x:~# lsusb
Bus 004 Device 002: ID 1199:90b1 Sierra Wireless, Inc. EM7565
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 0a5c:5843 Broadcom Corp. 58200
Bus 003 Device 002: ID 1bcf:28cc Sunplus Innovation Technology Inc. Integrated_Webcam_HD
Bus 003 Device 004: ID 8087:0026 Intel Corp. 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


root@x:~# usb-devices -t
T:  Bus=04 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#=  2 Spd=5000 MxCh= 0
D:  Ver= 3.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs=  1
P:  Vendor=1199 ProdID=90b1 Rev=00.06
S:  Manufacturer=Sierra Wireless, Incorporated
S:  Product=EM7565
C:  #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=896mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
I:  If#=0x1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
I:  If#=0x4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)

As you can see there is not qcserial driver assigned to usb interfaces 0x2 0x3 0x4
By default when the os boot cdc_mbim module is loaded but not the same with qcserial

root@x:~# lsmod | grep mbim
cdc_mbim               20480  0
cdc_wdm                24576  1 cdc_mbim
cdc_ncm                45056  1 cdc_mbim
usbnet                 49152  3 cdc_mbim,cdc_ncm,cdc_ether

root@x:~# lsmod | grep qcserial
root@x:~# 

Nothing happend when the module has been loaded manually.
I checked the github qcserial repo linux/qcserial.c at v5.13 · torvalds/linux · GitHub
And i saw that this vid and pid are not in v5.13 even in the newers tags

I also tried to manually load them but this does not help

echo "1199 90b1" > /sys/bus/usb-serial/drivers/qcserial/new_id

dmesg errors

[ 1032.684075] usb 4-4: unknown number of interfaces: 5
[ 1032.684102] usb 4-4: unknown number of interfaces: 5
[ 1032.684115] usb 4-4: unknown number of interfaces: 5

Then i decided to download ( MBPL_Drivers_R24_ENG3-src.tar.gz ) and compile them from USB sub directory.
Also i saw that vid and pid are there.
The compiling failed with the fowoling error:

root@x:/home/admin/gps/src/USB# make
make -C /lib/modules/5.13.0-30-generic/build M=/home/admin/gps/src/USB
make[1]: Entering directory '/usr/src/linux-headers-5.13.0-30-generic'
  CC [M]  /home/admin/gps/src/USB/qcserial.o
/home/admin/gps/src/USB/qcserial.c:734:22: error: initialization of ‘void (*)(struct usb_serial_port *)’ from incompatible pointer type ‘int (*)(struct usb_serial_port *)’ [-Werror=incompatible-pointer-types]
  734 |  .port_remove      = usb_wwan_port_remove,
      |                      ^~~~~~~~~~~~~~~~~~~~
/home/admin/gps/src/USB/qcserial.c:734:22: note: (near initialization for ‘qcdevice.port_remove’)
/home/admin/gps/src/USB/qcserial.c:761:22: error: initialization of ‘void (*)(struct usb_serial_port *)’ from incompatible pointer type ‘int (*)(struct usb_serial_port *)’ [-Werror=incompatible-pointer-types]
  761 |  .port_remove      = usb_wwan_port_remove,
      |                      ^~~~~~~~~~~~~~~~~~~~
/home/admin/gps/src/USB/qcserial.c:761:22: note: (near initialization for ‘qcdevice_1.port_remove’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:281: /home/admin/gps/src/USB/qcserial.o] Error 1
make[1]: *** [Makefile:1879: /home/admin/gps/src/USB] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.13.0-30-generic'
make: *** [Makefile:12: all] Error 2
root@x:/home/admin/gps/src/USB# 

root@x:/home/admin/gps/src/USB# dpkg -l | grep make
ii  make                                  4.2.1-1.2                             amd64        utility for directing compilation
ii  xxd                                   2:8.1.2269-1ubuntu5.7                 amd64        tool to make (or reverse) a hex dump


root@x:/home/admin/gps/src/USB# dpkg -l | grep gcc
ii  gcc                                   4:9.3.0-1ubuntu2                      amd64        GNU C compiler
ii  gcc-10-base:amd64                     10.3.0-1ubuntu1~20.04                 amd64        GCC, the GNU Compiler Collection (base package)
ii  gcc-9                                 9.3.0-17ubuntu1~20.04                 amd64        GNU C compiler
ii  gcc-9-base:amd64                      9.3.0-17ubuntu1~20.04                 amd64        GCC, the GNU Compiler Collection (base package)
ii  libgcc-9-dev:amd64                    9.3.0-17ubuntu1~20.04                 amd64        GCC support library (development files)
ii  libgcc-s1:amd64                       10.3.0-1ubuntu1~20.04                 amd64        GCC support library

Can somenone advise how to compile these drivers in order to see USBx there
Tanks in advance.

Just short update

I think that this issue is from kernel compatibility.

Drivers were successfully build on Ubuntu VM 20.04 with older kernel 5.4.0-96-generic, however this kernel is older and ethernet driver does not work for the laptop.

I also did an another test on Ubuntu 22.04 server x64 with kernel 5.15.0-18-generic latest for Ubuntu website and received following errors

root@test:/home/test/gps/src/USB# make
make -C /lib/modules/5.15.0-18-generic/build M=/home/test/gps/src/USB
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-18-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (Ubuntu 11.2.0-14ubuntu1) 11.2.0
  You are using:           gcc (Ubuntu 11.2.0-16ubuntu1) 11.2.0
  CC [M]  /home/test/gps/src/USB/qcserial.o
/home/test/gps/src/USB/qcserial.c:727:32: error: initialization of ‘unsigned int (*)(struct tty_struct *)’ from incompatible pointer type ‘int (*)(struct tty_struct *)’ [-Werror=incompatible-pointer-types]
  727 |         .write_room          = usb_wwan_write_room,
      |                                ^~~~~~~~~~~~~~~~~~~
/home/test/gps/src/USB/qcserial.c:727:32: note: (near initialization for ‘qcdevice.write_room’)
/home/test/gps/src/USB/qcserial.c:728:32: error: initialization of ‘unsigned int (*)(struct tty_struct *)’ from incompatible pointer type ‘int (*)(struct tty_struct *)’ [-Werror=incompatible-pointer-types]
  728 |         .chars_in_buffer     = usb_wwan_chars_in_buffer,
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~
/home/test/gps/src/USB/qcserial.c:728:32: note: (near initialization for ‘qcdevice.chars_in_buffer’)
/home/test/gps/src/USB/qcserial.c:734:32: error: initialization of ‘void (*)(struct usb_serial_port *)’ from incompatible pointer type ‘int (*)(struct usb_serial_port *)’ [-Werror=incompatible-pointer-types]
  734 |         .port_remove         = usb_wwan_port_remove,
      |                                ^~~~~~~~~~~~~~~~~~~~
/home/test/gps/src/USB/qcserial.c:734:32: note: (near initialization for ‘qcdevice.port_remove’)
/home/test/gps/src/USB/qcserial.c:754:32: error: initialization of ‘unsigned int (*)(struct tty_struct *)’ from incompatible pointer type ‘int (*)(struct tty_struct *)’ [-Werror=incompatible-pointer-types]
  754 |         .write_room          = usb_wwan_write_room,
      |                                ^~~~~~~~~~~~~~~~~~~
/home/test/gps/src/USB/qcserial.c:754:32: note: (near initialization for ‘qcdevice_1.write_room’)
/home/test/gps/src/USB/qcserial.c:755:32: error: initialization of ‘unsigned int (*)(struct tty_struct *)’ from incompatible pointer type ‘int (*)(struct tty_struct *)’ [-Werror=incompatible-pointer-types]
  755 |         .chars_in_buffer     = usb_wwan_chars_in_buffer,
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~
/home/test/gps/src/USB/qcserial.c:755:32: note: (near initialization for ‘qcdevice_1.chars_in_buffer’)
/home/test/gps/src/USB/qcserial.c:761:32: error: initialization of ‘void (*)(struct usb_serial_port *)’ from incompatible pointer type ‘int (*)(struct usb_serial_port *)’ [-Werror=incompatible-pointer-types]
  761 |         .port_remove         = usb_wwan_port_remove,
      |                                ^~~~~~~~~~~~~~~~~~~~
/home/test/gps/src/USB/qcserial.c:761:32: note: (near initialization for ‘qcdevice_1.port_remove’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:285: /home/test/gps/src/USB/qcserial.o] Error 1
make[1]: *** [Makefile:1880: /home/test/gps/src/USB] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-18-generic'
make: *** [Makefile:12: all] Error 2
root@test:/home/test/gps/src/USB# 

Is there a compatibility kernel list for these drivers or any advise how i can build them ?
From this test of the module depend purchase from our company, so any help will be appreciated.

Thank you in advance.

Hi pettrovvf23231,

Sierra has been aware of this issue. It has been forwarded to the development team for analysis.

1 Like

Hi Donald,

Thanks for your response. Looking forward for update about this issue.

Thanks in advance.

Hello All! I am having a similar issue with an EM7355 in a USB adapter, running Ubuntu 20.04 with the 5.13.0-39-generic kernel. I was wondering if there was any update for a solution to this problem?