1. 常见AT 指令
AT 指令分为两种,通用指令,和厂商自定义的指令,通用指令一般以C 开头,每个modem 厂商基本都遵循这个规范。
下来我们看下常见的一些AT 指令
1.1 查看注册状态: AT+COPS?
AT+COPS?
+COPS: {mode}[,{format},{oper}[,{ AcT}]]
| mode | note |
|---|---|
| 0 | 自动注册; Default value |
| 1 | manual ( field shall be present, and optionally) |
| 2 | deregister from network |
| 3 | set only (for read command +COPS?), do not attempt registration/deregistration ( and fields are ignored); this value is not applicable in read command response |
| 4 | manual/automatic ( field shall be present); if manual selection fails, automatic mode (=0) is entered |
| format | note |
|---|---|
| 0 | long format alphanumeric ; Default value |
| 1 | short format alphanumeric |
| 2 | numeric |
oper: 运营商字符串
| AcT | access technology selected |
|---|---|
| 0 | GSM 2G |
| 1 | GSM Compact |
| 2 | UTRAN 3G |
| 3 | GSM w/EGPRS |
| 4 | UTRAN w/HSDPA |
| 5 | UTRAN w/HSUPA |
| 6 | UTRAN w/HSDPA and HSUPA |
| 7 | E-UTRAN 4G |
| 8 | EC-GSM-IoT (A/Gb mode) |
| 9 | E-UTRAN (NB-S1 mode) |
| 10 | E-UTRA connected to a 5GCN (see NOTE 5) |
| 11 | NR connected to a 5GCN (see NOTE 5) 5G |
| 12 | NG-RAN 5G |
| 13 | E-UTRA-NR dual connectivity (see NOTE 6) |
通过以上命令就知道该模块的注册方式,以及当前注册的网络信号是3g, 4g 还是5g。
1.2 查询网络信号质量
对于4G 网络使用该命令查询:
AT+CSQ?
+CSQ: rssi, ber
rssi: integer type
0 -113 dBm or less
1 -111 dBm
2…30 -109… -53 dBm
31 -51 dBm or greater
99 not known or not detectable
ber: integer type; channel bit error rate (in percent)
0…7 as RXQUAL values in the table in 3GPP TS 45.008 subclause 8.2.4
99 not known or not detectable
对于5G 网络使用以下信号:
AT+CESQ
rxlev, ber, rscp,ecno,rsrq,rsrp,ss_rsr
q,ss_rsrp, ss_sinr
我们这里只看rxlev 返回值:
| rxlev | range |
|---|---|
| 0 | rssi< -110 dBm |
| 1 | -110 dBm ≤ rssi < -109 dBm |
| 2 | -109 dBm ≤ rssi < -108 dBm |
| : | : : : |
| 61 | -50 dBm ≤ rssi < -49 dBm |
| 62 | -49 dBm ≤ rssi < -48 dBm |
| 63 | -48 dBm ≤ rssi |
| 99 | not known or not detectable |
更加广泛和通用的信息参考AT+GTCCINFO指令。
1.3 网络拨号:AT+GTRNDIS=1,1
确认到模块已经注册到网络后,就可以进行拨号了
AT+GTRNDIS=1,1
OK
AT+GTPING=0,"182.61.200.6"
+GTPING: 1
OK
表示拨号成功了。
1.4 切换无线网络: AT+WS46
AT+WS46=[<n>]
OK
n的取值范围为:
22 UTRAN only
28 E-UTRAN only
31 UTRAN and E-UTRAN
36 NG-RAN only
37 NG-RAN and E-UTRAN
38 NG-RAN, E-UTRAN and UTRAN
40 NG-RAN and UTRAN
2. ModemManager debug
mmcli --scan-modems
<< successfully requested to scan devices
To list detected cellular devices use command:
mmcli --list-modems
<< /org/freedesktop/ModemManager1/Modem/0 [Sierra Wireless, Incorporated] MC7455
To acquire more device information and status use the --modem command and identifier value.
mmcli --modem=0
https://techship.com/faq/how-to-guide-control-and-set-up-a-data-connection-in-linux-using-modemmanager-as-connection-manager/
https://wiki.archlinux.org/title/Mobile_broadband_modem
最后
以上就是靓丽羽毛最近收集整理的关于4G/5G 模块测试与调试的全部内容,更多相关4G/5G内容请搜索靠谱客的其他文章。
发表评论 取消回复