ECX0 4G模块上网流程

环境准备

拿到SDK,拿到物联网SIM卡,SIM卡注网,然后把ICCID发给运营商开卡,拨号后就能连接公网。

获取ICCID:

root@www:~# at AT+ICCID
+ICCID: 89860918700307661378
OK

拨号成功后:获取到公网地址

rmnet_data0 Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:10.252.5.117  Mask:255.255.255.252
          inet6 addr: fe80::7932:c6ef:3a7b:df26/64 Scope:Link
          UP RUNNING  MTU:1500  Metric:1
          RX packets:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:538 (538.0 B)  TX bytes:780 (780.0 B)

ping百度:

root@mdm9607-perf:~# ping -I rmnet_data0 -c 10 www.baidu.com
PING www.a.shifen.com (112.80.248.75) from 10.252.5.117 rmnet_data0: 56(84) bytes of data.
64 bytes from 112.80.248.75: icmp_req=1 ttl=53 time=68.9 ms
64 bytes from 112.80.248.75: icmp_req=2 ttl=53 time=77.4 ms
64 bytes from 112.80.248.75: icmp_req=3 ttl=53 time=75.4 ms
64 bytes from 112.80.248.75: icmp_req=4 ttl=53 time=73.4 ms
64 bytes from 112.80.248.75: icmp_req=5 ttl=53 time=71.3 ms
64 bytes from 112.80.248.75: icmp_req=6 ttl=53 time=69.9 ms
64 bytes from 112.80.248.75: icmp_req=7 ttl=53 time=68.3 ms
64 bytes from 112.80.248.75: icmp_req=8 ttl=53 time=76.6 ms
64 bytes from 112.80.248.75: icmp_req=9 ttl=53 time=75.6 ms
64 bytes from 112.80.248.75: icmp_req=10 ttl=53 time=73.8 ms

--- www.a.shifen.com ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9015ms
rtt min/avg/max/mdev = 68.359/73.109/77.405/3.123 ms

example代码

代码路径:ql-ol-sdk/ql-ol-extsdk/example

设置编译环境:source ql-ol-crosstool/ql-ol-crosstool-env-init

编译代码:进入模块测试代码,执行make就可编译

不同的SDK版本之间编译代码,需要解决静态库依赖,运行时解决动态库依赖问题,解决库函数返回失败问题,解决依赖的service问题

举例说明

QMI消息掩码

使用QL_NW_ForbidInd函数,返回-3,设置掩码失败,可能是某些库接口不支持,后面通过更新库二分法查找出libqmiservices.so.1需要更新版本。

多APN拨号的支持

需要ql_manager_server和一些库

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值