Skip to main content
AT+COPS: Modes, parameters, and examples

This article is a practical overview of how to use the command.

P
Written by Peter Skov Bornerup
Updated over a month ago

AT+COPS is an AT command for operator selection.

Overview

Command

Example response(s)

Info

AT+COPS?

+COPS: <mode>[,<format>,<oper>,[AcT>]]

Returns the current selection mode, operator format, operator, and radio access technology.

AT+COPS=?

+COPS: [(<stat>,long alphanumeric <oper>,short alphanumeric <oper>,numeric <oper>[,<AcT>])]

Returns the available networks, including information on network status <stat>, operator information <oper>, and available access technologies <AcT>.

AT+COPS=0

OK

Sets the automatic operator selection mode.

AT+COPS=1,<format>,<oper>

OK

Sets manual network selection for the selected PLMN.

AT+COPS=2

OK

Deregister from network and place on FPLMN.

AT+COPS=3,<format>

OK

Sets read command +COPS? to return only the selected <format>.

AT+COPS=4,<format>,<oper>

OK

Manual operator selection with automatic fallback.

AT+COPS?

The read command AT COPS? returns the current mode, the registered operator, and radio access technology.

The response will have this syntax:

+COPS: [selection mode],[operator format],[operator],[radio access technology] 
OK

An example response is:

+COPS: 0,0,”T-Mobile USA”,7 
OK

The selection mode is 0, which means automatic, and the radio access technology is 7, which means E-UTRAN, the identifier for LTE.

AT+COPS=?

To get the list of available operators, use the test command AT+COPS=?.

The response format:​

+COPS: [(<stat>,long alphanumeric <oper>,short alphanumeric <oper>,numeric <oper>[,<AcT>])]


Here’s an example response:

+COPS: (1,"Telia DK","Telia","23820",9),(2,"TDC","TDC","23801",0),(1,"Telia-Telenor DK","TT DK","23866",0) 
OK

If you get a result that looks like this: +COPS: ,,(0,1,2,3,4),(0,1,2), then unfortunately your device has no available networks to connect to. Check which bands/technologies the device can connect to and a coverage map, if available. GSMA is a good starting point. Local base station databases or coverage maps from local providers are, however, usually better.


AT+COPS=0

The command AT+COPS=0 sets the modem to choose a network operator automatically.

Some modems are set to automatic network selection by default and don’t need to be set manually, and some modules have their own automatic selection mode. Consult your specific modem’s documentation for more information.

AT+COPS=1[,<format>[,<oper>]]

Manually select the network with the AT+COPS=1 command.

The command format should look like this:​

AT+COPS=[<mode>[,<format>[,<oper>]]]

An example command is:​

AT+COPS=1,2,"24407"

AT+COPS=2

AT+COPS=2 is the standard AT command to de-register a modem from a registered network.

Be aware that this will put the network on the FPLMN (forbidden network) list.

AT+COPS=3,<format>

The set command AT+COPS=3,<format> sets read command +COPS? to return only the selected <format>. This is not shown in the +COPS? read command response.

AT+COPS=4,<format>,<oper>

The set command AT+COPS=4,<format>,<oper> is manual mode with automatic fallback.

If manual selection of <oper> fails, automatic mode (=0) is entered.

Beware of AT+COPS=0 and AT+COPS=2

Beware of manually using AT+COPS=0 and AT+COPS=2. These commands can lead to unforeseen consequences.

Read all about the potential issues with manual attach and detach in this article: Why you shouldn’t tell IoT modems to detach/attach.


Defined values

<stat> = Network status.

  • 0 = Unknown

  • 1 = Available

  • 2 = Current

  • 3 = Forbidden

<mode> = Selection mode.

  • 0 = automatic selection

  • 1 = manual selection

  • 2 = deregister from network

<format> = Operator format.

  • 0 = long alphanumeric – e.g “T-Mobile USA”

  • 1 = short alphanumeric e.g “TMO”

  • 2 = numeric aka the MCC + MNC e.g. “310260”

<oper> = Operator identifier.

  • String of digits returning the operator identifier(s) in the above listed <format>.

<AcT> = Radio access technology.

  • 0 = GSM

  • 1 = GSM Compact

  • 2 = UTRAN

  • 3 = GSM w/EGPRS

  • 4 = UTRAN w/HSDPA

  • 5 = UTRAN w/HSUPA

  • 6 = UTRAN w/HSDPA and HSUPA

  • 7 = E-UTRAN

  • 8 = EC-GSM-IoT (A/Gb mode)

  • 9 = E-UTRAN (NB-S1 mode)

Interpreting this, 0 would typically be 2G connectivity, 7 is typically LTE (including LTE-M), and 9 is typically NB-IoT.

Notes

The command parameters and their defined values were mostly taken from the Nordic Semiconductor nRF9160 series.

Did this answer your question?