Hi3531平台4G模块驱动调试

Hi3531平台4G模块驱动调试,模块选用huawei  me909s。

4G拨号有两种方式:pppd和dhcp,此处解析dhcp方式;

1、修改内核配置:

make menuconfig
[*] Network device support  --->
 
      USB Network Adapters  --->
 
<*>   QMI WWAN driver for Qualcomm MSM based 3G and LTE modems

 [*] USB support  --->
 
<*>   USB Serial Converter support  --->
 
<*>   USB driver for GSM and CDMA modems

2、修改内核驱动源码:

        修改option.c,增加

{ USB_DEVICE(HUAWEI_VENDOR_ID, 0x15c1) }, /* Huawei ME909S */

3、编译更新内核        

        插入me909s设备打印信息如下,会将usb无线网卡设备转为串口设备,识别打印如下:

option 3-1:2.2: GSM modem (1-port) converter detected
usb 3-1: GSM modem (1-port) converter now attached to ttyUSB0
option 3-1:2.3: GSM modem (1-port) converter detected
usb 3-1: GSM modem (1-port) converter now attached to ttyUSB1
option 3-1:2.4: GSM modem (1-port) converter detected
usb 3-1: GSM modem (1-port) converter now attached to ttyUSB2
option 3-1:2.5: GSM modem (1-port) converter detected
usb 3-1: GSM modem (1-port) converter now attached to ttyUSB3
option 3-1:2.6: GSM modem (1-port) converter detected
usb 3-1: GSM modem (1-port) converter now attached to ttyUSB4

3、创建me909s.sh脚本

        me909s.sh脚本内容如下:

#!/bin/sh
echo "ATE0" > /dev/ttyUSB2  
echo "AT^NDISDUP=1,1,\"3gnet\""> /dev/ttyUSB2

ifconfig eth0 down 
ifconfig usb0 up 
udhcpc -i usb0 
ifconfig eth0 up

4、运行me909s.sh脚本

./ me909s.sh

         ifconfig查看usb0是否获取到ip, ping www.baidu.com查看网络是否可达。

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值