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 命令等)。
 
经测试  可用 

转载于:https://www.cnblogs.com/langzixiaoxin/p/8795018.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值