I’m currently trying to set up a Quectel EC20 LTE module to work with a TX2. I’m following the instructions in this PDF from Quectel: https://we.tl/Wc675dItLm
I was informed by Quectel that I should use the QMI-WWAN driver. Therefore in summary I am doing the following:
Editing (According to the instructions in the document) the files:
[KERNEL]/drivers/usb/serial/option.c
[KERNEL]/drivers/usb/serial/qcserial.c
[KERNEL]/drivers/net/usb/qmi_wwan.c
[KERNEL]/drivers/usb/serial/usb_wwan.c
In the kernel config editor, enabling (to be added a module):
USB driver for GSM and CDMA modems
If I try to run the first make command from the Quectel pdf doc (sudo make -C /lib/modules/uname -r/build M=pwd/drivers/usb/serial obj-m=option.o modules) I get the message:
I have tried various other things - including using the makeKernel script from the JetsonHacks page above: but I’d rather walk through things one at a time to try to isolate the issue.
Just a few things to check…don’t know if this applies to your case.
If you are building against a full source tree make sure your tree is starting with a config matching the running system (e.g., copy the “/proc/config.gz”, gunzip it, and rename it as “.config”).
Make sure any code changes were meant for a 4.x series kernel…if your source is from a 3.x series it probably won’t work.
Be sure you actually have directory ‘/usr/src/linux-headers-4.4.38-tegra’.
Yeah I spent quite a while looking for syntax errors, particularly in the .c files I modified according to the Quectel instructions. But there are no syntax errors anywhere - and furthermore I found people with similar issues elsewhere:
In the scripts that I’m using from jetsonHacks (linked in the OP) the build process actually uses a different set of commands. This is the method in the Quectel manual:
sudo make -C /lib/modules/uname -r/build M=pwd/drivers/usb/serial obj-m=option.o modules
And this is the method in the scripts from jetsonHacks:
make prepare
make modules_prepare
make -j6 Image
make modules
make modules_install
So I’m wondering - what’s the difference between these approaches?
In the kernel config editor, enabling (to be added a module):
-USB driver for GSM and CDMA modems
-QMI WWAN driver for Qualcomm MSM based 3G and LTE modems
Editing (According to the instructions in the Quectel document) the files:
usr/src/kernel/kernel-4.4/drivers/usb/serial/option.c
usr/src/kernel/kernel-4.4/drivers/usb/serial/qcserial.c
usr/src/kernel/kernel-4.4/drivers/net/usb/qmi_wwan.c
usr/src/kernel/kernel-4.4/drivers/usb/serial/usb_wwan.c
Running makeKernel.sh which does the following:
#!/bin/bash
Builds the kernel and modules
Assumes that the .config file is available
cd /usr/src/kernel/kernel-4.4
make prepare
make modules_prepare
Make alone will build the dts files too
make -j6
make -j6 Image
make modules
make modules_install
This runs fine (unlike the make commands in my OP from the Quectel document).
I have checked that there are new object files in /usr/src/kernel/drivers and confirm that the following files are modified:
drivers/usb/serial/option.o
drivers/net/usb/qmi_wwan.o
drivers/usb/serial/usb_wwan.o
However, the file drivers/usb/serial/qcserial.o does not exist.
I then run copyImage.sh, reboot and plug in the device. Running lsusb shows the device as:
05c6:9215 Qualcomm, Inc. Acer Gobi 2000 Wireless Modem
This is one of the device IDs that I totally removed from the .c files according to the Qualcomm instructions, so if the modules are really being replaced I don’t see how this can be.
My next attempt involved going back into the kernel config editor, and this time also selecting the module Device Drivers>Usb support > USB serial converter suport > sub Qualcomm serial modem : since I believe that this one is linked with qcserial.c.
I then re-ran makeKernel.sh and copyImage.sh
(it ran super fast so I guess it didn’t compile very much stuff this time).
This time there are all 4 files present in the /lib/modules/4.4.38-tegra… directories.
After a reboot the device is still detected as:
05c6:9215 Qualcomm, Inc. Acer Gobi 2000 Wireless Modem
I cannot understand how removing every reference to this device from the module sources, compiling them and installing them does not have any effect.
Is there some way I can confirm that modules have been re-loaded? Is there something I should be doing to manually load a module in place of its previous version?
I believe that lsusb returns a report from the device firmware, it does not look to the kernel for that information. In other words, you plug in the Modem, there is the ID which is the manufacturer:model, and then a string that describes the device. In this case, 0x05c6 is Qualcomm, 0x9215 is the product (the modem). Note that this does not tell you which driver is loaded for the device.
$ lsusb -t
should tell you which driver is loaded, the Bus and Device are the keys which you get from lsusb. There’s probably a more clever way to figure it out.
It is difficult to tell which module qcserial actually belongs. My initial guess would be that there is still one missing kernel config that is needed.