5G智能網關功能測試-4G/5G上網測試
FCU2303(5智能網關3.0)支持兩種4G模塊,分別為華為ME909s模塊和移遠EC20模塊;支持兩種5G模塊,分別為華為MH5000-31模塊和移遠RM500Q-GL模塊,默認支持移遠RM500Q-GL模塊,請根據自己選配的4G/5G模塊型號進行測試。
4G、5G模塊對應設備節點如下:
設備型號 | 節點名稱 |
ME909s模塊 |
wwan0 |
EC20模塊 |
wwan0 |
華為MH5000-31模塊 |
enx001e101f0000 |
移遠RM500Q-GL模塊 |
eth0 |
注意:因為不同通信模塊對供電電平和USB協議的需求有區別,所以注意在使用的時候需要通過跳線帽在PCB板子上接不同的插針來選擇電平,還需要將撥碼開關撥到對應的位置選擇使用的4G/5G模塊,跳線和撥碼開關的形狀如下圖所示:
4G/5G模塊配備4支天線,如下圖:
4G/5G模塊SIM卡使用標準抽屜式 SIM卡槽,按壓抽屜右邊的黃色按鈕可彈出抽屜,如下圖:
一、 4G/5G識別判斷
1、華為ME909s模塊
可以在FCU2303(5G智能網關3.0)的控制臺輸入一下命令看華為ME909s 4G模塊是否識別成功。root@localhost:~# lsusb Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 002: ID 12d1:15c1 Huawei Technologies Co., Ltd. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub使用ifconfig命令可以看到華為ME909s 4G模塊產生的節點名稱為wwan0。
2、移遠EC20模塊
可以在FCU2303(5G智能網關3.0)的控制臺輸入一下命令看移遠EC20 4G模塊是否識別成功。
root@localhost:~# lsusb Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 002: ID 2c7c:0125 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub使用ifconfig命令可以看到移遠EC20 4G模塊模塊產生的節點名稱為wwan0。
3、華為MH5000-31模塊
可以在FCU2303(5G智能網關3.0)的控制臺輸入一下命令看華為MH5000-31 5G模塊是否識別成功。root@localhost:~# lsusb Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 002: ID 12d1:15c3 Huawei Technologies Co., Ltd. Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub使用ifconfig命令可以看到華為MH5000-31 5G模塊產生的節點名稱為enx001e101f0000。
4、移遠RM500Q-GL模塊
可以在FCU2303(5G智能網關3.0)的控制臺輸入一下命令看移遠RM500Q-GL 5G模塊是否識別成功。root@localhost:~# lsusb Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 002: ID 2c7c:0800 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub使用ifconfig命令可以看到移遠RM500Q-GL 5G模塊模塊產生的節點名稱為eth0。
二、4G/5G上網測試
1、華為ME909s模塊
FCU2303(5G智能網關3.0)以插入聯通SIM卡測試4G上網為例,測試是否連接外網:
root@localhost:~# /root/Net_Tools/ok104x_me909s.sh [ 68.200415] cdc_ether 1-1:2.0 wwan0: kevent 12 may have been dropped [ 68.203672] cdc_ether 1-1:2.0 wwan0: kevent 11 may have been dropped [ 68.207654] cdc_ether 1-1:2.0 wwan0: kevent 11 may have been dropped ME909s module dhcp Complite !!! root@localhost:~# ping www.tkbv.cn -I wwan0 -c 5 PING www.a.shifen.com (61.135.169.121) from 10.148.39.252 wwan0: 56(84) bytes of data. 64 bytes from 61.135.169.121: icmp_seq=1 ttl=55 time=48.1 ms 64 bytes from 61.135.169.121: icmp_seq=2 ttl=55 time=27.6 ms 64 bytes from 61.135.169.121: icmp_seq=3 ttl=55 time=46.0 ms 64 bytes from 61.135.169.121: icmp_seq=4 ttl=55 time=52.9 ms 64 bytes from 61.135.169.121: icmp_seq=5 ttl=55 time=43.9 ms --- www.a.shifen.com ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4003ms rtt min/avg/max/mdev = 27.611/43.730/52.931/8.596 ms測試ping 飛凌,發送接收5包數據,丟包率為0,4G可上外網。如果4G模塊不能連接外網,請檢查4G撥號設置或SIM卡是否欠費。
查看4G撥號腳本為:
root@localhost:~# cat /root/Net_Tools/ok104x_me909s.sh #!/bin/sh while true do if [ -c /dev/ttyUSB2 ] then sleep 4 echo "ATE0" > /dev/ttyUSB2 echo "AT^NDISDUP=1,1,\"cmnet\""> /dev/ttyUSB2 ifconfig wwan0 up dhclient wwan0 echo "ME909s module dhcp Complite !!!" exit 0 fi sleep 1 echo "waiting ttyUSB2 device ..." done如需測試其他網絡環境,可以修改此腳本進行4G模塊的撥號上網設置。
注:echo "AT^NDISDUP=1,1,\"cmnet\""> /dev/ttyUSB2 為移動APN;
echo "AT^NDISDUP=1,1,\"3gnet\""> /dev/ttyUSB2 為聯通;
echo "AT^NDISDUP=1,1,\"ctnet\""> /dev/ttyUSB2 為電信。
2、移遠EC20模塊
FCU2303(5G智能網關3.0)以插入聯通SIM卡測試4G上網為例,測試是否連接外網:root@localhost:~# /root/Net_Tools/quectel-CM & [01-29_00:06:00:745] WCDMA<E_QConnectManager_Linux&Android_V1.1.34 [01-29_00:06:00:746] ./quectel-CM profile[1] = (null)/(null)/(null)/0, pincode = (null) [01-29_00:06:00:747] Find /sys/bus/usb/devices/1-1 idVendor=2c7c idProduct=0125 [01-29_00:06:00:747] Find /sys/bus/usb/devices/1-1:1.4/net/wwan0 [01-29_00:06:00:747] Find usbnet_adapter = wwan0 [01-29_00:06:00:747] Find /sys/bus/usb/devices/1-1:1.4/usbmisc/cdc-wdm0 [01-29_00:06:00:747] Find qmichannel = /dev/cdc-wdm0 [01-29_00:06:00:757] cdc_wdm_fd = 7 [01-29_00:06:00:851] Get clientWDS = 2 [01-29_00:06:00:884] Get clientDMS = 1 [01-29_00:06:00:916] Get clientNAS = 3 [01-29_00:06:00:947] Get clientUIM = 1 [01-29_00:06:00:981] Get clientWDA = 1 [01-29_00:06:01:012] requestBaseBandVersion EC20CEHCR06A02M1G [01-29_00:06:01:107] requestGetSIMStatus SIMStatus: SIM_READY [01-29_00:06:01:140] requestGetProfile[1] 3gnet///0 [01-29_00:06:01:172] requestRegistrationState2 MCC: 460, MNC: 1, PS: Attached, DataCap: LTE [01-29_00:06:01:204] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED [01-29_00:06:01:267] requestRegistrationState2 MCC: 460, MNC: 1, PS: Attached, DataCap: LTE [01-29_00:06:01:299] requestSetupDataCall WdsConnectionIPv4Handle: 0x86b43070 [01-29_00:06:01:363] requestQueryDataCall IPv4ConnectionStatus: CONNECTED [01-29_00:06:01:395] ifconfig wwan0 up [01-29_00:06:01:399] Fail to access /usr/share/udhcpc/default.script, errno: 2 (No such file or directory) [01-29_00:06:01:407] busybox udhcpc -f -n -q -t 5 -i wwan0 udhcpc: started, v1.27.2 udhcpc: sending discover udhcpc: sending select for 10.91.159.241 udhcpc: lease of 10.91.159.241 obtained, lease time 7200 撥號完成之后需要運行dhclient命令 root@localhost:~# dhclient wwan0 root@localhost:~# ping www.tkbv.cn -I wwan0 -c 5 PING www.a.shifen.com (61.135.169.121) from 10.54.74.74 wwan0: 56(84) bytes of data. 64 bytes from 61.135.169.121: icmp_seq=1 ttl=55 time=25.8 ms 64 bytes from 61.135.169.121: icmp_seq=2 ttl=55 time=44.6 ms 64 bytes from 61.135.169.121: icmp_seq=3 ttl=55 time=44.1 ms 64 bytes from 61.135.169.121: icmp_seq=4 ttl=55 time=41.6 ms 64 bytes from 61.135.169.121: icmp_seq=5 ttl=55 time=40.0 ms --- www.a.shifen.com ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4004ms rtt min/avg/max/mdev = 25.814/39.267/44.605/6.931 ms
3、華為MH5000-31模塊
FCU2303(5G智能網關3.0)以插入移動SIM卡測試5G上網為例,測試是否連接外網:root@localhost:~# /root/Net_Tools/ok104x_MH5000.sh MH5000 module dhcp Complite !!! root@localhost:~# ping www.baidu.com -I enx001e101f0000 -c 5 PING www.a.shifen.com (39.156.66.14) from 10.109.32.164 enx001e101f0000: 56(84) bytes of data. 64 bytes from 39.156.66.14 (39.156.66.14): icmp_seq=1 ttl=51 time=242 ms 64 bytes from 39.156.66.14 (39.156.66.14): icmp_seq=2 ttl=51 time=60.4 ms 64 bytes from 39.156.66.14 (39.156.66.14): icmp_seq=3 ttl=51 time=49.9 ms 64 bytes from 39.156.66.14 (39.156.66.14): icmp_seq=4 ttl=51 time=57.9 ms 64 bytes from 39.156.66.14 (39.156.66.14): icmp_seq=5 ttl=51 time=47.9 ms --- www.a.shifen.com ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4004ms rtt min/avg/max/mdev = 47.926/91.744/242.484/75.516 ms測試ping 百度,發送接收5包數據,丟包率為0,5G可上外網。如果5G模塊不能連接外網,請檢查5G撥號設置或SIM卡是否欠費。
查看5G撥號腳本為:
#!/bin/sh while true do if [ -c /dev/ttyUSB1 ] then sleep 4 echo "ATE0" > /dev/ttyUSB1 echo "AT^NDISDUP=1,1,\"cmnet\""> /dev/ttyUSB1 ifconfig enx001e101f0000 up dhclient enx001e101f0000 echo "MH5000 module dhcp Complite !!!" exit 0 fi sleep 1 echo "waiting ttyUSB1 device ..." done如需測試其他網絡環境,可以修改此腳本進行5G模塊的撥號上網設置。
注:echo "AT^NDISDUP=1,1,\"cmnet\""> /dev/ttyUSB1 為移動APN;
echo "AT^NDISDUP=1,1,\"3gnet\""> /dev/ttyUSB1為聯通;
echo "AT^NDISDUP=1,1,\"ctnet\""> /dev/ttyUSB1為電信。
4、移遠RM500Q-GL模塊
FCU2303(5G智能網關3.0)以插入移動SIM卡測試5G上網為例,測試是否連接外網:root@localhost:~# /root/Net_Tools/quectel-CM-5G & [1] 5117 [01-28_23:59:05:777] Quectel_QConnectManager_Linux_V1.6.0.15 [01-28_23:59:05:779] Find /sys/bus/usb/devices/2-1 idVendor=0x2c7c idProduct=0x800, bus=0x002, dev=0x002 [01-28_23:59:05:779] Auto find qmichannel = /dev/qcqmi0 [01-28_23:59:05:779] Auto find usbnet_adapter = eth0 [01-28_23:59:05:779] netcard driver = GobiNet, driver version = 22-Aug-2005 [01-28_23:59:05:779] ioctl(0x89f3, qmap_settings) failed: Operation not supported, rc=-1 [01-28_23:59:05:779] qmap_mode = 1, qmap_version = 5, qmap_size = 16384, muxid = 0x81, qmap_netcard = eth0 [01-28_23:59:05:780] Modem works in QMI mode [01-28_23:59:05:813] Get clientWDS = 7 [01-28_23:59:05:845] Get clientDMS = 8 [01-28_23:59:05:877] Get clientNAS = 9 [01-28_23:59:05:909] Get clientUIM = 10 [01-28_23:59:05:941] requestBaseBandVersion RM500QGLAAR01A01M4G_BETA_20200330F 1 [Mar 15 2020 04:00:00] [01-28_23:59:06:069] requestGetSIMStatus SIMStatus: SIM_READY [01-28_23:59:06:101] requestGetProfile[1] 3GNET///0 [01-28_23:59:06:133] requestRegistrationState2 MCC: 460, MNC: 1, PS: Attached, DataCap: LTE [01-28_23:59:06:165] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED [01-28_23:59:06:166] ifconfig eth0 0.0.0.0 [01-28_23:59:06:171] ifconfig eth0 down [01-28_23:59:06:229] requestSetupDataCall WdsConnectionIPv4Handle: 0x7de78490 [01-28_23:59:06:357] ifconfig eth0 up [01-28_23:59:06:362] Fail to access /usr/share/udhcpc/default.script, errno: 2 (No such file or directory) [01-28_23:59:06:362] busybox udhcpc -f -n -q -t 5 -i eth0 udhcpc: started, v1.27.2 udhcpc: sending discover udhcpc: sending select for 10.154.98.28 udhcpc: lease of 10.154.98.28 obtained, lease time 7200 撥號完成之后需要運行dhclient命令 root@localhost:~# dhclient root@localhost:~# ping www.baidu.com -I eth0 -c 5 PING www.a.shifen.com (39.156.66.14) from 10.134.255.146 eth0: 56(84) bytes of data. 64 bytes from 39.156.66.14 (39.156.66.14): icmp_seq=1 ttl=51 time=27.9 ms 64 bytes from 39.156.66.14 (39.156.66.14): icmp_seq=2 ttl=51 time=25.4 ms 64 bytes from 39.156.66.14 (39.156.66.14): icmp_seq=3 ttl=51 time=27.8 ms 64 bytes from 39.156.66.14 (39.156.66.14): icmp_seq=4 ttl=51 time=26.9 ms 64 bytes from 39.156.66.14 (39.156.66.14): icmp_seq=5 ttl=51 time=27.9 ms --- www.a.shifen.com ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4006ms rtt min/avg/max/mdev = 25.471/27.245/27.993/0.979 ms
三、流量轉發
FCU2303(5G智能網關3.0)如果想將4G/5G模塊的流量通過以太網或者wifi AP模式分享出去,請執行如下步驟:
設置轉發:
root@localhost:~# iptables -t nat -A POSTROUTING -o enx001e101f0000 -j MASQUERADE
使用iptables操作完轉發規則之后,如果想要保存此配置等下次上電自動啟動配置,可以使用以下命令:
保存iptables配置:
root@localhost:~# netfilter-persistent save run-parts: executing /usr/share/netfilter-persistent/plugins.d/15-ip4tables save run-parts: executing /usr/share/netfilter-persistent/plugins.d/25-ip6tables save root@localhost:~# netfilter-persistent reload run-parts: executing /usr/share/netfilter-persistent/plugins.d/15-ip4tables start run-parts: executing /usr/share/netfilter-persistent/plugins.d/25-ip6tables start
相關產品 >
-
FCU2303嵌入式控制單元
5G智能網關|FCU2303嵌入式控制單元5G智能網關3.0是高度集成的新一代5G智能通信網關。5G智能網關高算力CPU,采用無風扇設計,提供強大的邊緣計算能力的同時保證系統長時間穩定運行。5G網關支持全網通5G模組可為用戶提供高帶寬、低延時、大連接的服務。5G智能網關配有8個獨立MAC地址的千兆以太網和8個RS485。5G智能網關廣泛適用于智慧城市、智慧工廠、智慧電力、智慧水務、智慧農業、安防監控等行業。 軟件采用Ubuntu18.04系統,集成豐富的第三方組件Samba、Lighttpd、虛擬化技術(Docker、LXC、QEMU)、IPSEC、OpenSSL等。提供開放的系統API,方便用戶二次開發。 了解詳情 -
FCU2201嵌入式控制單元
高性價比5G工業網關 |FCU2201嵌入式控制單元搭載NXP LS1012A-C網絡處理器開發設計,是一款工業級的高性價比5G網關產品,采用無風扇散熱設計;CPU主頻1GHz,RAM 512MB,滿足一般邊緣計算和數據轉發的能力;并支持Ubuntu18.04和OpenWRT系統,方便用戶二次開發設計;5G模組采用M.2封裝可插拔方式,可更換為4G模組做成本優化;以及支持5個RS485接口,其中4個可拆卸做成本優化;產品適用于智慧工廠、智慧農業、智慧城市、智慧醫療等領域,關于傳感器數據采集、網絡攝像頭圖像采集、數據的處理、存儲、5G上傳等應用。
了解詳情