AT commands is the software interface used to control the modem, defined as part of the 3GPP standard. This means all cellular devices are required to support these commands. The commands supported by the nRF91 series is documented in the nRF91 AT Commands Reference Guide. This contains both the standard AT commands and Nordic-proprietary commands implemented specifically on our hardware.
A common use case is wanting the nRF9160 SiP to act purely as a modem in companion with an external MCU. For this, the nRF Connect SDK has the Serial LTE modem application, which implements extra AT commands for IP connectivity.
AT commands syntax
AT commands have three different functions depending on how you call them. You can use them to set values or perform actions, readout values, or test their existence and get information about subparameters.
Consider the AT command +CFUN that sets and reads the modem functional mode.
To set the functional mode, use the following syntax,
To read out the current functional mode, use the following syntax,
The test command for the AT+CFUN command will list the supported functional modes. Use the following syntax,
All AT commands will give a final response, one of the following:
"02024720" - <ci> the cell ID currently connected to
7 - <AcT> indicates either 7 for LTE-M or 9 for NB-IoT.
"11100000" - <Active-Time> the value of the Active Time timer given by the network
"11100000" - <Periodic-TAU> the value of the extended periodic TAU timer given by the network
The values of <Active-Time> and <Periodic-TAU> are strings in 8-bit format, where bits 1-5 indicate the timer value in binary form and bits 6-8 indicate the timer value unit according to the tables below. The timer value unit depends on which timer it is (<Active-Time> is T3324 and <Periodic-TAU> is T3412) and the full table can be found in 3GPP TS 24.008.
In the case of an error, you will also see the following parameters filled
<cause_type> - 0 if <reject_cause> contains an error
<reject_cause> – EMM cause value, which is documented in 3GPP TS 24.301 Annex A.
Some of these will be covered by other commands, but below are a select few
<plmn> – String of digits containing the MCC and MNC (information about network operator)
<tac> – Tracking Area Code, used to identify a tracking area within a network
<cell_id> – E-UTRAN cell ID
<phys_cell_id> – Physical cell ID
<EARFCN> – EARFCN for the given cell
<Periodic-TAU-ext> – Indicates the periodic TAU value
<Periodic-TAU> – Indicates the periodic TAU value. Should be ignored if <Periodic-TAU-ext> is set
Just like +CEREG, the values of <Active-Time>, <Periodic-TAU> and now also <Periodic-TAU-ext> are strings in 8-bit format, where bits 1-5 indicate the timer value in binary form and bits 6-8 indicate the timer value unit according to the tables below. The timer value unit depends on which timer it is, and for %XMONITOR, it also depends on whether <Periodic-TAU-ext> is present.
If <Periodic-TAU-ext> present: <Periodic-TAU>
If <Periodic-TAU-ext> present: <Periodic-TAU-ext>
If <Periodic-TAU-ext> not present: <Periodic-TAU>
The timer value unit of <Periodic-TAU> in %XMONITOR depends on whether <Periodic-TAU-ext> is present or not.
This command subscribes to unsolicited result code notifications and the value you set determines how much information the notification contains, between level 1 and 3.
We are mainly interested in seeing the level 1 notifications, which has the following information
mode: indicates RRC Idle (0) or RRC Connected (1) mode
This command is useful to see if the modem is in RRC Connected or RRC Idle mode.
When using +CSCON and +CEREG, the notification status <n> is omitted in the unsolicited result notifications. However, you can read this value by using the read command, for instance AT+CSCON?.
%MDMEV – subscribes to modem domain event notifications.
This subscribes to events from the modem, like the modem overheating or low battery. Some examples include:
%MDMEV: ME OVERHEATED
%MDMEV: ME BATTERY LOW
%MDMEV: RESET LOOP
The nRF9160 modem core has a modem reset loop restriction, documented thoroughly in the white paper nRF9160 Modem Reset Loop Restriction, that prevents excessive signaling towards the network during continuous modem or application reset loops.
This command enables to notifications from the modem
+CGSN – requests product serial number identification
Depending on the set command parameters, +CGSN can return
1: <imei> – returns the 15-digit IMEI of the device
2: <imeisv> – returns the 16-digit IMEISV composed of TAC (8 digits), SNR (6 digits) and SVN (2 digits)
3: <svn> – returns the current SVN (also part of the IMEISV)
IMEISV: “IMEI, Software Version” composed of the TAC, SNR (Serial Number) and the SVN (Software Version Number).
%REL14FEAT – enables the 3GPP Release 14 (LTE CAT-NB2) features that are supported on the modem
Recall from LTE-M and NB-IoT in lesson 1 that NB-IoT is specified in two releases (3GPP Rel.13 and Rel.14). Although the nRF9160 modem firmware does not support all Release 14 features, the features that are supported are disabled by default but can be enabled using this AT command.