> 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. Set the mode first to control the returned information and automatic status updates.

### Test command

Run the command:

```
AT+CREG=?
```

The module returns:

```
+CREG: (0-2)
OK
```

### Read command

Set the mode with the Write command before running:

```
AT+CREG?
```

The response depends on the selected mode. The first number is the mode:

```
+CREG: 0
OK
```

```
+CREG: 1
OK
```

```
+CREG: 2,[,,[,]]
```

For mode `2`, the response includes:

* The registration status:
  * `0` — Not registered. The device is not searching for an operator.
  * `1` — Registered on the home network.
  * `2` — Not registered, but searching for an operator.
  * `3` — Registration denied.
  * `4` — Unknown, for example, when the device is out of range.
  * `5` — Registered while roaming on a foreign network.
* A two-byte location area code in hexadecimal format.
* A cell ID in hexadecimal format:
  * `16` bit for 2G.
  * `28` bit for 3G or 4G.
* The radio access technology:
  * `0` — GSM.
  * `2` — UTRAN.
  * `3` — GSM with EGPRS.
  * `4` — UTRAN with HSDPA.
  * `5` — UTRAN with HSUPA.
  * `6` — UTRAN with HSDPA and HSUPA.
  * `7` — E-UTRAN.

The module returns `ERROR` if the command fails.

### Write command

Run the command:

```
AT+CREG=
```

Set the value to one of the following:

* `0` — Disable unsolicited network registration results. Check the registration status manually.
* `1` — Enable unsolicited network registration results. The modem returns a response when the status changes.
* `2` — Enable unsolicited network registration and location information results. The modem returns a response when the registration status or additional network information changes.

The module returns `OK` when it sets the mode. It returns `ERROR` if the command fails.

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

#### Example

Set the mode:

```
AT+CREG=2
OK
```

Read the registration status:

```
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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
