Porting Linux USB Drivers for Quectel EC200A 4G Module on NVIDIA Jetson AGX Xavier

Hardware Platform Overview

This implementation targets the NVIDIA Jetson AGX Xavier embedded platform for adding mobile network connectivity using the Quectel EC200A 4G USB dongle module.

Development Environment

  • Operating System: Ubuntu 20.04.5 LTS
  • Compiler: aarch64-linux-gnu-gcc 9.4.0

The compilation process can be performed either natively on the target AGX device (arm64/aarch64) or using cross-compilation from an x64 host system.

Prerequisites

NVIDIA Jetson Kernel Source Code

Obtain the specific Linux kernel source code for the Jetson AGX Xavier platform from the NVIDIA Developer download center. The kernel version must match the target system:

uname -a
# Linux ubuntu 5.10.104-tegra #1 SMP PREEMPT Sun Mar 19 07:55:28 PDT 2023 aarch64

Download the Driver Package (BSP) Sources for the corresponding release (R35.1) and extract the kernel_src.tbz2 archive from the public_sources.tbz2 package.

EC200A Driver Requirements

The Quectel EC200A module utilizes USB interface connectivity and does not require GobiNet or QMI drivers since it doesn't use RJ45 network interfaces. Focus on implementing the USB serial driver functionality.

USB Driver Implementation

Identify Module USB Information

Connect the EC200A module to the AGX platform and query USB device information:

lsusb
# Look for Vendor ID:Product ID 2C7C:6005

Modify Kernel Source Files

Update option.c Driver

Locate [KERNEL_SRC]/kernel/kernel-5.10/drivers/usb/serial/option.c and implement the following changes:

Add Vendor and Product IDs:

static const struct usb_device_id option_ids[] = {
    // Add EC200A device identification
    { USB_DEVICE(0x2C7C, 0x6005) },  // Quectel EC200A
    
    // Existing device entries
    { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
    // ... other existing entries
};

Implement Power Recovery Mechanism:

static struct usb_serial_driver option_1port_device = {
    .driver = {
        .owner = THIS_MODULE,
        .name = "option1",
    },
    // ... existing structure members
#ifdef CONFIG_PM
    .suspend = usb_wwan_suspend,
    .resume = usb_wwan_resume,
    
    // Add reset resume functionality
    .reset_resume = usb_wwan_resume,
#endif
};

Modify usb_wwan.c File

Edit [KERNEL_SRC]/kernel/kernel-5.10/drivers/usb/serial/usb_wwan.c to add zero-packet mechanism:

static struct urb *usb_wwan_setup_urb(struct usb_serial_port *port,
                                     int endpoint, int dir, void *ctx,
                                     char *buf, int len,
                                     void (*callback)(struct urb *))
{
    struct usb_serial *serial = port->serial;
    struct usb_wwan_intf_private *intfdata = usb_get_serial_data(serial);
    struct urb *urb;

    urb = usb_alloc_urb(0, GFP_KERNEL);
    if (!urb)
        return NULL;

    usb_fill_bulk_urb(urb, serial->dev,
                     usb_sndbulkpipe(serial->dev, endpoint) | dir,
                     buf, len, callback, ctx);

    // Enable zero-packet mechanism for Quectel modules
    if (dir == USB_DIR_OUT) {
        struct usb_device_descriptor *desc = &serial->dev->descriptor;
        if (desc->idVendor == cpu_to_le16(0x2c7c))
            urb->transfer_flags |= URB_ZERO_PACKET;
    }

    return urb;
}

Kernel Configuration and Compilation

Navigate to the kernel source directory and set up the build environment:

cd [KERNEL_SRC]/kernel/kernel-5.10/
mkdir ../../kernel_out
export TEGRA_KERNEL_OUT=../../kernel_out
export CROSS_COMPILE=aarch64-linux-gnu-

Configure kernel options using menuconfig:

make ARCH=arm64 O=$TEGRA_KERNEL_OUT menuconfig

Enable the following options as modules:

  • Device Drivers → USB Support → USB Serial Converter support → USB driver for GSM and CDMA modems

Compile the kernel using 8 parallel jobs:

make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j8

Driver Module Deployment

After successful compilation, locate the generated kernel modules in [kernel_out]/drivers/usb/serial/:

  • option.ko
  • usb_wwan.ko
  • qcserial.ko

Copy these files to the target system's module directory:

cp *.ko /usr/lib/modules/5.10.104-tegra/kernel/drivers/usb/serial/
depmod -a
reboot

Driver Validation

Module Loading Verification

After reboot, verify driver loading status:

modprobe usbmon
dmesg | grep -i usb
lsmod | grep -E "(option|usb_wwan|qcserial)"

Serial Communication Testing

Test AT command communication using minicom:

minicom -c on -D /dev/ttyUSB1

Send basic AT commands to verify module responsiveness and SIM card detection.

Network Connectivity Testing

Verify mobile network connectivity establishment:

ping -I wwan0 8.8.8.8

Check for mobile network interface appearance in system network managers.

Tags: linux-drivers nvidia-jetson quectel-ec200a usb-serial embedded-linux

Posted on Sun, 10 May 2026 20:39:58 +0000 by web_loone_08