Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GSM MODEM : AT COMMAND to know my operator

Tags:

at-command

Can any one please let me know, is there any AT command by which I can detect the current operator name?

I have used AT+COPS? It returned me the numeric code for the operator: 0,2,40410

Then I used the command AT+WOPN = 0,40410 which returns the alphanumeric value for the operator

but that only gives Airtel operator's name, and for other operators it gives an error.

Please help me.

like image 942
user1664899 Avatar asked Nov 30 '12 06:11

user1664899


People also ask

WHAT IS AT commands for GSM modem?

AT commands are instructions used to control a modem. AT is the abbreviation of ATtention. Every command line starts with "AT" or "at". That's why modem commands are called AT commands.

How do I find my SIM number using commands?

AT+CNUM returns the subscriber number - but implementation of this AT command is optional. You can also use the AT commands for USSD transactions, e.g. +CUSD Section 7.15 of TS 27.007 and related commands, to get the subscriber number. Save this answer.

What is the name of the commands used to control modems?

That's why modem commands are called AT commands. Many of the commands that are used to control wired dial-up modems, such as ATD (Dial), ATA (Answer), ATH (Hook control) and ATO (Return to online data state), are also supported by GSM/GPRS modems and mobile phones.


2 Answers

You should use AT+COPS=<mode>,[<format>,<oper>[,<AcT>]] command as was pointed out, but <mode> value need to be 3 to not to override your existing <mode> value:

<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.

And <format> need to be 0 or 1

<format>: integer type
0   long format alphanumeric <oper>
1   short format alphanumeric <oper>
2   numeric <oper>

So your commands are

AT+COPS=3,0
AT+COPS?
like image 178
synther Avatar answered Sep 18 '22 16:09

synther


You need to set the format first.

  • AT+COPS=1,2

    "2" means numeric format, this will return e.g.40410

  • AT+COPS=1,0

    "0" means long alphanumeric format, this should return the operator name string.

The first parameter is the <mode> - select the value that you need. For the full documentation of this AT command, see 3GPP TS 27.007 document at http://www.3gpp.org/ftp/Specs/html-info/27007.htm

When you have set the mode and format, then send AT+COPS? and you should get the operator name in the format that you want.

like image 21
user1725145 Avatar answered Sep 19 '22 16:09

user1725145