Driver make error

Trying to make drivers from Mobile Broadband Package r32 on CentOS 8 kernel 4.18.0-513 and am getting incompatible pointer types error.

[root@bv3 usb]# make
make -C /lib/modules/4.18.0-513.el8.x86_64/build M=/root/Downloads/usb
make[1]: Entering directory ‘/usr/src/kernels/4.18.0-513.el8.x86_64’
CC [M] /root/Downloads/usb/qcserial.o
/root/Downloads/usb/qcserial.c:739:22: error: initialization of ‘void (*)(struct usb_serial_port )’ from incompatible pointer type ‘int ()(struct usb_serial_port )’ [-Werror=incompatible-pointer-types]
.port_remove = usb_wwan_port_remove,
^~~~~~~~~~~~~~~~~~~~
/root/Downloads/usb/qcserial.c:739:22: note: (near initialization for ‘qcdevice.port_remove’)
/root/Downloads/usb/qcserial.c:766:22: error: initialization of ‘void (
)(struct usb_serial_port )’ from incompatible pointer type ‘int ()(struct usb_serial_port *)’ [-Werror=incompatible-pointer-types]
.port_remove = usb_wwan_port_remove,
^~~~~~~~~~~~~~~~~~~~
/root/Downloads/usb/qcserial.c:766:22: note: (near initialization for ‘qcdevice_1.port_remove’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:324: /root/Downloads/usb/qcserial.o] Error 1
make[1]: *** [Makefile:1619: module/root/Downloads/usb] Error 2
make[1]: Leaving directory ‘/usr/src/kernels/4.18.0-513.el8.x86_64’
make: *** [Makefile:12: all] Error 2
[root@bv3 usb]#

Any ideas how to get past this ?

do you find problem with this older version?
MBPL_DRIVER_R27_ENG2-usb-src.tar.gz (24.0 KB)

I get the same errors about incompatible pointer type in qcserial.c Do you think I need a different version of gcc ?

i got a linux machine using kernel 4.13 which is near your kernel version, no problem is found for the compilation:


owner@ubuntu:~/QMI/MBPL/MBPL_DRIVERS_R31_ENG2-usb-src/usb$ sudo make
make -C /lib/modules/4.13.0-32-generic/build M=/home/owner/QMI/MBPL/MBPL_DRIVERS_R31_ENG2-usb-src/usb
make[1]: Entering directory '/usr/src/linux-headers-4.13.0-32-generic'
  Building modules, stage 2.
  MODPOST 3 modules
make[1]: Leaving directory '/usr/src/linux-headers-4.13.0-32-generic'
owner@ubuntu:~/QMI/MBPL/MBPL_DRIVERS_R31_ENG2-usb-src/usb$ uname -r
4.13.0-32-generic

You can install Ubuntu 18.10 which is using kernel 4.18, and then try the compilation and see if it works

I had Ubuntu 18.04 with 4.15.0 in a VM and r32 built and installed with no issues using the same files.

are you using same GCC version for Ubuntu 18 and CentOS 8?

No, CentOS 8 = gcc ver. 8.5.0, Ubuntu18.04= gcc ver. 7.5.0

you can see if downgrade the GCC version can help on this compilation

gcc ver 7.5.0 is not available for CentOS8. I tried several other flavors of RHEL variants and found I could get Fedora 38 to build the drivers. I installed that on my target machine, built the drivers and I can see the EM7455. It appears to be registering with AT&T but NetworkManager is not seeing it. I can’t see it with ifconfig either. There are allot of variables that can make this not work.

did you see the wwan0 generated by qmi_wwan in the dmesg?

If you still find compilation error in CentOS 8 , you might try the old Gobi driver which has been end of life.
It might work:

https://source.sierrawireless.com/resources/airprime/software/usb-drivers-linux-qmi-software-s2,-d-,42n2,-d-,64/#sthash.P2hDzlfK.dpbs

If you use the Gobi driver, you need to blacklist the following driver:

blacklist qcserial 
blacklist qmi_wwan

Yes, qmi_wwan 1-11:1.8 wwan0: register ‘qmi_wwan’ at usb-0000:00:14.0-11, WWAN/QMI device, 0a:4f:6d:28:06:46

qmi_wwan 1-11:1.8 wwp0s20f0u11i8: renamed from wwan0

The old Gobi drivers would build but could not get them to work either. I was hoping for better success with the newest drivers.

you can see here on how to use MBPL to establish data connection:

I gave up trying to get the modem to work with the R32 drivers under Fedora38 and went back to CentOS8 using the Gobi drivers. I blacklisted qmi_wwan and qcserial as suggested but now if I do lsusb -t I don’t see a driver specified for the modem device. If Ii do lsusb I can see the Sierra Wireless card identified as Device 004. Is ModemManager and NetworkManager supposed to recognize the modem in this configuratioin? Another issue is none of the RHEL linux versions support udhcpc

I removed qwi_wwan from the blacklist and I now see the modem in ifconfig with an IP address. It shows TX packets but no RX packets. An attempt to do a ping from the wwan interface shows no received packets. Could this be related to the lack of udhcpc ?

I remember udhcpc or dhclient is needed
Suggest you try with ubuntu 18 first

Is there any reference on how the dhclient is configured? The modem only has one address but has a .240 netmask.

you might capture wireshark log in working enviroment in Ubunt18 to see how dhclient works