设置 | 登录 | 注册

目前共有7篇帖子。

移远EC200A模块linux usb驱动包下载地址

1楼 巨大八爪鱼 2025-12-18 20:04
Quectel_LTE&5G_Linux_USB_Driver_V1.0
2楼 巨大八爪鱼 2025-12-19 15:42

编译Quectel_LTE5G_Linux_USB_Driver_V1.0-5/Quectel_Linux_USB_Serial_Option_Driver_V1.0/v5.3.1前需要开启的内核选项(./build.sh kernel-config):
Device Drivers  --->  [*] USB support  --->  <*>   USB Serial Converter support

 

编译Quectel_LTE5G_Linux_USB_Driver_V1.0-5/Quectel_LinuxAndroid_QMI_WWAN_Driver_V1.1前需要开启的内核选项:
Device Drivers  --->  [*] USB support  --->  <*>   USB Wireless Device Management support

 

3楼 巨大八爪鱼 2025-12-19 15:49

编译结果:

cd /home/oct1158/Documents/Code/C/Quectel_LTE5G_Linux_USB_Driver_V1.0-5
mkdir output
cd output
cp ../Quectel_LinuxAndroid_GobiNet_Driver_V1.6/GobiNet.ko .
cp ../Quectel_Linux_USB_Serial_Option_Driver_V1.0/v5.3.1/drivers/usb/serial/option.ko .
cp ../Quectel_Linux_USB_Serial_Option_Driver_V1.0/v5.3.1/drivers/usb/serial/qcserial.ko .
cp ../Quectel_Linux_USB_Serial_Option_Driver_V1.0/v5.3.1/drivers/usb/serial/usb_wwan.ko .
cp ../Quectel_LinuxAndroid_QMI_WWAN_Driver_V1.1/qmi_wwan_q.ko .
cp ../quectel-CM/quectel-CM .
cp ../quectel-CM/quectel-qmi-proxy .

4楼 巨大八爪鱼 2025-12-19 16:19

上传到开发板:

adb push "\\Oct1158-ubuntu\oct1158\Documents\Code\C\Quectel_LTE5G_Linux_USB_Driver_V1.0-5\output\GobiNet.ko" /root

adb push "\\Oct1158-ubuntu\oct1158\Documents\Code\C\Quectel_LTE5G_Linux_USB_Driver_V1.0-5\output\option.ko" /root

adb push "\\Oct1158-ubuntu\oct1158\Documents\Code\C\Quectel_LTE5G_Linux_USB_Driver_V1.0-5\output\qcserial.ko" /root

adb push "\\Oct1158-ubuntu\oct1158\Documents\Code\C\Quectel_LTE5G_Linux_USB_Driver_V1.0-5\output\usb_wwan.ko" /root

adb push "\\Oct1158-ubuntu\oct1158\Documents\Code\C\Quectel_LTE5G_Linux_USB_Driver_V1.0-5\output\qmi_wwan_q.ko" /root

adb push "\\Oct1158-ubuntu\oct1158\Documents\Code\C\Quectel_LTE5G_Linux_USB_Driver_V1.0-5\output\quectel-CM" /root

adb push "\\Oct1158-ubuntu\oct1158\Documents\Code\C\Quectel_LTE5G_Linux_USB_Driver_V1.0-5\output\quectel-qmi-proxy" /root

adb shell chmod +x /root/quectel-CM

adb shell chmod +x /root/quectel-qmi-proxy


在开发板上插入:

insmod GobiNet.ko

insmod usb_wwan.ko

insmod option.ko

insmod qcserial.ko

insmod qmi_wwan_q.ko

5楼 巨大八爪鱼 2025-12-19 17:42

记得修改Quectel_LTE5G_Linux_USB_Driver_V1.0-5/Quectel_Linux_USB_Serial_Option_Driver_V1.0/v5.3.1/drivers/usb/serial/option.c源文件,在

static const struct usb_device_id option_ids[] = {

#if 1 //Added by Quectel

最后面添加{ USB_DEVICE(0x2C7C, 0x6005) },(就是板子lsusb命令里面看到的2c7c后面那个数字)

这样insmod option.ko后才会出现/dev/ttyUSB0和/dev/ttyUSB1两个串口设备。

巨大八爪鱼root@rk3308b-buildroot:/# cd /root
root@rk3308b-buildroot:/root# insmod usb_wwan.ko
root@rk3308b-buildroot:/root# insmod option.ko
[   24.218428] usbcore: registered new interface driver option
[   24.218719] usbserial: USB Serial support registered for GSM modem (1-port)
[   24.219303] option 2-1:1.2: GSM modem (1-port) converter detected
[   24.220742] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB0
[   24.221346] option 2-1:1.3: GSM modem (1-port) converter detected
[   24.223177] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB1
root@rk3308b-buildroot:/root# ls -l /dev/ttyUSB*
crw-rw---- 1 root dialout 188, 0 Jan  1 00:00 /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 1 Jan  1 00:00 /dev/ttyUSB1
root@rk3308b-buildroot:/root#
巨大八爪鱼

【串口AT指令测试程序】

#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>

void send_atcmd(int fd, const char *cmd)
{
    char resp[100];
    int ret;
    
    printf("Command: %s\n", cmd);
    write(fd, cmd, strlen(cmd));
    write(fd, "\r\n", 2);
    ret = read(fd, resp, sizeof(resp) - 1);
    resp[ret] = '\0';
    if (ret >= 1 && resp[ret - 1] == '\n')
        resp[ret - 1] = '\0';
    printf("Response: %s (size=%d)\n", resp, ret);
}

int main()
{
    int fd;

    fd = open("/dev/ttyUSB1", O_RDWR);
    if (fd == -1)
    {
        perror("open() failed");
        return -1;
    }
    send_atcmd(fd, "AT");
    close(fd);
    return 0;
}
【程序运行结果】

root@rk3308b-buildroot:/root# ./atcmd_test
Command: AT
Response: AT (size=3)
root@rk3308b-buildroot:/root#

内容转换:

回复帖子
内容:
用户名: 您目前是匿名发表。
验证码:
看不清?换一张