任何人都可以告诉我,是否有任何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.
Run Code Online (Sandbox Code Playgroud)
并且<format>需要为0或1
<format>: integer type
0 long format alphanumeric <oper>
1 short format alphanumeric <oper>
2 numeric <oper>
Run Code Online (Sandbox Code Playgroud)
所以你的命令是
AT+COPS=3,0
AT+COPS?
Run Code Online (Sandbox Code Playgroud)