请问是否有任何AT命令可以检测当前运营商名称?
我已经使用了AT+COPS?命令,它为我返回了运营商的数字代码:0、2、40410。
然后我使用了AT+WOPN=0,40410命令,它返回了该运营商的字母数字值。
但是这只给出了Airtel 运营商的名称,对于其他运营商,它会返回错误信息。
请帮帮我。
请问是否有任何AT命令可以检测当前运营商名称?
我已经使用了AT+COPS?命令,它为我返回了运营商的数字代码:0、2、40410。
然后我使用了AT+WOPN=0,40410命令,它返回了该运营商的字母数字值。
但是这只给出了Airtel 运营商的名称,对于其他运营商,它会返回错误信息。
请帮帮我。
正如指出的那样,您应该使用AT+COPS=<mode>,[<format>,<oper>[,<AcT>]]
命令,但是<mode>
值需要为3
才能不覆盖您现有的<mode>
值:
<mode>: integer type
3 set only <format> (for read command +COPS?), do not attempt
registration/deregistration (<oper> and <AcT> fields are ignored);
this value is not applicable in read command response.
并且<format>
需要为0或1
<format>: integer type
0 long format alphanumeric <oper>
1 short format alphanumeric <oper>
2 numeric <oper>
所以你的命令是
AT+COPS=3,0
AT+COPS?
AT+COPS=1,2
"2"表示数字格式,例如返回40410。
AT+COPS=1,0
"0"表示长字符串格式,应返回运营商名称字符串。
第一个参数是<mode>
- 选择您需要的值。要获取此AT命令的完整文档,请参见3GPP TS 27.007文件 http://www.3gpp.org/ftp/Specs/html-info/27007.htm
当您设置完模式和格式后,发送AT+COPS?
,您应该会以所需格式获得运营商名称。
AT+QSPN
。