openwrt 下添加sim760ce usb驅動


SIM7500_SIM7600 系列模塊的 USB VID 0x1E0E PID 0x9001.
作為 Slave USB 設備,配置如下表
USB 接口波特率自適應 9600115200 都可以
TTL 串口默認 115200 波特率
Interface number
 
0
USB serial
Diagnostic Interface
1
USB serial
GPS NMEA Interface
2
USB serial
AT port Interface
3
USB serial
Modem port Interface
4
USB serial
USB Audio Interface
5
USB RMNet
wwan interface
6
adb
Android adb debug port
linux 系統中 要防止 USB serial 驅動也把 Net interface 枚舉占用。USB 串口驅動使用
  1. 1 USB Serial 的內核配置支持在 linux 內核配置中(/target/linux/ramips/mt7688/config-3.18),請確保
    CONFIG_USB_SERIAL=y
  2. CONFIG_USB_SERIAL_WWAN=y
  3. CONFIG_USB_SERIAL_OPTION=y
  4. 2 修改驅動代碼增加 SIM7500_SIM7600 的 VID/PID 並且跳過 Interface 5找到內核源碼文件 option.c(路徑在 build_dir/target-mi
  5. psel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7688/linux-3.18.29/drivers/usb/ser
  6. ial/option.c)
#define SIMCOM_SIM7600_VID    0x1E0E
#define SIMCOM_SIM7600_PID    0x9001
 
option_ids 列表中增加
{ USB_DEVICE(SIMCOM_SIM7600_VID, SIMCOM_SIM7600_PID)}, /*SIM7600 */並且在 option_probe 里過濾掉 interface 5
/* sim7600 */
if (dev_desc->idVendor == SIMCOM_SIM7600_VID &&
dev_desc->idProduct == SIMCOM_SIM7600_PID && iface_desc->bInterfaceNumber == 5 )return -ENODEV;
配置選擇:
 
//這個不一定有
NetWork   >>
wwan               .....................GenericOpenWrt 3G/4G proto handler
 
//這個一定有
Kernel modules >>
USB Support >>
Kmod -usb-core
Kmod -usb-net
     >> kmod-usb-net-qmi-wwan
Kmod-usb-ohci     //這個選項一定要勾選,否則可能無法在系統中查看設備
Kmod-usb-serial
Kmod-usb-serial-option
Kmod-usb-serial-wwan
kmod-usb-uhci
Kmod-usb2
3 內核調試信息打印
如果驅動正確編譯到內核,內核開機找到模塊后,會打印如下信息
usb 11: new high speed USB device using rt3xxxehci and address 2option 11:1.0: GSM modem (1port) converter detected
usb 11: GSM modem (1port) converter now attached to ttyUSB0option 11:1.1: GSM modem (1port) converter detected
usb 11: GSM modem (1port) converter now attached to ttyUSB1
 
option 11:1.2: GSM modem (1port) converter detected
usb 11: GSM modem (1port) converter now attached to ttyUSB2option 11:1.3: GSM modem (1port) converter detected
usb 11: GSM modem (1port) converter now attached to ttyUSB3option 11:1.4: GSM modem (1port) converter detected
usb 11: GSM modem (1port) converter now attached to ttyUSB4
dev/ttyUSB0~4 就會生成,上層應用就可以通過這些設備和模塊交互了(發送AT 命令等)。
 
經測試  可用 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM