展锐5G模块: NCM 多路网卡测试

本文档基于移远 Rx500U 模组

1)AT指令查询和设置

  a) 设置at+qcfg="multiusbnet",2,0

        产生2路网卡,网卡1对应PDP contex 1 , 网卡2对应PDP contex 2

root@ubuntu:/home/# ls /dev/ttyUSB*
/dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 /dev/ttyUSB3 /dev/ttyUSB4
root@ubuntu:/home/# busybox microcom /dev/ttyUSB2
+QIND: PB DONE
+CFUN: 1
+QIND: SMS DONE
at+qgmr
RM500UCNAAR01A10M2G_01.001.01.001
OK
at+cgdcont?
+CGDCONT: 1,"IP","APN1","0.0.0.0",0,0,0,0,,,,,,0,,,0,,0,0,0,0
+CGDCONT: 2,"IP","APN2","0.0.0.0",0,0,0,0,,,,,,0,,,0,,0,0,0,0
+CGDCONT: 11,"IPV4V6","IMS","0.0.0.0",0,0,0,0,,,,,,0,,,0,,0,0,0,0
OK
at+qcfg="multiusbnet"
+QCFG: "multiusbnet",2,0
OK
at+cgpaddr
+CGPADDR: 1,""
+CGPADDR: 2,""
+CGPADDR: 11,""
OK

2) 第一路拨号

AT+QNETDEVCTL=1,1,1
OK
+QNETDEVSTATUS: 1,1,"IPV4",0
at+cgpaddr
+CGPADDR: 1,"10.2.20.146"
+CGPADDR: 2,""
+CGPADDR: 11,""
OK
at+cgdcont?
+CGDCONT: 1,"IP","APN1","0.0.0.0",0,0,0,0,,,,,,0,,,0,,0,0,0,0
+CGDCONT: 2,"IP","APN2","0.0.0.0",0,0,0,0,,,,,,0,,,0,,0,0,0,0
+CGDCONT: 11,"IPV4V6","IMS","0.0.0.0",0,0,0,0,,,,,,0,,,0,,0,0,0,0
OK

 3) 第二路拨号

AT+QNETDEVCTL=2,1,1
OK
+QNETDEVSTATUS: 2,1,"IPV4",0
AT+CGPADDR
+CGPADDR: 1,"10.2.20.146"
+CGPADDR: 2,"10.20.67.132"
+CGPADDR: 11,""
OK

2) 网卡

root@ubuntu:/home# ifconfig
ens160u1 Link encap:Ethernet HWaddr 2e:88:91:57:de:b5
    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)
ens160u1i7 Link encap:Ethernet HWaddr 2e:88:91:57:de:b5
    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)
    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:192 errors:0 dropped:0 overruns:0 frame:0
    TX packets:192 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:14015 (14.0 KB) TX bytes:14015 (14.0 KB)
//第一路拨号之后 AT+QNETDEVCTL=1,1,1
//第一路拨号成功 +QNETDEVSTATUS: 1,1,"IPV4",0
//udhcpc 获取ip
root@ubuntu:/home# busybox udhcpc ‐fnq ‐i ens160u1
    udhcpc (v1.22.1) started
    Sending discover...
    Sending select for 10.2.20.146...
    Lease of 10.2.20.146 obtained, lease time 86400
    /etc/udhcpc/default.script: Resetting default routes
    SIOCDELRT: No such process
    /etc/udhcpc/default.script: Adding DNS 202.96.128.86
    /etc/udhcpc/default.script: Adding DNS 202.96.134.133
root@ubuntu:/home# ping ‐I ens160u1 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 10.2.20.146 ens160u1: 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=113 time=308 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=113 time=76.9 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=113 time=68.4 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=113 time=51.4 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=113 time=79.9 ms
^C
‐‐‐ 8.8.8.8 ping statistics ‐‐‐
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 51.409/117.006/308.334/96.177 ms

root@ubuntu:/home#
//第2路拨号之后 AT+QNETDEVCTL=2,1,1
//第2路拨号成功 +QNETDEVSTATUS: 2,1,"IPV4",0
//udhcpc 获取ip

root@ubuntu:/home# busybox udhcpc ‐fnq ‐i ens160u1i7
udhcpc (v1.22.1) started
Sending discover...
Sending select for 10.20.67.132...
Lease of 10.20.67.132 obtained, lease time 86400
/etc/udhcpc/default.script: Resetting default routes
SIOCDELRT: No such process
/etc/udhcpc/default.script: Adding DNS 202.96.128.86
/etc/udhcpc/default.script: Adding DNS 202.96.134.133

root@ubuntu:/home# ping ‐I ens160u1i7 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 10.20.67.132 ens160u1i7: 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=113 time=85.2 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=113 time=37.7 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=113 time=50.7 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=113 time=146 ms
^C
‐‐‐ 8.8.8.8 ping statistics ‐‐‐
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 37.768/80.031/146.390/42.058 ms

3) 断开第二路拨号,删除第二路APN

//2路拨号成功这种情况下要删除第二路APN
AT+CGDCONT?
+CGDCONT: 1,"IP","APN1","0.0.0.0",0,0,0,0,,,,,,0,,,0,,0,0,0,0
+CGDCONT: 2,"IP","APN2","0.0.0.0",0,0,0,0,,,,,,0,,,0,,0,0,0,0
+CGDCONT: 11,"IPV4V6","IMS","0.0.0.0",0,0,0,0,,,,,,0,,,0,,0,0,0,0
OK
AT+CGDCONT=2
+CME ERROR: 280//通路使用中所以报错
AT+QNETDEVCTL=2,0,0//断开第二路拨号
OK
+QNETDEVSTATUS: 2,0,"IPV4",0//第二路拨号断开成功
AT+CGPADDR
+CGPADDR: 1,"10.2.20.146"
+CGPADDR: 2,""
+CGPADDR: 11,""
OK
AT+CGDCONT?
+CGDCONT: 1,"IP","APN1","0.0.0.0",0,0,0,0,,,,,,0,,,0,,0,0,0,0
+CGDCONT: 2,"IP","APN2","0.0.0.0",0,0,0,0,,,,,,0,,,0,,0,0,0,0
+CGDCONT: 11,"IPV4V6","IMS","0.0.0.0",0,0,0,0,,,,,,0,,,0,,0,0,0,0
OK
AT+CGDCONT=2//删除第二路APN
OK
AT+CGDCONT?
+CGDCONT: 1,"IP","APN1","0.0.0.0",0,0,0,0,,,,,,0,,,0,,0,0,0,0
+CGDCONT: 11,"IPV4V6","IMS","0.0.0.0",0,0,0,0,,,,,,0,,,0,,0,0,0,0
OK

你可能感兴趣的:(移动通信技术,5G,数据库)