AT Commands
02.03.2023

AT+COPS: Modes, parameters, and examples

Peter Bornerup
Peter Bornerup

Developer

The AT+COPS is an AT command for operator selection.

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

Overview

CommandExample 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=0OKSets the automatic operator selection mode.
AT+COPS=1,<format>,<oper>OKSets manual network selection for the selected PLMN.
AT+COPS=2OKDeregister from network and place on FPLMN.
AT+COPS=3,<format>OKSets read command +COPS? to return only the selected <format>.
AT+COPS=4,<format>,<oper>OKManual 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 the bands/technologies the device can connect to and a coverage map, if available. GSMA has 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 developer blog: 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.

We have the largest global coverage of NB-IoT and LTE-M technologies on the market and are ready to help you future-proof your devices. See our LTE-M global coverage and NB-IoT global coverage.

Notes

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

Build your
own network

Enhance signal quality and network control with non-steered SIM cards. Connect all your devices securely to a global network with Onomondo IoT SIMs.

Start testing Onomondo for free

Ready to experience next-generation IoT connectivity? Create an account, explore the platform, and start testing Onomondo’s IoT SIM cards for free.

Related articles

Read more about the topic

Test Connectivity with AT Commands
Articles
How to test connectivity with AT commands
AT Commands Developer blog
By using the AT command sequence in this blog, you can establish a data connection to your cellular IoT connectivity provider to test modem connectivity.
at cpol for adding network preference lists
Articles
How to add a Network Preference List (PLMN) to a SIM
Developer blog AT Commands
Network preference lists (PLMNs) are a way to prioritize specific networks over other available networks. Here’s how to set the PLMN using AT commands.
Ping your modem with AT commands
Articles
How to ping your modem using AT commands
AT Commands Developer blog
Checking your modem’s data connection by performing a ping after a successful network attachment can help debug connectivity issues. This blog shows you how.