> For the complete documentation index, see [llms.txt](https://docs.eseye.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eseye.com/smartconnect/at-command-reference/general-at-commands/creg-request-network-registration-status.md).

# CREG – request network registration status

Verifies the current network registration status of the module. First set the **Mode** to determine which information is displayed, and if it's displayed automatically when a change occurs.

| Type     | Syntax                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Returned Result                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Test** | `AT+CREG=?`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | <p><code>+CREG: (0-2)</code></p><p><code>OK</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **Read** | <p><code>AT+CREG?</code></p><p><strong>Tip:</strong> Perform the Write command first so that you can set the returned details of the Read command.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | <p>The response depends on which mode you selected in the write command.</p><p>The initial number returned is the mode.</p><p>If the mode = 0, the following response occurs:</p><p><code>+CREG: 0,\<regStatus></code></p><p><code>OK</code></p><p>If the mode = 1, the following response occurs:</p><p><code>+CREG: 1,\<regStatus></code></p><p><code>OK</code></p><p>If the mode = 2, the following response occurs:</p><p><code>+CREG: 2,\<regStatus>\[,\<netLac>,\<netCellID>\[,\<AcT>]]</code></p><p>where:</p><ul><li><p><code>\<regStatus></code> is the registration status, either:</p><ul><li><code>0</code> – Not registered, the device is currently not searching for new operator.</li><li><code>1</code> – Registered to home network.</li><li><code>2</code> – Not registered, but the device is currently searching for a new operator.</li><li><code>3</code> – Registration denied.</li><li><code>4</code> – Unknown. For example, out of range.</li><li><code>5</code> – Registered, roaming. The device is registered on a foreign (national or international) network.</li></ul></li><li><code>\<netLac></code> is a two byte location area code in hexadecimal format</li><li><p><code>\<netCellID></code> is the Cell ID in hexadecimal format, either:</p><ul><li>16 bit for 2G</li><li>28 bit for 3G or 4G</li></ul></li><li><p><code>\<AcT></code> is radio access technology, either:</p><ul><li><code>0</code> – GSM</li><li><code>2</code> – UTRAN</li><li><code>3</code> – GSM w/EGPRS</li><li><code>4</code> – UTRAN w/HSDPA</li><li><code>5</code> – UTRAN w/HSUPA</li><li><code>6</code> – UTRAN w/HSDPA and w/HSUPA</li><li><code>7</code> – E-UTRAN</li></ul></li></ul><p>or</p><p><code>ERROR</code> – the command failed.</p> |
| Write    | <p><code>AT+CREG=\<Mode></code></p><p>where <code>\<Mode></code> is either:</p><ul><li><code>0</code> – Disable network registration unsolicited result code. You will need to manually check the network registration status.</li><li><code>1</code> – Enable network registration unsolicited result code. If there is a change in network registration status, the modem will automatically return a response.</li><li><code>2</code> – Enable network registration and location information unsolicited result code. If there is a change in network registration status or at least one of the additional network information elements, the modem will automatically return a response.</li></ul> | <p><code>OK</code> - the network registration status mode is successfully set</p><p><code>ERROR</code> - the command failed</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |

{% hint style="info" %}
Factors contributing to SIM failure to register on the network may include:

* Missing network coverage
* Denied network access
* No valid roaming agreement between the home network and currently available operators
  {% endhint %}

#### Example

```
AT+CREG=2
OK
AT+CREG?
+CREG: 2,5,"54DB","0F6B0578",7
OK
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.eseye.com/smartconnect/at-command-reference/general-at-commands/creg-request-network-registration-status.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
