由于TQ3568 CoreB板卡上測試4G模塊時,需接上USB 4G模塊,如下圖所示:
一、上/掉電4G模塊
系統開機時默認就已經給4G模塊上電了。用戶也可以通過以下命令控制4G模塊的上/掉電。
echo 1/0 > /sys/class/rk_modem/modem_status #0為掉電,1為上電
4G測試程序在/test_utils/4G目錄下,我司提供了SLM750、SLM320,N720三種4G模塊的測試腳本如下圖所示:
用戶可根據實際情況執行測試腳本進行測試,測試前請插上4G天線。
例如測試slm750:只需要執行sh 4G_slm750_TQ3568.sh即可判斷4G功能是否正常:
下面以SLM750模塊為例:
執行效果如下所示:
root@RK356X:/test_utils/4G# sh 4G_slm750_TQ3568.sh
cat: '/sys/bus/usb/devices/7-1:1.1/modalias': No such file or directory
4G_slm750_TQ3568.sh: line 16: echo: write error: Invalid argument
Usage:
kill [options] [...]
Options:
[...] send signal to every listed
-, -s, --signal
specify the to be sent
-q, --queue integer value to be sent with the signal
-l, --list=[] list all signal names, or convert one to a name
-L, --table list all signal names in a nice table
-h, --help display this help and exit
-V, --version output version information and exit
For more details see kill(1).
set dns to 120.80.80.80 221.5.88.88
set def gateway
PING ins-r23tsuuf.ias.tencent-cloud.net (61.241.54.211) from 10.154.10.66 ppp0: 56(84) bytes of data.
64 bytes from 61.241.54.211: icmp_seq=1 ttl=52 time=24.9 ms
64 bytes from 61.241.54.211: icmp_seq=2 ttl=52 time=31.5 ms
64 bytes from 61.241.54.211: icmp_seq=3 ttl=52 time=22.3 ms
64 bytes from 61.241.54.211: icmp_seq=4 ttl=52 time=19.5 ms
64 bytes from 61.241.54.211: icmp_seq=5 ttl=52 time=22.6 ms
64 bytes from 61.241.54.211: icmp_seq=6 ttl=52 time=23.4 ms
64 bytes from 61.241.54.211: icmp_seq=7 ttl=52 time=25.7 ms
64 bytes from 61.241.54.211: icmp_seq=8 ttl=52 time=27.4 ms
64 bytes from 61.241.54.211: icmp_seq=9 ttl=52 time=24.6 ms
64 bytes from 61.241.54.211: icmp_seq=10 ttl=52 time=24.3 ms
--- ins-r23tsuuf.ias.tencent-cloud.net ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 17267ms
rtt min/avg/max/mdev = 19.469/24.618/31.501/3.067 ms
二、 報錯
1、 提示XXX目錄找不到
執行腳本后提示找不到xxx/7-1:1.1/modalias目錄,如下圖所示:
原因是4G模塊上電時分配的USB接口不匹配,可以進入/sys/bus/usb/devices目錄下查看是否有類似如下圖所示:
上圖紅框有5-1:1.x多個子集目錄的為內核分配給4G模塊的USB接口目錄,故需要將/test_utils/4G/4G_xxx_TQ3568.sh文件里的目錄修改為對應的5-1:1.x。我們任意選一個5-1:x.x目錄即可,因為這些5-1:1.x目錄里的modies文件所包含的PID、VID值是一樣的。如下圖所示:
2、提示ttyUSB占用:
執行腳本后,報以下錯誤:
Device ttyUSB2 is locked by pid 1366
解決方法:請先執行掉電,重新上電,然后再執行腳本,或者重啟板子。
3、出現超時如:
Script /usr/sbin/chat -s -v -f /etc/ppp/peers/tq_slm750_connect finished (pid 1435), status = 0x0
Serial connection established.
using channel 3
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB2
sent [LCP ConfReq id=0x1 ]
rcvd [LCP ConfReq id=0x0 ]
No auth is possible
sent [LCP ConfRej id=0x0 ]
rcvd [LCP ConfAck id=0x1 ]
rcvd [LCP ConfReq id=0x1 ]
sent [LCP ConfAck id=0x1 ]
sent [CCP ConfReq id=0x1 ]
sent [IPCP ConfReq id=0x1 ]
rcvd [LCP DiscReq id=0x2 magic=0xd0c305c0]
rcvd [LCP ProtRej id=0x3 80 fd 01 01 00 07 15 03 2f]
Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
sent [IPCP ConfReq id=0x1 ]
sent [IPCP ConfReq id=0x1 ]
sent [IPCP ConfReq id=0x1 ]
sent [IPCP ConfReq id=0x1 ]
sent [IPCP ConfReq id=0x1 ]
sent [IPCP ConfReq id=0x1 ]
sent [IPCP ConfReq id=0x1 ]
sent [IPCP ConfReq id=0x1 ]
sent [IPCP ConfReq id=0x1 ]
IPCP: timeout sending Config-Requests # 出現這種
sent [LCP TermReq id=0x2 "No network protocols running"]
sent [LCP TermReq id=0x3 "No network protocols running"]
Connection terminated.
Modem hangup
[root@RK356X:/test_utils/4G#
出現這種有可能是天線沒有接好,沒有信號,請檢查一下天線。或者是卡沒有錢,卡上不了網等。
-
模塊
+關注
關注
7文章
2707瀏覽量
47476 -
4G
+關注
關注
15文章
5520瀏覽量
119067 -
開發平臺
+關注
關注
0文章
94瀏覽量
14277 -
RK3568
+關注
關注
4文章
514瀏覽量
5053
發布評論請先 登錄
相關推薦
評論