设置 | 登录 | 注册

目前共有3篇帖子。

移遠EC200A模塊linux usb驅動包下載地址

10楼 巨大八爪鱼 2025-12-23 13:38

正常情況下,只要插了USB線,開機後就會有ifconfig usb0接口,IP位址為192.168.43.100,不需要insmod GobiNet.ko。


如果沒有usb0接口,說明模塊當前所處的模式不對。這個時候即使insmod GobiNet.ko,usb0接口也不會出現。

root@rk3308b-buildroot:/# lsmod
Module                  Size  Used by    Tainted: G
aic8800_bsp            73728  0
root@rk3308b-buildroot:/# lsusb
Bus 003 Device 001: ID 1d6b:0001
Bus 002 Device 003: ID 2c7c:6005
Bus 001 Device 001: ID 1d6b:0002
Bus 002 Device 001: ID 1d6b:0002
root@rk3308b-buildroot:/# ifconfig
eth0      Link encap:Ethernet  HWaddr F2:2E:FE:02:6E:60
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:39

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:60 errors:0 dropped:0 overruns:0 frame:0
          TX packets:60 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4048 (3.9 KiB)  TX bytes:4048 (3.9 KiB)

root@rk3308b-buildroot:/# ifconfig usb0
ifconfig: usb0: error fetching interface information: Device not found
root@rk3308b-buildroot:/#


要想讓usb0接口出現,只需發AT+QCFG="usbnet",3命令讓模塊切換到模式3(RNDIS模式),然後發AT+CFUN=1,1命令讓模塊重啟。

root@rk3308b-buildroot:/root# insmod usb_wwan.ko
root@rk3308b-buildroot:/root# insmod option.ko
[ 4794.877893] usbcore: registered new interface driver option
[ 4794.878214] usbserial: USB Serial support registered for GSM modem (1-port)
[ 4794.879102] option 2-1:1.2: GSM modem (1-port) converter detected
[ 4794.880421] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB0
[ 4794.881497] option 2-1:1.3: GSM modem (1-port) converter detected
[ 4794.883058] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB1
root@rk3308b-buildroot:/root# microcom /dev/ttyUSB1
AT+QCFG="usbnet",3
OK
AT+CFUN=1,1
OK
[ 4815.536085] usb 2-1: USB disconnect, device number 3
[ 4815.539263] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[ 4815.539742] option 2-1:1.2: device disconnected
[ 4815.545028] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[ 4815.545563] option 2-1:1.3: device disconnected
root@rk3308b-buildroot:/root# [ 4816.480225] usb 2-1: new high-speed USB device number 4 using ehci-platform
[ 4817.138273] usb 2-1: USB disconnect, device number 4

root@rk3308b-buildroot:/root# [ 4822.800227] usb 2-1: new high-speed USB device number 5 using ehci-platform
[ 4822.936778] rndis_host 2-1:1.0 usb0: register 'rndis_host' at usb-ff440000.usb-1, RNDIS device, c6:be:9f:e6:51:b1
[ 4822.939904] option 2-1:1.2: GSM modem (1-port) converter detected
[ 4822.941051] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB0
[ 4822.943025] option 2-1:1.3: GSM modem (1-port) converter detected
[ 4822.944221] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB1

root@rk3308b-buildroot:/root# ifconfig
eth0      Link encap:Ethernet  HWaddr F2:2E:FE:02:6E:60
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:39

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1140 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1140 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:68848 (67.2 KiB)  TX bytes:68848 (67.2 KiB)

usb0      Link encap:Ethernet  HWaddr C6:BE:9F:E6:51:B1
          inet addr:192.168.43.100  Bcast:192.168.43.255  Mask:255.255.255.0
          inet6 addr: fe80::9b64:572a:533b:a4f4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1104 (1.0 KiB)  TX bytes:2698 (2.6 KiB)

root@rk3308b-buildroot:/root# lsmod
Module                  Size  Used by    Tainted: G
option                 53248  0
usb_wwan               20480  1 option
aic8800_bsp            73728  0
root@rk3308b-buildroot:/root#

巨大八爪鱼 2025-12-23 13:41
AT+QCFG="usbnet" 是Quectel 系列4G/5G模塊(如EC20、RM500、RG200U等)的AT指令,用於配置USB網絡接口模式,即指定模塊通過USB連接時使用的網絡協議標準。‌
‌指令格式與參數‌
    ‌測試命令‌:AT+QCFG=? 可查詢支持的參數值,響應中會列出可用的模式。‌
    ‌設置命令‌:AT+QCFG="usbnet",<net>,其中 <net> 為模式參數:
        0:RMNET 接口(高通標準,通常用於Linux內核驅動)。‌
        1:ECM(ECM 接口,USB設備通信模式,常見於Linux系統)。‌
        2:MBIM(MBIM 接口,微軟標準,支持高級功能)。‌
        3:RNDIS(RNDIS 接口,Windows兼容模式,也可在Linux中使用)。‌
    ‌響應‌:成功時返回 OK,失敗時返回 ERROR;若省略參數(如 AT+QCFG="usbnet"),會返回當前配置狀態。‌

‌配置步驟與注意事項‌
    ‌連接與驗證‌:通過串口工具(如minicom)連接模塊的調試埠(如 /dev/ttyUSB0),發送 AT 測試通信是否正常。‌
    ‌設置模式‌:例如,設置為ECM模式(自動撥號常用):AT+QCFG="usbnet",1。‌
    ‌重啟生效‌:配置後需重啟模塊(如發送 AT+CFUN=1,1)使設置生效。‌
    ‌系統識別‌:重啟後,系統會生成新的網絡接口(如 usb0),可通過 ifconfig 或 ip a 查看IP位址分配。‌
巨大八爪鱼 2025-12-23 14:26
AT+CFUN=1,1 是AT指令中用於控制模塊功能的命令,具體作用是將模塊設置為全功能模式並執行重啟操作。‌
    ‌命令含義‌:AT+CFUN 指令用於設定電話功能水平。參數 1 表示全功能模式,即啟用模塊的所有功能(如無線通信、SIM卡操作等);參數 1 作為第二個值,指示執行重啟。重啟後,模塊會重新初始化並進入全功能狀態。
    ‌典型應用場景‌:該命令常用於模塊初始化階段,以確保所有功能正常啟動。‌ 例如,在設備上電或故障恢復時,通過此指令激活模塊並重啟,以便後續執行其他操作(如查詢SIM卡狀態或網絡註冊)。‌
    ‌執行注意事項‌:發送此命令後,模塊會重啟,期間可能需要約 4 秒時間完成初始化。重啟後,建議等待片刻再發送後續指令(如查詢 IMSI 或信號強度),以避免響應錯誤。‌此外,確保SIM卡已正確插入且為USIM卡,以避免功能異常。‌

内容转换:

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