SARA-R42 - Application note
UBX-20050829 - R02
Network registration
Page 24 of 58
C1-Public
7.4
Registration monitoring
Use the
+CEREG
AT command to confirm the module is registered on the LTE network for LTE Cat M1
or NB1. Use
+CREG
and
+CGREG
AT commands for CS and GPRS network registration status.
When registering on an LTE Cat M1 or NB1 network the PDN context will be automatically created
and activated; for 2G networks the host needs to manually activate the PDN context using the
+CGACT
AT command.
☞
Independently of the selected RAT, always issue the
AT+CGACT=1,<cid>
command on used
context <cid> even if the
+CGDCONT
AT command returns that the context is still active with a valid
IP address. This is highly recommended to activate the PS data connection avoiding possible
conflicts between applications.
☞
If the uFOTA is enabled and needs to contact the uFOTA server when running on 2G RAT, the
LwM2M will automatically activate the default context.
7.4.1
Detecting the access technology
SARA-R4 series modules can connect to different types of access technologies, i.e. LTE Cat M1,
NB-IoT and GPRS. Because the modules can be configured to automatically connect to any of these
access technologies, there are AT commands the host application can use to detect what technology
is being used.
The best AT command to use is the
+COPS
AT command. The
+COPS
AT command has a <AcT>
parameter which describes the access technology the module is registered to. However, this
command does not provide a URC when the module is registered.
There are other AT commands that do have a URC when the registration is made. These also describe
the access technology, i.e.
+CEREG
for LTE (Cat M1 or NB-IoT) and
+CGREG
(GPRS).
Host applications should always enable the URC for
+CEREG
and
+CGREG
. When the module registers
on the network the application can read the access technology type from these URCs.
Basic operation would be:
Command
Response
Description
AT+CEREG=1
OK
Set URC for LTE
AT+CGREG=1
OK
Set URC for GPRS
<Wait for URC>
AT+COPS?
+COPS: 0,0,"
Cat-M1 Network",7
OK
Read +COPS and check <AcT> parameter for RAT
☞
+CREG
is used to describe if the module has been registered in the Circuit Switched Domain too for
Combined Attach modes, accordingly it is advisable to enable the
AT+CREG=1
URC too.
7.4.2
PS connections at RAT change
When the module changes the RAT any PDP contexts and socket connections will be deactivated and
disconnected. The host will need to re-create and re-activate socket connections. If the module had
open sockets, the
+UUSOCL
URC will be issued when they are closed at RAT change.
LTE Cat M1 and NB1 networks, implementing the LTE standard, will automatically activate the
default bearer PDP context, <cid>=1. Any other PDP context the host has configured and manually
activated will have to be re-created and re-activated.
The 2G network may require the host to manual activate a PDP context as this is generally a manual
procedure.