u-blox SARA-R5 Series Application Development User Guide
- June 14, 2024
- u-blox
Table of Contents
- u-blox SARA-R5 Series Application Development
- Product Information
- Product Usage Instructions
- Getting Started
- Application design and development
- AT commands response parser
- Local connectivity
- MNO profiles
- Network registration
- PSM, eDRX and deep-sleep mode
- Monitoring module status
- Restore factory configuration
- SW migration guide from SARA-R4 series
- Appendix
- Related documentation
- References
- Read User Manual Online (PDF format)
- Download This Manual (PDF format)
u-blox SARA-R5 Series Application Development
Product Information
Product Name | SARA-R5 series |
---|---|
Document Number | UBX-20009652 – R03 C1-Public |
Revision and Date | R03 C1-Public, 25-Aug-2023 |
Product Usage Instructions
-
Initial Design Decisions and Recommendations
Refer to section 2.1 of the user manual for initial design decisions and recommendations. -
Application Stages
Refer to section 2.2 of the user manual for information on application stages. -
System Time
Refer to section 2.2.5.1 of the user manual for details on system time. -
Power-off
Refer to section 2.2.6 of the user manual for instructions on power-off. -
Application Modes
Refer to section 2.3 of the user manual for information on application modes. -
AT Commands Response Parser
Refer to section 3 of the user manual for details on the AT commands response parser. -
Operational Modes of the AT Interface
Refer to section 3.1 of the user manual for operational modes of the AT interface. -
Unsolicited Result Code
Refer to section 3.2 of the user manual for information on unsolicited result codes. -
Local Connectivity
Refer to section 4 of the user manual for details on local connectivity. -
Serial Interface Configuration
Refer to section 4.1 of the user manual for instructions on serial interface configuration. -
AT Interface
Refer to section 4.2 of the user manual for information on the AT interface. -
MNO Profiles
Refer to section 5 of the user manual for details on MNO profiles. -
Network Registration
Refer to section 6 of the user manual for information on network registration. -
RAT Selection
Refer to section 6.1 of the user manual for instructions on RAT selection. -
Band Configuration
Refer to section 6.2 of the user manual for details on band configuration. -
Scan Time
Refer to section 6.2.1 of the user manual for information on scan time.
Abstract
This document provides detailed technology architecture and examples of how to
use AT commands with u-blox SARA-R5 series modules.
Document information
Title| SARA-R5 series|
---|---|---
Subtitle| Application development guide|
Document type| Application note|
Document number| UBX-20009652|
Revision and date| R03| 25-Aug-2023
Disclosure restriction| C1-Public|
This document applies to the following products:
Product name
SARA-R5 series
u-blox or third parties may hold intellectual property rights in the products, names, logos and designs included in this document. Copying, reproduction, modification or disclosure to third parties of this document or any part thereof is only permitted with the express written permission of u-blox. The information contained herein is provided “as is” and u-blox assumes no liability for its use. No warranty, either express or implied, is given, including but not limited to, with respect to the accuracy, correctness, reliability and fitness for a particular purpose of the information. This document may be revised by u-blox at any time without notice. For the most recent documents, visit www.u-blox.com.
Copyright © u-blox AG.
Getting Started
This document provides guidance for developing applications that interface with the u-blox SARA-R5 series module, including examples of AT command sequences for specific use cases.
Table 1 shows a summary of the documentation available for SARA-R5 series modules.
Document name | Notes | |
---|---|---|
Application integration | Application development guide app note | This |
document. Start here!
| FW update app note [4]| FW update procedures (uFOTA, FOAT, FOTA,
+UFWINSTALL, EasyFlash).
| Internet applications development guide app note [5]| Any applications
relying on the IP stack (sockets, MQTT, MQTT-SN, HTTP, FTP, CoAP, SSL/TLS).
| Production and prototype validation guidelines app note [6]| Guidelines of
OEM production test and validation test. Contact tech support for this
document.
| GNSS implementation app note [7]| GNSS interface and aiding clients.
Techniques for hybrid positioning and timing indication.
| Mux implementation app note [8]| Usage of multiplexer with cellular
modules.
| LwM2M objects and commands[9]| LwM2M objects and relevant AT commands
| EVK-R5 user guide [10]| Starting guide for the SARA-R5 evaluation kit.
Reference documentation| Data sheet [1]| Use these documents as hardware
integration and AT commands API reference.
| System integration manual [3]
| AT commands manual [2]|
Product release documents| Sample Delivery Note / Information Note|
Delivered with every FW release.
Tools| m-center AT scripts collection|
https://github.com/u-blox/m-center
Table 1: SARA-R5 documentation overview
See the SARA-R5 series AT commands manual [2] for detailed AT command
descriptions. The following symbols are used to highlight important
information within this document:
- An index finger points out key information pertaining to module integration and performance.
- A warning symbol indicates actions that could negatively impact or damage the module.
Application design and development
When designing a host application interfacing with a u-blox cellular module, consider the following points, as depicted in Figure 1:
- Choose the module’s features that the application needs and the ones that can be disabled.
- Split the application workflow into stages.
- Design the application to work in several modes, reflecting the lifecycle steps of the product.
Initial design decisions and recommendations
If some features will never be used during the application lifetime, they should be disabled or properly configured in order minimize their impact on the overall performance. These decisions should be carefully taken at design stage because any late change could cause much effort to adapt and validate the application.
These decisions concern:
- Use of an LwM2M client
- Use of security suite features
- Use of power saving
- SIM card/MNO selection
- SW/HW monitor and debug solutions
- SW/HW recovery modes
An LwM2M client is necessary to allow MNOs to contact the device and retrieve diagnostic information; it enables also automatic periodic check of availability of FOTA updates, on both MNO and u-blox servers. Based on the target power consumption profile, the customer application can periodically enable the client in order to control features, such as the periodic LwM2M registrations
with the server or can implement alternative or additional methods to implement FW updates when triggers by e.g., prolonged out of service conditions or by specific events. Similar considerations hold for the security client. To disable the security features, issue AT+USECMODE=0. Power saving features (+UPSV, PSM, eDRX) shall be configured based on the target power consumption profile, based on the suggestions in section 7. The MNO profile to be used depends on the type of application and SIM card (regional or global roaming). If the SIM card belongs to an MNO for which the module has gained the type approval, the MNO profile is available in the FW and shall be used. For more details of MNO profiles, see section 5.
Debug-ability can be provided via test endpoints, access to the USB interface, and in general a prolific application log containing all AT commands strings exchanged with the module and diagnostic information sent by the module with timing information. Monitoring the module status is a requirement to implement, via HW or SW, recovery procedures as described in section 7.7. u-blox recommend to properly design and test a module’s firmware update mechanism that allows deployment of the latest cellular module FW in the field after the device production.
Application stages
Persistent configurations
Some module settings are persistent, that is, they are stored in the module
non-volatile memory (NVM). Among them, MNO profile (see section 5), APN for
Internet connectivity, active LTE bands. In addition to NVM, some settings
(e.g., +IPR and +UPSV) are saved to the module profiles by means of AT&W
command.
The host application shall implement a persistent configuration setting phase, performed once and then at an as-needed basis , where all AT commands related to the required settings are issued.
- See the SARA-R5 FW update application note [4] for persistence of settings after a FW update. If settings are not retained, they shall be reapplied, see section 2.2.2.
Power on/boot/PSM exit
In general, at each boot the application shall read configurations and make
sure they are correct. If verification failed, persistent configuration can be
reapplied.
Not all the module configurations are persistent. Therefore, the application, after each module boot, shall set again these volatile configurations, e.g., AT+CMEE=2, URC enabling. It is important that the application has a robust mechanism to detect when the module is ready to communicate via AT commands at the power-on. One solution is to enable the greeting message by the +CSGT AT command; alternatively, the host application can wait for response to “AT” command.
- When using PSM, at exit from low power mode, the volatile settings and the current communication port mode (MUX, dialup) shall be restored too.
Network registration
For details about the network registration stage, see section 6.
IP acquisition
For details and guidelines, see the Internet applications development guide
application note [5].
Core application
For details and guidelines, see the Internet applications development guide
application note [5] and SARA-R5 series AT command manual [2]. The application
shall handle AT commands, responses and unsolicited indications as suggested
in section 3. For diagnostic purposes, the application shall rely on status AT
commands, see section 8.1. For robustness purposes, the application shall
implement embedded watchdog procedures, see section 8.2.
System Time
The application shall configure module’s time to keep this information
updated, because of its importance and its consequences on the overall system
behavior.
There are several ways to set the current date and time on cellular module:
- if an updated time is available at host side, the application might set the module time through the + CCLK AT command at boot time.
- To use the automatic update of local time through the Network Identity and Time Zone (NITZ) feature. The Time Zone information is provided after network registration (in the attach procedures), if supported by the selected MNO. The module time is automatically updated and its value can be checked through the +CCLK AT command; be aware that NITZ information are sent only at first registration, so it is recommended to perform a detach/attach cycle after enabling the automatic time zone update via NITZ.
- If a GNSS receiver is available and accessible in the system architecture, the application can retrieve the UTC time from GNSS through the +UGTMR AT command, the +CCLK value is then automatically updated; be aware that the time zone must be manually set.
- The application might implement a specific functionality (e.g., based on sockets) to retrieve time information from suitable time servers and then properly set the module time by using the +CCLK AT command.
On SARA-R5 the +CTZU factory-programmed value is 1, that is the automatic time zone via NITZ is enabled.
Power-off
The application might need to switch off the module. Both normal and emergency
shutdown are described in the SARA-R5 series system integration manual [3].
Application modes
An application is usually designed based on the main use scenarios. This way of operation is called “normal mode”. In addition, the designer shall provide a way to configure the application for more specific contexts, which can have different requirements with respect to normal mode and can help performing other important steps in the product lifecycle.
Debug / test mode
- In general, an application shall always output a significant log, including the AT commands it issued and their responses, and implement monitoring strategies as described in section 7.7.
- If a problem occurs related to the cellular module and more information is needed, it may be necessary to configure different verbosity levels for the host application and modules log. This can be done with configuration files, that can be side loaded to the file system. In extreme cases, it may be needed to provide an AT interface passthrough to allow access to diagnostic AT commands.
- If the cellular communication is tested against a network simulator, use a suitable test SIM card (usually provided by the network simulator manufacturer). If a test SIM card is not available, make sure to disable authentication and integrity checks on the tester side (by proper setting) and on the module (by using the +UDCONF=81,0 AT command, see SARA-R5 series AT commands manual [2]).
Production testing
This mode is to be used during the production tests of the end device. In this
scenario usually the main application is inactive, and AT commands can be used
to properly configure the module and use its end user testing features as
described in the Production and validation test app note [6].
Certification mode
Depending on the type of certification, such as regulatory, conformance or for
MNO type approval, the application might be disabled, and the module
externally controlled, e.g., for throughput testing. Specific MNO tests might
require the application to be running in normal mode, e.g., remote SIM
provisioning, FOTA.
Firmware update mode
A module’s firmware update shall be implemented either over the air or
tethered. Each update strategy has its requirements and correct
implementation, which must be followed to guarantee the success of the
operation. See the SARA-R5 FW update application note [4] for more details.
AT commands response parser
It is important that the user implements a dedicated AT parser component in the host application. Basic guidelines:
- When entering AT commands, spaces are ignored.
- Always wait for at least 20 ms from a final result code or a URC reception before issuing a new AT command.
- When the module has finished processing an AT command, it will output a final result code (either OK or ERROR) indicating whether it is ready to accept a new AT command. The information text responses are issued before the final result code. Change +CMEE setting to numeric or verbose value (e.g., AT+CMEE=1 or AT+CMEE=2).
- Asynchronous commands, e.g., +UMQTTC, return an immediate final result code and final result via URC.
- Some AT commands return Intermediate Result Code (IRC) during command execution.
Operational modes of the AT interface
When implementing the AT parser, note that the communication port, being it
e.g., the main UART or a MUX virtual port, enters different operational modes
while processing AT commands.
In command mode, the data communication equipment (DCE), i.e., the module, can receive AT commands. Once an AT command is detected on the AT interface, the DCE processes it and might return to command mode by issuing a successful or error response. Special AT commands lead the AT interface into intermediate states where, for example, SMS payload is expected, or raw/binary data is being exchanged (e.g., during file transfer), or PPP packets are exchanged. In the latter case, the PPP data mode can be temporarily exited by a special +++ packet or DTR line ON-to-OFF transition and the online command mode (OLCM) state is entered: from this state, which is similar to the command mode, the DCE can be moved back to PPP data mode via ATO command or can disconnect PPP via ATH command.
Figure 2 depicts the various modes in which the module can operate and shows the actions that cause transitions between the different modes. The transitions triggered by DTR line changes are configurable with AT&D command, see SARA-R5 series AT commands manual [2].
For more details about the AT command interface settings, see the AT command settings section on SARA-R5 series AT commands manual [2].
Unsolicited result code
An unsolicited result code (URC) is a string message (provided by the DCE) that asynchronously indicate the occurrence of an event, which might be related to a previous AT command or to the feature the user is currently using, or to the module’s autonomous activity (e.g., due to mobility).
When enabled on a given AT port, the URC can be output at any time to report specific event or status change on the same AT port. If the AT port is busy, the application can decide to discard +CIND, +CGEV and SMS related URC by properly configuring the related AT commands; all other URCs will be deferred and printed when the AT port returns into command mode.
- Due to race conditions in mode transitions, URC can be received after an AT command has been transmitted by the host application.
Examples of some URCs are shown in Table 2.
URC | Description |
---|---|
+CEREG: |
Network registration status or location has |
been updated
+CGEV: ME PDN ACT
+ULWM2MSTAT:
+UUSOCL:
Table 2: URCs examples
Local connectivity
Serial interface configuration
Use AT+USIO command to switch between 5 serial interface configuration
variants, see Table 3.
Command | Response | Description |
---|---|---|
AT+USIO=0 | OK | (Default configuration) |
AT on UART (7-wire: RXD, TXD, CTS, RTS, DTR, RI, GND), TRACE on USB and SPI.
AT+USIO=1| OK| AT on UART (9-wire: RXD, TXD, CTS, RTS, DTR, RI, DSR, DCD,
GND), TRACE on USB and SPI.
AT+USIO=2| OK| AT on UART and AUX UART (5-wire: RX/TX, HW flow ctrl, GND),
TRACE on USB and SPI.
AT+USIO=3| OK| AT on UART (5-wire: RX/TX, HW flow ctrl, GND), TRACE on AUX
UART (5-wire: RX/TX, HW flow ctrl, GND) and USB and SPI.
AT+USIO=4| OK| AT on UART (5-wire: RX/TX, HW flow ctrl, GND), GNSS tunneling
on AUX UART (5 wire: RX/TX, HW flow ctrl, GND), TRACE on USB and SPI.
Table 3: USIO variants description
- Reboot is necessary to apply USIO configuration. For more details on +USIO AT command, see the SARA-R5 series AT commands manual [2].
AT interface
AT communication with SARA-R5 is possible via UART interface only.
By default, UART rate is set to “autobauding” (+IPR: 0). With “autobauding”, the module shall wait for the first input from the DTE to detect the UART speed used by the host and apply it.
Set a fixed baud rate
Table 4 shows how to use the +IPR AT command to set a different rate for UART.
Command | Response | Description |
---|---|---|
AT+IPR=115200 | OK | Set UART speed to fixed value 115200. |
Cellular module response is sent at 115200 bit/s.
After the “OK” final result code, wait for at least 100 ms before issuing a
new AT command, to guarantee baud rate reconfiguration. Send commands at the
speed previously set, 115200 bit/s in the example.
AT&W| OK| Store the configuration in the default profile in module’s
memory, to keep this setting at next module boots.
If this step is skipped, the new UART speed will be kept only until next reboot.
Table 4: setting a fixed baud rate example
- ☞ To show a greeting text at module boot (+CSGT AT command), set a fixed baud rate before by the + IPR AT command.
- ☞ If power saving is enabled by AT+UPSV=1 or AT+UPSV=3, the usage of a fixed baud rate is suggested. If “autobauding” (+IPR: 0) and hardware flow control are used, the host application shall disable the hardware flow control before any reset/power-off and re-enable it at subsequent boot only after having first received a response from any AT command.
Multiplexer
SARA-R5 series modules support the multiplexer function on the UART physical
link as defined in the 3GPP TS 27.010 [12]. This allows multiple simultaneous
sessions (virtual channels) over the single UART interface.
The following virtual channels are defined:
- Channel 0: multiplexer control.
- Channels 1 to 3: AT commands / data connection.
- Channel 4: GNSS data tunneling (NMEA).
For further details about the use of multiplexer with SARA-R5 modules, see the Mux implementation in cellular modules application note [8].
Point-to-point protocol (PPP)
Data (PSD) calls are possible over both primary UART and auxiliary UART.
If the double UART configuration is used, the full V24 modem lines are not supported. In this configuration, entering in OnLine Command Mode (OLCM) or disconnecting the PPP connection via DTR line de-assertion is not possible.
For more information about PPP dial-up establishment, see the Internet applications development guide application note [5].
Generic guidelines
To properly configure local connectivity, take the following steps:
- Set the required connectivity variant at first usage, via the +USIO AT command.
- Configure the GPIOs based on the set variant (especially in reference to the RI line), via the + UGPIOC AT command.
- Configure the power saving control mode based on the set variant, via the +UPSV AT command.
MNO profiles
- MNO profiles provide a powerful and flexible method to configure the SARA-R5 module to seamlessly work with the SIM of the selected network operator.
- Using the MNO profiles the SARA-R5 module is dynamically configured to use the proper bands, RATs, and the operator-dependent protocol stack settings needed to operate on the home network in full compliance with the mobile operator requirements.
- With the MNO profiles, customer applications are not required to configure the module using complex and/or network-dependent parameters but benefit from an “out of the box” solution that provides seamless connectivity while abstracting complexities of managing individual network configurations.
- Use the +UMNOPROF AT command to select a profile for the network operator. See the SARA-R5 series AT commands manual [2] for details about the command.
Using MNO profiles
To configure the module to use an MNO profile, first make sure the module is
de-registered from the network, then select the profile using the desired
- ☞ The host application should specify an MNO profile. The default and factory-programmed MNO profile on SARA-R5 modules is 90 (global profile).
- ☞ Reboot the module with AT+CFUN=16 command to make the MNO profile active.
- ☞ For SARA-R5 “x1B” product versions, the MNO profile configuration shall be applied for each RAT. For instance, to select the standard Europe MNO profile (100) for +URAT: 8, while assuming the RAT selected is 7, the correct procedure is the following one:
Command | Response | Description |
---|---|---|
AT+UMNOPROF=100 | OK | Select the MNO profile 100 for LTE Cat M1 (RAT 7). |
AT+CFUN=16 | OK | Reboot the module to make the MNO profile active. |
AT+URAT=8 | OK | Change the RAT to LTE NB-IoT. |
AT+CFUN=16 | OK | Reboot the module to change the RAT. |
AT+UMNOPROF=100 | OK | Select the MNO profile 100 for LTE NB-IoT. |
AT+CFUN=16 | OK | Reboot the module to make the MNO profile active. |
Modifiable parameters
The MNO profiles configure the module with a set of parameters. Some of these
parameters can be overridden by using AT commands:
- +UBANDMASK Band mask
- +CGDCONT APN and PDP type
If the host changes any of these parameters, they will be retained after a module reset; if the MNO profile is re-applied, after reboot the MNO profile specific settings will be restored to the factory-programmed value.
- Usually, the APN will be accepted also when in roaming, but bands might need to be enabled to search for alternative PLMNs.
For details about the settings applied by different MNO profiles, see appendix B.6 on the SARA-R5 series AT commands manual [2].
MNO profile setting examples
Do not: set the MNO profile while the module is registered (Table 5)
Command | Response | Description |
---|---|---|
AT+CMEE=2 | OK | Enable verbose error result code. |
AT+COPS? | +COPS: 0,0,”00101″,7 OK | Module is currently registered. |
AT+UMNOPROF=100 | +CME ERROR: operation not allowed | Cannot set MNO profile |
while module is registered.
Table 5: wrong way of setting the MNO profile
Do: de-register the module before setting MNO profile, then reboot it to apply the setting (Table 6)
Command | Response | Description |
---|---|---|
AT+CFUN=0 | OK | Set the module to minimum functionality: , the module will de- |
register.
AT+UMNOPROF=100| OK| Set MNO profile for Standard Europe.
AT+CFUN=16| OK| Perform a module reset. After reboot, the MNO profile 100
settings are applied.
Table 6: correct way of setting the MNO profile
In the first module boot, immediately after the MNO profile change (with +UMNOPROF AT command), the update of the +CGDCONT fields may be delayed up to 20 seconds due to the first initialization of the LwM2M database after the MNO profile switch.
AT &T profile (+UMNOPROF: 2)
SARA-R5 in AT&T configuration (+UMNOPROF: 2) is factory-programmed with a
blank string for the
Per AT&T requirement, LwM2M will predefine two +CGDCONT contexts with the following factory-programmed values:
-
=0: IPV4V6,”m2m.com.attz” * This is a placeholder APN and shall not be used. -
=2: IPv4V6,”attm2mglobal” * This is used for LwM2M data connection to the AT&T server for device management purposes. This APN entry shall not be deleted.
Verizon profile (+UMNOPROF: 3)
Per Verizon requirement, the initial EPS bearer and the EPS bearers used by
BIP and LWM2M are defined by default and are aligned to the entries of the VZW
APN table (see +VZWAPNE AT command description in SARA-R5 series AT commands
manual [2]).
SARA-R5 in Verizon configuration (+UMNOPROF: 3) is factory-programmed with a
blank string for the
< cid> (context id) | Description |
---|---|
1 | Initial EPS bearer, it corresponds to the first record of VZWAPNE. |
2 | Corresponds to the Class 2 record of the VZWAPNE and it is used by BIP. |
3 | Corresponds to the Class 3 record of the VZWAPNE. |
4 | Corresponds to the Class 4 record of the VZWAPNE and it is used for the VZW |
Application PDN.
5, 6, 7| Correspond, respectively, to the Class 5, Class 6, and Class 7
records of the VZWAPNE.
Table 7:
The +CGDCONT read command shows the EPS bearers with
Regulatory / Conformance profiles (+UMNOPROF: 0 / 201)
These MNO profiles shall be used during production or lab tests. When using
these profiles, LwM2M is disabled. It is also suggested to disable the
security features with AT+USECMODE=0. From a regulatory perspective, MNO
profiles do not affect the low-level RF performance of the module, which are
the same regardless of the profile of choice. Some profiles, however, may
enable features not available on a simulated network which are known to
interfere with laboratory measurements. By setting AT+UMNOPROF=0 or
AT+UMNOPROF=201 unexpected behavior during testing is reduced.
SIM ICCID select profile (+UMNOPROF: 1)
It can be used by applications that will use different SIM cards. In this
setting the Mobile Network Operator profile is selected according to the SIM
Issuer Identifier Number (IIN) or IMSI, whose ranges can be configured by the
application and stored to the file system. By default, AT&T or Verizon
profiles are detected based on IMSI, and global profile (+UMNOPROF: 90) is the
fallback one. A reboot, triggered by the application or autonomously by the
module, is necessary to have the detected MNO configuration applied. See the
SARA-R5 series AT commands manual [2] for details on the AT command and URC
syntax and reboot configurability.
- When setting MNO profile 1 via +UMNOPROF AT command, the second and third parameters (automatic reset and URC enabling) are mandatory!
Table 8 and Table 9 show examples of automatic MNO profile detection setting usage.
Command | Response | Description |
---|---|---|
AT+UMNOPROF=1,1,1 | OK | Set the automatic MNO profile detection, the automatic |
reset and enable the related URC.
| +UMNOPROF: 1,2| URC reporting AT&T profile has been detected.
Table 8: setting automatic MNO profile detection with automatic reset example
Command | Response | Description |
---|---|---|
AT+UMNOPROF=1,0,1 | OK | Set the automatic MNO profile detection, the manual |
reset and enable the related URC.
| +UMNOPROF: 1,2| URC reporting AT&T profile has been detected.
AT+CFUN=16| OK| Host application triggers software module reset.
AT+UMNOPROF?| +UMNOPROF: 1,2,1,1 OK| Read the detected profile.
Table 9: setting automatic MNO profile detection without automatic reset example
Network registration
- At the power-on the module reads the information in the currently selected MNO profile. It will use this information to configure which bands to scan, the radio access technology to use if more than one is supported, and other attach parameters like APN.
- Once the module has found a suitable cell it can camp on, it will start the registration process. Depending on the current PLMN, during the registration the device can be provisioned with the APN or the APN must be provided by the host application as part of the persistent settings.
- A new SIM can be activated after its first registration on a real network: its “profile” (i.e. contents of the SIM files) can be remotely provisioned over the air and a registration cycle is triggered at the end of the SIM OTA procedure.
- PIN lock shall be disabled in case the device is expected to work with PSM enabled.
RAT selection
- This section applies to SARA-R5 “x1B” product versions only.
In order to select the RAT to be used by the module (LTE Cat M1 or NB-IoT), issue the +URAT AT command. Before changing the RAT selection, set the module to minimum functionality (via the AT+CFUN=0 command). To make the setting effective, reboot the module with the AT+CFUN=16 command. Table 10 shows an example of the procedure.
Command | Response | Description |
---|---|---|
AT+URAT? | +URAT: 7 OK | Query the currently set RAT. Currently selected RAT is |
LTE Cat M1.
AT+CFUN=0| OK| Set the modem to minimum functionality.
AT+URAT=8| OK| Change RAT selection to NB-IoT.
AT+CFUN=16| OK| Reboot the module to make the change of RAT selection
effective.
| | Wait for module to reboot.
AT+URAT?| +URAT: 8 OK| Query the currently set RAT. Currently selected RAT is
NB-IoT.
Table 10: example changing RAT selection from LTE Cat M1 to NB-IoT
- ☞ The following AT commands will change settings only for the active RAT (LTE Cat M1 or NB-IoT): + UCFGCIOT, +CCIOTOPT, +CEDRXS, +UMNOPROF.
Band configuration
- SARA-R5 series modules can scan over several bands to find a network to attach to. The host application can limit the scanning to specific bands to shorten the time to find a network.
- Use the +UBANDMASK AT command to specify these bands as an 8-byte bitmask. In the bitmask, the bit at (band-1) position enables (if 1) or disables (if 0) the scan of the band. Some examples are depicted in Figure 3.
Figure 3: +UBANDMASK bitmask creation examples
- Each MNO profile will define a set of bands to scan on.
Scan time
The scan time varies with the number of active bands. As a reference, Table 11
shows the scan time trend as the number of active bands increases, where
SARA-R5 is registering to a live network sequentially with 2, 6, 10, and 14
bands enabled (+UBANDMASK AT command is used to select the number of bands to
use for scan).
Number of bands scanned| PLMN scan + registration time on live network
[s]
---|---
2| 7.67
6| 21.00
10| 31.33
14| 46.67
Table 11: Scan + registration time as the number of bands scanned increases
- Values shown in Table 11 are indicative only and may vary depending on the network conditions. The purpose of the example is to show the linear trend between number of active bands and the PLMN scan and registration time.
If a global roaming profile is used, the application can rely on the automatic band scan and PLMN search done by the device at national borders crossings. Alternatively, to optimize power consumption and reduce the impact of band scan and PLMN searches in out of coverage situations, the application shall reduce the supported bands based on regional information provided by the module via AT command interface, and change bands with some hysteresis.
First time registration setup
It is important to set the operator profile first because this operation will
configure the default RAT and band mask for that corresponding profile. The
module is programmed with auto-cops, so no AT command is required to trigger
the network registration. The AT+COPS=0 command is strictly necessary only if
the module starts up with auto-cops disabled, that is, +COPS: 2 setting stored
in the profiles per design (AT&V).
- ☞ Remember that the AT+COPS=0 command always triggers a high priority PLMN search and performs a full PLMN scan.
- ☞ In +COPS: 2 mode the module radio/ cell state is retained. This means that power consumption will be higher than in +CFUN: 0 as the modem will keep on searching for the most suitable cell.
- ☞ AT+COPS=2/0 cycle is to be used when High Priority PLMN search has to be triggered (for example, in roaming conditions), while AT+CFUN=0/1 cycle shall be used to trigger a registration cycle.
PAP/CHAP
- For PAP of CHAP authentication configuration, use the +UAUTHREQ AT command.
- The command is not persistent, so in case the authentication is required on the initial default bearer, the setting shall be entered in de-registered state.
Change of PDN settings (APN name and PDP type)
To change the PDN settings for the initial default EPS bearer established
during LTE attach, edit the
Command | Response | Description |
---|---|---|
AT+CFUN=0 | OK | Turn off the modem radio so to de-register the module. |
AT+CEREG=2;+CGEREP=1,1 | OK | Enable a set of registration URCs. |
AT+CGDCONT? | +CGDCONT: 1,”IPV4V6″,””,”0.0.0.0 |
0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0″,
0,0,0,2,0,0,0,0,0,0
OK
| Read IP type and APN for EPS attach bearer.
AT+CGDCONT=1,”IPV4V6″,”broadband”| OK| Set APN name (“broadband” for example)
and the PDP type (“IPV4V6” for example) for EPS attach bearer.
AT+CFUN=1| OK
+CEREG: 1,”0001″,”01a2d001″,7
+CGEV: ME PDN ACT 1
| Turn on the modem radio.
URCs indicate the registration status change.
Table 12: change of PDN settings example
Attach types
- All profiles use Combined Attach (CS & PS); if successful, both data and SMS services are allowed.
- The +CEMODE AT command can be used to change how the SARA-R5 series modules attach to the network if the default attach type is not accepted by the network.
NB-IoT networks: ePCO handling
In NB-IoT, where CP CIoT EPS optimizations are mandatorily active, the 3GPP
standard prescribes that the extended Protocol Configuration Options (ePCO)
container is used in Network Access Stratum (NAS) messaging when attaching to
a LTE network. Some NB-IoT mobile operators do not support the ePCO container,
therefore, if ePCO is used to attach to such networks, this will result in
lack of DNS capabilities. For NB-IoT networks that are known to not support
ePCO or when + CGCONTRDP AT command does not return any DNS in NB-IoT, it is
recommended to use the + UCFGCIOT AT command in order to disable the ePCO
feature and fallback to PCO negotiation, as shown in Table 13.
Command | Response | Description |
---|---|---|
AT+COPS? | +COPS: 0,0,”NB-IoT Network”,8 OK | Module registered on NB-IoT |
network.
AT+CGDCONT?| +CGDCONT: 1,”IP”,”default”,”192.1 68.20.2″,0,0,0
OK
| Module activated the EPS bearer with a valid IP address.
AT+CGCONTRDP| +CGCONTRDP: 1,5,”default”,”192.16 8.20.2″,”192.168.20.1″,””
OK
| DNS references not available in the
+CGCONTRDP AT command.
AT+UCFGCIOT=3,0| OK| Disable the ePCO feature through the
+UCFGCIOT AT command.
AT+CFUN=15 | OK | Reboot the module to apply the configuration. |
---|---|---|
AT+COPS? | +COPS: 0,0,”NB-IoT Network”,8 OK | Module registered on NB-IoT |
network.
AT+CGDCONT?| +CGDCONT: 1,”IP”,”default”,”192.1 68.20.2″,0,0,0
OK
| Module activated the EPS bearer with a valid IP address.
AT+CGCONTRDP| +CGCONTRDP: 1,5,”default”,”192.16
8.20.2″,”192.168.20.1″,”185.215.1
95.114″
OK
| DNS references now available in the
+CGCONTRDP AT command.
Table 13: Disabling the ePCO feature
Mobility scenarios
- Devices used in non-static installations can move out of range of the currently serving cell. This means entering another cell, of the RPLMN (registered PLMN) or of a different PLMN or moving into an area where there is no cellular coverage or no roaming agreement for the device.
- If the module loses the synchronization with the serving cell but finds another cell to camp on, any PDP context and open sockets will be kept. This holds in particular for seamless change of serving cell with cell reselection or handover procedures.
- If mobility implies trespassing national borders or simply changing PLMN, it is likely that the new visitor PLMN will force the module to reattach. This can occur also on the RPLMN in case the network needs to e.g., refresh IP addresses.
Mobility related RRC procedures
Continuity of service in mobility exploits different procedures depending on
the state of the radio connection:
- Connected Mode Mobility (CMM) is handled by the eNodeB. The UE is instructed by the eNodeB to provide measurement reports on neighbor cells so that the network can decide if and when the radio resource control (RRC) connection has to be handed over to another cell.
- The network itself will allocate gaps in the downlink transmission to allow the device to perform the intra-band or inter-band measurements: this will impact the downlink throughput.
- In case the eNodeB does not support CMM, the RRC connection will be released at cell change due to radio link failure and it will be re-established by the device on the new selected cell. Radio link failures usually implies loss of uplink or downlink packets.
- To disable CMM for static applications with concern for downlink throughput, FGI 13,14,16 and 25 in UE Radio Access capabilities shall be disabled.
- Idle Mode Mobility is handled by the UE using information transmitted in the System Information Blocks (SIB) broadcast by the cellular network within the cell. While in idle mode the UE will make measurements of neighboring cells and based on the cell reselection criteria read in the SIBs it may choose another serving cell to synchronize with.
Roaming, HPLMN, EHPLMN, PPLMN list
- MNOs have roaming agreements, meaning that a mobile subscriber can register on different PLMN “mcc.mnc” in different countries (+CREG: 5 and +CEREG: 5 report the roaming condition).
- Roaming means availability of cellular services on a VPLMN (a visitor PLMN is a PLMN not included in the Home PLMN and Equivalent HPLMNs list stored on the SIM card or assigned by the NW during registration).
VPLMNs are selected based on the settings in User Preferred PLMN list file and Operator Preferred PLMN list file the SIM. Periodically (2 to 8 minutes after the first registration and at every expiration of HPPLMN – Higher Priority PLMN timer read from SIM) the UE in automatic PLMN selection mode (+COPS: 0) searches for Higher Priority VPLMN with the same “mcc” (Mobile Country Code), i.e., of the same country. HPLMN, if found, is always reselected being highest priority.
The Preferred PLMN lists can be read and edited by +CPOL AT command. By default, the user PPLMN list is handled, and the +CPLS AT command allows to select the Operator Preferred PLMN list (which is a read-only file). Despite the preferences configured in the SIM card, the UE in automatic PLMN selection mode (+COPS: 0) will usually select the previous registered PLMN (RPLMN) after a registration cycle triggered by AT+CFUN=0/1 cycle or via a SW reset. The host application can force high priority PLMN search with AT+COPS=0 command entered in +COPS: 0 (so called “user PLMN reselection”). Alternatively, the RPLMN information can be cleaned by setting to “0xFF” the EPS LOCI files in the SIM (+CSIM/+CRSM) or by forcing registration to a PLMN that would reject the request.
SIM card and SIM profiles
The SIM card contains, besides the authentication information which is at the
basis of the security of the cellular communications, registration parameters
and MNO preferences that might affect the PLMN selection procedure. Overall,
the main files available in a SIM card are called a “SIM profile”. Most SIM
cards have single MNO profiles which are preinstalled and contain files like
IMSI, EHPLMN list, PPLMN lists. Some MNOs sell global SIM cards whose MCC is
901 and whose actual MNO is the first entry in the operator preferred PLMN
list.
Some SIM cards need to be activated at first usage, so they require an exchange of data with the MNO SIM OTA server. Other SIM card cards need to be provisioned and, again, a data session with the SIM OTA server is performed at first startup. Finally, some SIM cards might contain several profiles (so called multi-IMSI SIM) and swap between them based on the UE registration conditions, which are reported by the cellular module to the UICC applet mounted on the SIM card via SIM toolkit events and commands.
USAT (USIM Application Toolkit)
The SIM card is a chipset where MNOs applications are running, therefore it
can trigger some actions on the cellular module:
- set a timer and get its current value, send an SMS, open a data connection towards an admin server and send or receive data through a socket (see +UBIP URCs), reset the SIM cards causing a registration cycle (see +USIMSTAT URCs), etc.
It also retrieves information from the cellular module:
- current IMEI, Location Status and Info, availability of data from the sockets, class 2 SIM specific SMS.
The USIM Application Toolkit is the set of commands that the module offers to the SIM card applet. The USAT feature, together with the BIP protocol, allows the MNO to check or to change the contents of the SIM card anytime with the following procedures:
- At boot (e.g., at detection of IMEI change) or when the MNO sends a SIM specific SMS to the module, the SIM triggers a packet data session via BIP:
- The internal USIM application orders the module to establish a PDN connection to a specific APN or, through an already active one, a socket connection with a destination IP.
- If the socket connection has succeeded, the UICC can send data through the module, and it is notified of any data coming from the socket.
- At the end of the transaction the UICC orders the module to close the socket and the related EPS bearer can be deactivated if not in use.
- If file contents have changed (e.g., the IMSI), the SIM card triggers a SIM REFRESH i.e. it orders the module to read part or all the SIM files, or to reset the UICC card.
- Usually an SMS is sent back to the NW to acknowledge the procedure. This happens when a SIM is activated or when the IMSI is swapped.
eSIM/eUICC and remote SIM provisioning
- The SIM can be a chip soldered in the customer design: in this case the SIM cannot be removed or changed, hence it shall have a generic SIM profile to access the cellular network.
- Such eSIMs are called M2M SIM cards and can have IP connectivity throughout the world, on one or more PDP contexts, possibly with a static IP address assigned at LTE attach.
- The eUICC might have a default subscriber profile, that might be updated over the air by the MNO to a different profile (e.g., a different subscriber identity IMSI).
- Support of the SIM toolkit feature and the BIP protocol is required to comply to GSMA SGP.02 “Remote Provisioning Architecture for Embedded UICC” technical specification.
SIM subscription
There is no way to understand if a USIM is enabled to LTE: LTE subscription is
stored in the HLR (Home Location Register) of the home network. If LTE
registration succeeds, the SIM is LTE enabled. Subscription restriction might
apply in roaming or in specific geographic areas. Usually if the LTE
registration has failed with the reject cause #15, “No Suitable cells in
Tracking area”, it might mean that the SIM is not LTE enabled. The host
application can issue the +CEER and AT+CEREG=3 command to retrieve the reject
cause. The reject cause #19, “ESM failure”, might indicate a wrong APN on the
initial default bearer (cid=1). It is advisable to check the reject cause to
avoid triggering too many SW or HW resets of the module, which might cause
network unfriendly behaviors.
PSM, eDRX and deep-sleep mode
Power saving mode (PSM)
3GPP has standardized PSM as a way to minimize power consumptions for devices
that require a sporadic access to the cellular network: instead of switching
off the module at the end of the data transfer, the devices can negotiate long
lasting periods (up to 413 days) during which registration can be postponed
and mobile terminated traffic will not be forwarded to the UE, thus letting
the device skip paging reception and enter a minimum functionality mode (PSM
mode). Depending on the power saving settings (+UPSV), the SARA-R5 series
modules can enter PSM deep-sleep mode, where the module runs at negligeable
current (for definitions and power consumption characterization, see the
SARA-R5 series system integration manual [3]).
The host application can preconfigure PSM on the module before registration or activate it at runtime (see +CPSMS AT command); the former solution is preferred because the second one triggers a new registration to negotiate the PSM timers with the cellular network. Anyway, even if the PLMN does not allow PSM, the module will try to negotiate it at any registration procedure, periodic or due to mobility in other areas, as the PSM configuration is persistent in NVM. The +CEREG URC can report the assigned PSM timer values.
Three timers rule the entrance into PSM deep-sleep mode, namely:
- T3324 is the activity timer, which starts at the release of the RRC connection ordered by the network, typically due to user inactivity. At T3324 expiry, the module can enter the PSM deep-sleep mode. Paging will be sent by the eNodeB to the module only while T3324 has still to expire.
- T3412 is the periodic TAU timer; by default, the cellular network configures it in ca 1 hour, but when the PSM is supported, the timer value can be negotiated up to 413 days. During this period, the device is in deep-sleep mode and no paging message will be scheduled by the network to the device. For this reason, some applications, like LwM2M and security clients, that might be waiting for a response from the server temporarily postpone the entrance of the module in the PSM deep-sleep mode.
- +UPSV timeout: this guard timer is set at the last character received on the UART interface and only if it is elapsed can the module enter deep-sleep mode.
If the module enters PSM deep-sleep mode, it will locally deactivate MUX and PPP and will not be responsive to AT commands; it will either wake up autonomously at periodic TAU timer expiration, or through an early wake-up triggered by the host application via the PWR_ON pin. The exit from PSM deep- sleep mode is similar to a power-on, with the major difference that no LTE attach will be performed and the previously activated EPS bearers and IP addresses will be locally restored. The module will reselect a cell of the PLMN that was registered and will trigger data transmission or TAU procedures in case of early wake-up or wake-up at T3412 timeout respectively. Enabling of PIN check is deprecated when using PSM, because it will prevent the module from restoring the cellular connectivity until the PIN is re-entered by the host application. At PSM deep-sleep mode entrance, any timer used in the module other than T3412 will be discarded (e.g., application timers). As an exception to this, the following throttling timers are saved and restored at PSM exit: T3402, sever network failure (SNF, Verizon specific), T3346, T3396, and T3245 (if it is configured in USIM).
If the power saving mode is not active (i.e. if +UPSV: 0 and +CPSMS: 1) the module will enter PSM, but will not enter deep-sleep mode and will remain in active mode, whose power consumption is similar to +CFUN: 0 condition and the module is responsive on the AT interface. In this configuration the module will not be reachable by mobile-terminated data and it will not receive any SMS.
-
The module is not able to enter the PSM deep-sleep mode if UART(s) with hardware flow control is enabled, RTS is OFF and some data is ready to be sent (e.g. URCs). Same note also applicable to the eDRX deep-sleep mode, where supported.
This is also the case when the two AT UARTs configuration is set (AT+USIO=2 configuration), deep-sleep mode enabled (AT+UPSV=1), and one of the UARTs is not used (e.g., AT interface/COM port not “opened” at host application side, for one or both UARTs), and there is some pending data transmission (towards the host application direction), blocking the deep-sleep mode entering. One of the following configurations should be used, in this case:- Both terminal instances always opened at host application side, on the two COM ports (to guarantee RTS to ON).
- Only one open terminal instance for the UART in use, and +CSCON and +UUPSMR URCs are not enabled; this shall work since the device won’t produce pending data on the unused UART.
- Only one open terminal instance for the UART in use, and AT&K0 followed by AT&W and AT+CFUN=16 to disable the HW flow control on both the UARTs. Same shall be configured at host application side. Pay attention to revert this both on module and host side (module can be refreshed or AT&K3 followed by AT&W and AT+CFUN=16 can be used to restore flow control)
PSM indications and PSM toggling
The host application can monitor the entrance in PSM and PSM deep-sleep mode
in several ways:
- GPIO “module status indication” (see +UGPIOC AT command)
- V_INT monitoring
- RXD monitoring (if RXD is low for more than 1 character)
- +UUPSMR URC (it returns ‘1’ when the module is about to enter PSM).
As the device can enter PSM also during data sessions (e.g. UDP, TCP or secure sockets) if there is an idle period long enough for the RRC connection to be released and T3324 to expire, e.g. in case of temporarily server outage or packet loss e.g. in low coverage or mobility; the host application can prevent the module from entering PSM by issuing AT commands before the +UPSV timeout is elapsed. When possible, this solution must be preferred to the temporary disabling of PSM via +CPSMS AT command, as the latter will cause two registrations to negotiate the new timers with the network.
GSMA recommendations
- The selection of the T3324 timer value is a trade-off between power consumption and responsiveness. Low values save more battery life by allowing the UE to go into PSM state more quickly; high values allow a longer time for the application server (AS) to respond to UE/MO data (e.g. acknowledgements, network initiated data). Given that T3412 is recommended to be set to at least 4 hours, it is suggested to provide a push method to trigger mobile terminated data from the AS.
- As a rule of thumb, it is recommended to use a maximum ratio of 10% between T3324 and T3412.
- Typical minimum values for T3324 might consider the DRX cycle. For example: 2*DRX cycle (i.e., 2.56 s) + 10 s (buffer time at NW side) = 16 s. A 0 s timer duration is also allowed, provided that the RRC inactivity timer adopted by the network might cover the data reliability application needs.
- Customers are advised to test out both parameters to come to a value that best fits their use case and requirements in terms of power consumptions, delay, and reliability.
Timer values
Encoding of timer T3412
The extended TAU timer configured via +CPSMS AT command is encoded as GPRS
timer 3 IE (see TS 3GPP TS 24.008 [11]).
Bits 5 to 1 represent the binary coded timer value. Bits 6 to 8 define the timer value unit for the GPRS timer and are encoded as follows.
BIT 8 7 6
- 0 0 0 value is incremented in multiples of 10 minutes
- 0 0 1 value is incremented in multiples of 1 hour
- 0 1 0 value is incremented in multiples of 10 hours
- 0 1 1 value is incremented in multiples of 2 seconds
- 1 0 0 value is incremented in multiples of 30 seconds
- 1 0 1 value is incremented in multiples of 1 minute
- 1 1 0 value is incremented in multiples of 320 hours
- 1 1 1 value indicates that the timer is deactivated
Example: “01000111” = 7 x 10 hours = 70 hours
- ☞ If 110 timer unit is received and the timer is not received in an integrity protected message (this can happen for example on lab setup on network simulators), the value shall be interpreted as multiples of 1 hour.
- ☞ If 111 timer unit is received, the T3412 extended value shall be considered as not included in the message
The network might not grant an extended TAU timer and fallback to a standard encoding of T3412, which will be indicated by the
BIT 8 | 7 | 6 |
---|---|---|
0 | 0 | 0 value is incremented in multiples of 2 seconds |
0 | 0 | 1 value is incremented in multiples of 1 minute |
0 | 1 | 0 value is incremented in multiples of decihours |
1 | 1 | 1 value indicates that the timer is deactivated |
All other values are to be interpreted as multiples of 1 minute.
Encoding of timer T3324
Bits 5 to 1 represent the binary coded timer value. Bits 6 to 8 define the
timer value unit for the GPRS timer as follows:
BIT 8 | 7 | 6 |
---|---|---|
0 | 0 | 0 value is incremented in multiples of 2 seconds |
0 | 0 | 1 value is incremented in multiples of 1 minute |
0 | 1 | 0 value is incremented in multiples of decihours |
1 | 1 | 1 value indicates that the timer is deactivated |
- All other values are to be interpreted as multiples of 1 minute.
Example: “00000100” = 4 x 2 s = 8 s
Deep sleep state in out of service
The deep-sleep mode can be entered even in prolonged out-of-service
conditions, provided that the host application has selected this optimization
via the
Example of usage of PSM
Persistent settings
Command | Response | Description |
---|---|---|
AT+CFUN=0 | OK | De-register the module. |
AT+UPSV=1,1000 | OK | Enable power saving with ca 4.6 s timeout. All +UPSV modes |
other than +UPSV: 0 are required to enable the entrance into PSM deep-sleep
mode.
AT&W| OK| Save +UPSV setting to the default profile, loaded at switch on.
AT+CEDRXS=0| OK| Disable eDRX.
AT+UPSMR=1| OK| Enable the +UUPSMR diagnostic URC.
AT+CSCON=1| OK| Enable +CSCON diagnostic URC.
AT+CPSMS=1,,,”10100010″
,”00000011″
| OK| Enable PSM with 6 s for T3324 and 120 s for T3412 (such small values can
be used only for testing purposes!)
AT+CFUN=16| OK| [optional] If +UMNOPROF setting has been modified, a SW reset
shall be triggered.
Volatile settings
Command | Response | Description |
---|---|---|
AT+CEREG=4 | OK | Enable the +CEREG URC with extended syntax to report |
negotiated PSM timer values. If issued in full functionality, the current
status shall be queried via the +CEREG read command.
AT+CFUN=1| OK| [optional] If +CFUN: 0, turn on the modem, auto-cops feature
will trigger registration. We assume PIN check is disabled when using PSM.
PSM in normal mode
Command | Response | Description |
---|---|---|
+CSCON: 1 | During LTE attach, the module is in RRC connected state. | |
+CEREG: 1,”1″,”0″,”1″,7, |
,,”00100010″,”10111110″
| After successful LTE attach, location information is returned, together with
the PSM timer values assigned by the NW (120 s for T3324, 1800 s for T3412 in
the present case).
AT+CEREG?| +CEREG: 4,1,”1″,”0″,”1″,
7,,,”00100010″,”10111110 ”
OK
| Same information will be returned by querying the +CEREG AT command.
AT+UCPSMS?| +UCPSMS: 1,,,”00100010″,
“10111110”,1
| The NW assigned PSM timer values are returned also by the proprietary
command +UCPSMS, whose last parameter indicates if the extended T3412 duration
has been granted (1) or not (0), regardless of the timer effective duration.
| +CSCON: 0| At expiry of inactivity time on the network side, the RRC
connection is released by the eNodeB. Timer T3324 is set.
| +UUPSMR: 1| T3324 elapses and the device can enter PSM deep-sleep mode.
AT| OK| If the UART interface is stimulated just after the URC is issued, the
entrance in PSM deep-sleep mode will be postponed by +UPSV timeout. No
temporal threshold can be provided, because the delay of saving information to
NVM done at entrance in PSM depends on many factors. It is therefore assumed
that the host application will use the AT interface on purpose to prevent the
module from entering PSM.
Command| Response| Description
---|---|---
| +UUPSMR: 0| At T3412 expiry (usually with 2 s tolerance) the module will
exit PSM.
| +CSCON: 1| At T3412 expiry, TAU is performed.
| +CSCON: 0| At expiry of inactivity time on the NW side, the RRC connection
is released by the eNodeB. Timer T3324 is set.
| +UUPSMR: 1| T3324 elapses and the device can enter PSM deep-sleep.
| +UUPSMR: 0| At early wakeup, the module will exit PSM.
ATD*99***1#| CONNECT| At exit from PSM, PPP mode shall be locally restored. IP
address will be the same assigned during attach, and uplink data can be sent
to the NW without the need to re-register.
eDRX
SARA-R5 series modules support the 3GPP Release 13 feature Extended
Discontinuous Reception (eDRX). This feature allows power consumption
reduction thanks to extended no-reception intervals (up to 2621.44 s in LTE
Cat. M1 RAT) that separate shorter periods (called PTW – paging time windows,
up to 20.48 s in LTE Cat. M1 RAT) in which the module can be paged by the
eNodeB.
eDRX is often used standalone, as an alternative to PSM for applications that need more responsiveness from the module but still need to keep power consumption limited and can afford delaying the mobile terminated traffic for the eDRX cycle duration. In this case TAU keepalive procedures occur with the default periodicity of approximately 1 hour. eDRX can be also used in combination with PSM to avoid frequent TAU procedures. In this case, paging reception in the paging windows operates while the T3324 timer is running and therefore it is advisable to negotiate a T3324 timer duration longer than the eDRX cycle, otherwise eDRX will never be effective and reception of mobile terminated data or signaling will be postponed to the exit from PSM (see Figure 4).
The application can set the eDRX with +CEDRXS AT command and read the network assigned eDRX value using the +CEDRXRDP AT command.
- Enabling of eDRX might cause the delayed elapsing of internal module timers, whose timeout will be rounded to the next useful eDRX cycle.
Figure 4: paging reception in PTW with both PSM and eDRX enabled
- The following eDRX deep-sleep mode description applies to SARA-R5 “x1B” product versions.
Depending on the power saving settings (+UPSV), the SARA-R5 series modules can enter eDRX deep-sleep mode, where the module runs at negligeable current (for definitions and power consumption characterization, see the SARA-R5 series system integration manual [3]).
eDRX deep-sleep is the default enabled mode, but it can be disabled (unlike
PSM deep-sleep) via the power saving mode version command, +UPSMVER (bit 3 of
+UPSMVER to 0); if disabled, previously described eDRX mode is applied.
Like for the PSM deep-sleep case, if the module enters the eDRX deep-sleep
mode, it will locally deactivate MUX and PPP and will not be responsive to AT
commands; it will either wake up autonomously at next PTW time, or through an
early wake-up triggered by the host application via the PWR_ON pin. The exit
from eDRX deep-sleep mode is like a power-on, with the major difference that
no LTE attach will be performed, and the previously activated EPS bearers and
IP addresses will be locally restored: the module will reselect a cell of the
PLMN that was registered and trigger data transmission or wait for paging in
case of early wake-up or wake-up at eDRX cycle duration timeout respectively.
Enabling of PIN check is deprecated when using eDRX deep-sleep, because it
will prevent the module from restoring the cellular connectivity until PIN is
re-entered by the host application.
At eDRX deep-sleep mode entrance, any timer used in the module will be discarded (e.g. application timers). As an exception to this, the following throttling timers are saved and restored with the remaining value at deep- sleep exit: T3402, sever network failure (SNF, Verizon specific), T3346, T3396, and T3245 (if is configured in USIM). In addition to that, T3412 and T3324 timers are also stored and restored with the remaining value over deep- sleep cycle. Also, APN RATE CONTROL TIMER and T3448, if CIOT is enabled.
If the power saving mode is not active (i.e., if +UPSV: 0 and +CPSMS: 1) the module will not enter eDRX deep-sleep mode, but a standard eDRX state, whose power consumption is like +CFUN: 0 condition and the module is responsive on the AT interface. In this configuration the module will not be reachable either by mobile-terminated data and it will not receive any SMS.
Functional diagram of eDRX and PSM
For sake of clarity, Figure 5 illustrates the state transitions and the device
activities during module operation with both PSM and eDRX active. Some
configurable parameters are highlighted, among them the DRX cycle (2.56 s),
the eDRX cycle (1024 s), T3324 and T3412 timers:
- The device is in PSM deep-sleep mode; it has already registered at startup, negotiated PSM timers, and is now inactive, not responsive to AT commands, nor paging messages.
- The device exits PSM at early wake-up triggered by the host application or by T3412 timeout.
- The device re-connects to the network and sends and receives data or control packets.
- The RRC connection is released by the network e.g., at the end of the TAU. The device enters the idle state and starts T3324 timer.
- While T3324 timer is running, paging happens as per network configuration.
- The device enters PSM after T3324 has elapsed. Operations continue as per point 1.
If after point 2. the device does not enter RRC connected state, the device will eventually re-enter PSM state as if it had not awakened from it after 6 s (fixed timer, per design).
- Starting with SARA-R5 “x1B” product versions, it is possible to have eDRX deep-sleep mode and PSM deep-sleep mode case together, if the eDRX deep-sleep is enabled. The UE is able to exercise deep-sleep due to eDRX when PSM is enabled and timers are aligned to support it.
PSM aware applications
Some embedded clients and features can alter the PSM timings; this holds in
particular for LwM2M and security clients, which will temporarily postpone
entrance into PSM deep-sleep mode until their sessions have been concluded.
For more details on u-blox LwM2M objects and AT commands, see the LwM2M
application note [9]. IP based applications (e.g., MQTT, USOCK, UDNS, UFTP,
HTTP) instead have no control on PSM, and might be negatively impacted by
entrance in PSM state if the host application is waiting for an answer from
the network, which is delayed beyond the T3324 timer duration. If the AT
commands are asynchronous, like +UMQTTC, the host application can enter AT
commands until the final result code is received via URC. If the AT command is
blocking, the UART interface can be polled on another virtual port or PSM can
be temporary disabled via +CPSMS AT command.
Usage of UDP sockets instead of TCP ones can reduce the transactions duration and is more effective with respect to power consumption.
- Starting with SARA-R5 “x1B” product versions, the same applies also to the eDRX case, if the eDRX deep-sleep mode is enabled; it is possible to talk about eDRX-aware applications, by analogy.
Consider that in Coverage Enhancement mode the network may release the RRC connection later to accommodate the many retransmissions related to the CE mode currently selected by the UE. This can explain why PSM is sometimes entered with delay and can be confirmed by +CEINFO AT command.
Configuration of UE behavior for early wake-up from deepsleep mode
- This section applies to SARA-R5 “x1B” product versions only.
Early wake-up from deep-sleep mode (via PWR_ON pin) should be used when the HOST application needs to interact with the UE before the periodic interaction with the network (TAU for PSM, paging for eDRX). Two scenarios to be considered:
- Interaction with UE with need to interact with SIM or protocol stack, and eventually with the network.
- Interaction with UE without need to interact with SIM or protocol stack.
The UE can be configured to fit the two scenarios (in a power consumption perspective) via the power saving mode version AT command (+UPSMVER). In the former case, the required +UPSMVER configuration is with bit 4 set to 0; this is the default one (+UPSMVER: 8). At early wake-up from deep-sleep, if the device does not make any network interaction for the subsequent 6 s, it will re-enter the deep-sleep mode (if nothing else blocks the re-entering).
The SIM is fully accessible during the awake time, and there is no limitation on AT commands. If instead +UPSMVER configuration is with bit 4 set to 1, the SIM is not accessible, and protocol stack is kept in retention mode. This configuration is useful in case the interaction with the UE is limited to the application side (modem services are not requested); for instance, this includes:
- GNSS usage
- File system access
- GPIOs control
To be noticed that in this configuration every AT command requiring SIM status will return the “ERROR” final result code (since SIM status is not available); this is also the case for any AT command requiring protocol stack. In case interaction with SIM is required, the AT+CFUN=126 shall be issued, before. After AT+CFUN=16, the UE behavior is like the +UPSMVER: 8 configuration, that is deep-sleep mode is automatically re-entered after 6 s, if network is not required.
As soon as the engagement with the UE is completed (limited to the application services), and in case SIM or protocol stack access is not required (hence AT+CFUN=126 not issued), the UE can be put in deep-sleep mode again by means of +USLEEP AT command (if remaining TAU (or paging time) is enough). In this scenario, autonomous wake-up for serving next TAU (or paging) is guaranteed, unless the HOST triggers another early-wake-up via PWR_ON pin before, again.
UICC suspend resume
- Starting with SARA-R5 “01B” product versions, the UICC suspend/resume feature is supported, for both PSM and eDRX.
- It is used to store the internal status of the UICC so that the power supply to the UICC can be switched off, and to subsequently restore the UICC status. This mechanism allows, in a new card session, restoration of certain states saved at the suspension of a previous card session. The final goal is to save power consumption.
- It is implemented according to 3GPP TS 31.102 [13].
- The UICC SUSPEND and RESUME APDUs are defined in ETSI TS 102.221 [14].
- For PSM, if supported by the UICC, UICC suspend is performed during PSM entering phase, regardless of the +UPSV configuration (it is triggered even if deep-sleep mode cannot be entered).
- For eDRX, if supported by the UICC, UICC SUSPEND is only executed if eDRX deep-sleep mode is enabled (+UPSMVER bit 3 to 1), eDRX cycle time is higher than threshold (327.68 s), and +UPSV: 1 mode is set.
- The only difference between the PSM and eDRX procedures is an additional check for eDRX bit, read from EF AD (see 3GPP TS 31.102 [13]).
- When the UICC receives the SUSPEND command, it stores the complete UICC status to a non-volatile memory. The UICC status includes all data that are required to resume later the UICC in the exact same condition, so that it is equivalent as if the power supply was never removed.
- The UICC SUSPEND command also provides the minimum and maximum suspend time. The module uses the same minimum and maximum suspend time, calculated according to the remaining PSM or eDRX cycle time (in order to be ready for next TAU or paging).
- Upon reception of the response indicating the successful execution of the SUSPEND UICC command, the terminal deactivates the UICC.
- The UICC resume is performed during the PSM or eDRX leaving procedure; UICC RESUME APDU is the first sent, after UICC re-activation.
- ☞ The UICC Suspend/Resume mechanism allows entering PSM or eDRX even if the PIN is enabled.
- ☞ If UICC Suspend fails, the UICC deactivation is then executed (UICC Resume is clearly not performed at PSM or eDRX leaving, but a full USIM re-initialization is done, instead)
- ☞ UICC Resume is performed without re-initializing the USIM application and without performing verification of the SIM; this saves energy (SIM verification is done using a token provided in the response to the UICC SUSPEND APDU).
- ☞ If eDRX deep-sleep mode is enabled and only blocked by a deep-sleep client (like GNSS), the execution of UICC Suspend provides some power saving in comparison to the “legacy” eDRX thanks to the UICC deactivation (UICC power is removed).
- ☞ The execution of UICC Suspend command might take a significant amount of time (depending on the UICC). To be noticed that there is not a way to disable the UICC SUSPEND command, if the UICC supports it.
Example of usage of eDRX
Persistent settings
Command | Response | Description |
---|---|---|
AT+CFUN=0 | OK | De-register the module. |
AT+UPSV=1,1000 | OK | Enable power saving with ca 4.6 s timeout. All +UPSV modes |
other than +UPSV: 0 are required to enable the entrance into PSM deep-sleep
mode.
AT&W| OK| Save +UPSV setting to the default profile, loaded at switch on.
AT+CPSMS=0| OK| Disable PSM.
AT+UPSMR=1| OK| Enable the +UUPSMR diagnostic URC.
AT+CSCON=1| OK| Enable +CSCON diagnostic URC.
AT+CEDRXRDP| +CEDRXRDP: 0,””,””,”” OK| Verify that eDRX is disabled.
AT+CEDRXS=1,4,”1010″| OK| Enable eDRX with access technology E-UTRAN (WB-S1
mode) and with an eDRX cycle length of 327.68 seconds.
AT+CFUN=16| OK| [optional] If +UMNOPROF setting has been modified, a SW reset
shall be triggered.
Volatile settings
Command | Response | Description |
---|---|---|
AT+CFUN=1 | OK | [optional] If +CFUN: 0, turn the modem on, the auto-COPS |
feature will trigger registration.
eDRX in normal mode
Command | Response | Description |
---|---|---|
+CSCON: 1 | During LTE attach, the module is in RRC connected state. | |
AT+CEDRXRDP | +CEDRXRDP: 4,”0000″,”101 |
0″,”0001″
| The network assigned eDRX timer values are returned via the
+CEDRXRDP AT command. The same URC is also returned in case the
| +CSCON: 0| At expiry of inactivity time on the network side, the RRC
connection is released by the eNodeB; eDRX cycle starts with the paging
window.
| +UUPSMR: 1| At paging time window completion, device can enter eDRX deep-
sleep mode (SARA-R5 “01B” product versions modules only).
AT| OK| If the UART interface is stimulated just after the URC is issued, the
entrance in eDRX deep-sleep mode will be postponed by +UPSV timeout. No
temporal threshold can be provided, because the delay of saving information to
NVM done at entrance in eDRX depends on many factors. It is therefore assumed
that the host application will use the AT interface on purpose to prevent the
module from entering eDRX deep-sleep mode.
| +UUPSMR: 0| Before eDRX cycle length expiry the module will boot-up (if
deep-sleep mode was entered), and it will be ready to receive the programmed
paging event. The URC notifies that the protocol stack is reactivated, and the
module is ready to handle the reception of paging.
| +UUPSMR: 1| At paging time window completion, the device can re-enter the
eDRX deep-sleep mode, if nothing is preventing it.
| +UUPSMR: 0| In case of early wake-up from deep-sleep mode, the module will
re-activate the protocol stack, without forcing any network operation.
ATD*99***1#| CONNECT| At exit from eDRX deep-sleep mode, PPP mode shall be
locally restored. IP address will be the same assigned during attach, and
uplink data can be sent to the network without the need to re-register.
Release Assistance Indication (RAI)
This section is not applicable to ‘00B’ product version.
The module can enter low power mode states like DRX, eDRX and PSM only in idle mode. Once the RRC connection has been established, only the network can release it: the module cannot force an RRC connection release other than detaching using e.g., AT+CFUN=0 command. If there is no transmission for the duration of the so called “inactivity timer”, the base station will send an RRC Connection Release message to the module. The inactivity timer can range from 5 s to 10, 20 or even 60 s depending on the current RAT and the coverage extension level/mode.
First introduced in 3GPP Release 13 for Non Access Stratum (NAS) for data over the Control Plane (CP) and Release14 for Access Stratum (AS) over the User Plane (UP), the Release Assistance feature allows the module to request the network to release the RRC connection as soon as it receives the RAI flag. SARA-R5 supports the two modes for the Release Assistance feature: Access Stratum (AS) RAI, that can be relied on when data is sent over the User Plane (e.g. in Cat M1), and Non Access Stratum (NAS) RAI, that can be used when data is sent over the Control Plane (e.g. in NB-IoT). Support of AS RAI by the eNB is optional, while NAS RAI is basically part of the 3GPP protocol when using the Control Plane.
The user can send data either over the UP or over the CP, depending on the current RAT and optionally on the +CCIOTOPT configuration:
- If data is sent over the UP, only the AS RAI can be set when the uplink buffers (BO – Buffer Occupancy) have been emptied and will be reset after first usage.
- If data is sent over the CP, both the NAS and the AS RAI flags can be used and then reset after first usage.
SARA-R5 series supports usage of the RAI flag with the following AT commands:
- +USOSTF: sends UDP data (both over the UP and the CP) with flags.
- +UCOAPC: CoAP Non-CONF messages (can exploit NAS RAI only).
- +CSODCP: Non-IP Data when Non-IP PDP type has been activated.
- +UDCONF=89: allows setting at runtime the RAI flag for once shot or permanently. In case of AS RAI, the trigger of the RAI flag with this AT command is immediately effective as soon as BO reaches 0; in case of NAS RAI, it shall be followed by an IP packet including the flag, which can be sent by the host application (depending on
setting it is the last packet or the last but one packet of the data session) or by a proprietary command (e.g. +UTGSINK or + USOSTF).
For SARA-R5 “01B” product version and previous ones there is no URC or AT command to know if the network supports RAI feature. The application can monitor +CSCON URCs and in case the RAI feature is supported by network, it should expect to get +CSCON: 0 URC soon after the last packet is sent (or the next-to-last one).
Example of usage of RAI
Data session with internal sockets
Command | Response | Description |
---|---|---|
AT+CSCON=1 | OK | Enable the +CSCON diagnostic URC to better follow the module’s |
connection state.
AT+UPSDA=0,3| OK
+UUPSDA: 0,”10.18.88.94″
| Activate an internal data context.
AT+USOCR=17| +USOCR: 0 OK| Create an UDP socket.
AT+USOST=0,”18.196.19.141″,7,5,”
H2j3j”
| +USOST: 0,5 OK| Send data to an echo server.
---|---|---
| +CSCON: 1| The module is in connected status.
| +UUSORD: 0,5| Data received from echo server.
AT+UDCONF=89,1| OK| Enable one shot RAI flag; the UE will immediately send AS
RAI by setting buffer status report (BSR) to 0 when buffer occupancy (BO)
reaches 0 bytes.
AT+USOST=0,”18.196.19.141″,7,5,”
22j3j”
| +USOST: 0,5 OK| In NB-IoT (check
| +CSCON: 1| The module is in connected status.
| +CSCON: 0| The module goes immediately in idle status (RRC connection has
been released).
This is the consequence of setting the RAI flag.
| +CSCON: 1| The module is in connected status.
| +UUSORD: 0,5| Data received from echo server.
| +CSCON: 0| The module goes in idle status as per network timer (RRC
connection has been released).
AT+UDCONF=89,2| OK| Enable one shot RAI flag; (CP CIoT only) NAS RAI flag 2
will be sent in the next NAS packet containing IP or non-IP data, indicating
that the following packet will be the last but-one in the data session and
that a downlink packet is expected.
AT+USOST=0,”18.196.19.141″,7,5,”
72j3j”
| +USOST: 0,5 OK|
| +CSCON: 1| The module is in connected status.
| +UUSORD: 0,5| Data received from echo server.
| +CSCON: 0| The module goes immediately in idle status (RRC connection has
been released).
This is the consequence of setting the RAI flag.
Data session with dialup (i.e. single UART with multiplexer)
In the following example one AT interface is reserved for dial-up (PPP) and
another AT interface is used to issue AT commands and monitor URCs.
Command | Response | Description |
---|---|---|
ATD*99***1# | CONNECT | Enter PPP mode and exchange data on MUX1. |
AT+CSCON=1 | OK | The following AT commands are issued on MUX2. |
nable C C diagnostic C to better follow the module’s
connection state.
| | Application is sending UDP packets on PPP.
AT+UDCONF=89,1| OK| Enable one shot RAI flag.
| | Application sends last UDP packet.
+CSCON: 0| | The +CSCON URC is received immediately and RRC connection is
released.
CE Mode A and B
- CE (Coverage Enhancement) Mode A and B is a standard 3GPP feature, introduced starting from R.13, as specified in 3GPP TS 36.211, 3GPP TS 36.213 and 3GPP TS 36.331.
- The Coverage Enhancement determines the number of times downlink and uplink messages can be repeated to reach devices in poor coverage and the number of repetitions is predefined by the network.
- The main difference between the two modes is that Mode A allows only moderate coverage enhancement whereas Mode B supports very deep coverage. CE Mode A is a mandatory feature for Cat.M1, while Mode B is an optional feature.
- From application point of view, this is a tradeoff for deep coverage (up to 20dB) with more power consumption in case of large repetitions configured.
- The main reason for disabling CE Mode B would be for saving power; in addition to the increased number of repetitions used for DL or if the UL link was poorer, there could also be a lot more time spent searching for weaker cells in poor coverage areas, this might result in the module trying to attach to much weaker cells.
- Be aware that CE Mode B feature must be supported at network level too.
- In AT commands manual [2], in the Appendix related to MNO profiles, it is possible to retrieve the information for each MNO profile if the CE Mode B is enabled or disabled by default for each RAT.
Example of use of CE Mode B
Reading and setting CE Mode B
Command | Response | Description |
---|---|---|
AT+CFUN=4 | OK | Set the module in airplane mode. |
AT+UDCONF=91,7 | +UDCONF: 91,7,1 OK | Read if the CE Mode B feature is enabled |
(1) or disabled (0): the third parameter reports the info.
AT+UDCONF=91,7,1| OK| Enable CE mode B feature (the change is immediately
effective and stored in NVM).
AT+UDCONF=91,7,0| OK| Disable CE mode B feature.
AT+CFUN=1| OK| Set the module in full mode.
Monitoring module status
Retrieve and interpret diagnostic information
- It is recommended to track the module status in the host application. Such diagnostic information allows to detect specific scenarios and implement proper handling and countermeasures in the host application.
- The module status can be returned by AT command responses and unsolicited result codes (URCs). Depending on the host application architecture, URCs, periodic polling, or both, can be used. URCs provide the most updated information and, in some cases, diagnostic information which is not available via polling. For AT commands that enable URCs, they might also return the same information when polled, as indicated below.
- Some commands store the setting of the URC reporting in NVM, so they are referred to as persistent settings.
- Some AT commands provide a choice on how to handle the URCs when the AT interface is busy; for all other AT commands, URC is issued at the return into command mode, as explained in SARA-R5 series AT command manual [2], in the “URCs presentation deferring” section.
- URCs and AT command responses are presented with their generic syntax because parameters names are quite explanatory; for precise meaning see the SARA-R5 series AT command manual [2].
Diagnostic information via URCs
Command | URC | Description | Can be polled |
---|---|---|---|
AT+CSCON=1 | +CSCON: 1 | Return the status of the RRC connection (idle or | |
connected). Persistent setting. | Yes | ||
AT+CREG=3 | +CREG: |
TStatus>][,
| Enable registration status URC for non- EPS services (e.g. SMS) and reject
cause in case of unavailability of such services.| Yes
AT+CEREG=5| +CEREG:
T>][,[
][,[
| Enable registration status URC for EPS services, reject cause in case of
unavailability of such services and PSM related timers if granted by the NW.|
Yes
AT+UCELLINFO=2,
| Report serving and neighbor cell parameters with the specified periodicity.|
No
AT+UMETRIC=
AT+CGEREP=2,1| +CGEV: NW PDN DEACT
AT+CTZR=2| +CTZE:
+CCLK will be automatically updated. Usually time and time zone info is provided by the NW at LTE attach only.
| No
AT+CMER=1,0,0,2,1| +CIEV:
AT+CNMI=2,1| +CMTI:
parameter set to 2 indicates that URC are
| No
| | buffered in case of busy AT interface. The setting is persistent (can be
saved in profiles via AT&W).|
---|---|---|---
AT+USIMSTAT=7| +UUSIMSTAT:
AT+UBIP=2| +UUBIP:
AT+UFOTASTAT=1| +UFOTASTAT:
AT+ULWM2MSTAT=1| +ULWM2MSTAT:
AT+CEINFO=1| +CEINFO:
AT+CEDRXS=1| +CEDRXP:
AT+CABTSR=1| +CABTSRI:
| attempt_rat_indicator>,
| the back-off timer is started, stopped, deactivated, or expires.
---|---|---
Diagnostic information via polling
Command| Response (omitting OK)| Description| Suggested
usage
---|---|---|---
ATI ATI9| SARA-R510M8S-00B-00 02.05,A00.01| Return the model and FW
identification, useful for tracking purposes.| Module initialization
AT+CGSN| 3412093481025938| Return the IMEI.| Module initialization
AT+CIMI AT+CCID| 001010123456789
+CCID: 89860000502000180722
| Return the SIM identities for tracking purposes. They can change after a SIM
refresh event that can be reported by +UUSIMSTAT URC.| Module initialization
AT+UBANDMASK?| | Return band mask selection.| Module initialization
AT+UMNOPROF?| | Return MNO profile set.| Module initialization
AT+UCGED?| +UCGED: 2 6,
si>,
| Return several cell parameters as measured by the module or provided by the
NW. Some values like CQI and signal indicators are periodically refreshed in
the module on a 0.5 s base, so the application should average them.| Low
periodicity
AT+CESQ?| +CESQ:,,,,
AT+CEER| +CEER: “EMM cause”,15,”No suitable cells in tracking area”| It
returns the last error cause (as received by the network) that led to the
failure of a registration or PDN connectivity establishment.| When detecting
registration or connectivity problems
AT+COPS?| +COPS:
AT+CGDCONT?| +CGDCONT:
dr>,
| It returns the active and defined EPS bearers with the APN used and the IP
type and addresses.| Periodically (30 s) and when detecting problems
AT+CPOL?| +CPOL:
-UTRAN_AcT>]]
| It returns the high priority PLMN list, which might change at SIM refresh.|
Module initialization and SIM refresh, only in debug/test mode
---|---|---|---
AT+CEDRXRDP| +CEDRXRDP:
AT+CPSMS?| +CPSMS:
],[
| It returns the PSM settings as required to the NW. As setting is persistent,
if the NW does not grant PSM, the module will propose the PSM timers at every
attach and registration attempt.| Module initialization
AT+UCPSMS?| +UCPSMS:
],[
],[
]
| It returns the PSM settings as assigned by the NW. If PSM timers are not reported by +CEREG, this command can be periodically polled. Periodic TAU timer is also reported.| At change of registration information (as reported by
+CEREG)
Full-stack watchdog how to react to unexpected conditions
The application shall properly handle communication or connectivity problems that can arise when using SARA-R5 in the cellular mobile environment.
When a problem at a specific level is encountered, the countermeasure for that level should be tried and, if that does not resolve the issue, then proceed with the solutions for the lower levels. Table 14 shows a full-stack watchdog for monitoring SARA-R5 series modules.
Level| Problem| Countermeasure| AT commands / actions|
Notes
---|---|---|---|---
Socket/dial-up| Cannot send/receive data| Close and re-open socket|
AT+USOCL=
| | Disconnect and re-connect dial-up| Send +++ / Move DTR
ATD*99***
|
IP/PDP| Cannot get an IP address; cannot establish dial-up| Detach/re-attach|
AT+CFUN=0 AT+CFUN=1| Consider possible restrictions to multiple
If IPv6-only PDN is set in Verizon Wireless MNO setting, detach/deactivation may be caused by failing IPv6 acquire by SLAAC. The retry is managed automatically based on VZW DR logic. Automatic deactivation does not apply if UL data is disabled via
+UMNOPROF: 9,0.
| | Deactivate/re-activate context (
!= 1)
| AT+CGACT=0,
Network registration| Cannot register| Detach/re-attach| AT+CFUN=0 AT+CFUN=1|
AT+CFUN=0/1 is faster than AT+COPS=2/0
RF| Cannot register| Disable/re-enable RF functionality| AT+CFUN=0 AT+CFUN=1|
AT+CFUN=4 is NVM persistent, better to use AT+CFUN=0
Module FW| Cannot register| Soft reset| AT+CFUN=16|
AT interface| No response from module| HW switch off| GPIO power on| See the
SARA-R5 series system integration manual [3] for details and alternatives
Table 14: Full-stack watchdog for SARA-R5 series modules
Restore factory configuration
During operation with the module, different files may be stored in the module’s file system. Similarly, the NVM is populated with user configuration as well as auxiliary information stored by the module to optimize its operations (e.g. information on the cellular environment).
- Profiles, that are updated with AT&W command, can be restored with ATZ command.
- AT commands factory-programmed values stored in NVM and profiles are listed in appendix B.2 of SARA-R5 series AT commands manual [2].
The host application can restore the module factory configuration via the +UFACTORY AT command (see the SARA-R5 series AT commands manual [2]); this can be required to recover from an unexpected behavior and restart the module in a controlled configuration, or during the MNO certifications, where the device is tested in various simulated scenarios and the auxiliary information or previous user settings can affect the tests outcome.
Restoring the factory configuration of the module is a 2-step process:
- Set the type of restore to perform, using the +UFACTORY AT command. FS and/or NVM can be restored.
- Reboot the module
The +UFACTORY AT command writes a flag in NVM and does not perform any restoring action. This flag is then read at the next reboot, when the UFACTORY corresponding action is made. Therefore, it is possible to cancel the UFACTORY action by issuing the command with parameters 0,0 before the reboot.
Table 15 shows some examples.
Command | Response | Description |
---|---|---|
Delete all files stored in FS | ||
AT+UFACTORY=2,0 | OK | Set +UFACTORY to delete all files in FS. No restore is |
performed so far.
AT+UFACTORY?| +UFACTORY: 2,0 OK| Check the restore action currently set.
AT+CFUN=16| OK| Reboot the module. At next reboot, the restore action
previously set is applied.
Restore NVM| |
AT+UFACTORY=0,2| OK| Set +UFACTORY to restore the NVM. No restore is performed
so far.
AT+UFACTORY?| +UFACTORY: 0,2 OK| Check the restore action currently set.
AT+CFUN=16| OK| Reboot the module. At next reboot, customer settings and
profiles are reverted to the factory programmed values.
Cancel a restore operation (before reboot)
AT+UFACTORY=2,0| OK| Set a +UFACTORY action.
AT+UFACTORY?| +UFACTORY: 2,0 OK| Check the restore action currently set.
Currently, a FS restore is requested and will be applied at next reboot.
AT+UFACTORY=0,0| OK| Cancel any restore action.
AT+UFACTORY?| +UFACTORY: 0,0 OK| No restore action will be applied at next
reboot.
Table 15: +UFACTORY usage examples
SW migration guide from SARA-R4 series
Below is a list of changes between SARA-R4 series and SARA-R5 series modules with a brief description, which could help in migrating a host application between the two modules. For detailed explanation of the AT commands mentioned, see the SARA-R5 series AT commands manual [2].
-
+COPS behavior Issuing +COPS AT command while the module is in automatic search mode (+COPS: 0), the AT command may return “+CME ERROR: Temporary Failure”. This error result code can be neglected, and the command can be eventually retried. Ultimately, an AT+CFUN=0/1 cycle can be issued to recover.
-
+CGDCONT behavior. Differently from SARA-R4 series, on SARA-R5 series when AT+CGDCONT?is issued after the attach is completed, the 3GPP suffix assigned by the network during the attach procedure is reported in the APN name field. For this reason, the APN name read with +CGDCONT read command may be different from the one set via the +CGDCONT set command.
-
AT+CGACT=0. On SARA-R5, do not use AT+CGACT=0. Prefer AT+CGACT=0,
or deregister the device with AT+CFUN=0. -
Software reset via +CFUN.
o SARA-R5 series supports AT+CFUN=16 for software reset.
o SARA-R4 series supports AT+CFUN=15 for software reset. -
Internal TCP stack. In SARA-R5 it is needed to define and activate an internal PDP context (via + UPSD and +UPSDA AT commands) before using socket (+USOXX) and higher level IP based applications (+UHTTP, +UMQTT, etc.) commands. For more details, see the Internet applications development guide application note [5].
-
TCP socket graceful closure. TCP socket (created via +USOCR AT command) graceful closure is obtained:
- In SARA-R4 series, by using the AT+USOCLCFG=1 command. The set command with value 0 disables the feature. This applies to all IP clients and applications.
- In SARA-R5 series, by using the +USOSO AT command, specifying the option 128 (linger on close if data present) with values 1 (enabled) and linger time. This applies to +USOXX only applications.
-
MQTT client URCs.
- SARA-R4 “x2” product versions report 2 +UUMQTTC URCs: one with the client result (
) and another one with the server result ( ). - SARA-R5 and SARA-R4 “x3” product versions report the OK final result code right after the command, then only one +UUMQTTC URC with the server result (
).
- SARA-R4 “x2” product versions report 2 +UUMQTTC URCs: one with the client result (
-
SMS “ME” storage size.
- SARA-R4 “x2” product versions support up to 23 SMSs in “Me” storage.
- SARA-R5 and SARA-R4 “x3” product versions support up to 100 SMSs in “Me” storage.
-
UART default data rate (+IPR). The default and factory programmed value for the UART interface data rate is:
- 1 15’200 bit/s on SARA-R4 series modules.
- 0 (“autobauding”) on SARA-R5 series modules. This impacts URC generation, that require an AT command to be printed at the proper UART speed.
-
+UCGED: PLMN format. In the information text response to +UCGED read command, MCC and MNC parameters are printed in decimal notation on SARA-R4 series, while they are printed with hexadecimal notation on SARA-R5 series.
-
MNO profiles. The available MNO profiles are different between SARA-R4 and SARA-R5 series.
Always check the AT commands manual (+UMNOPROF AT command) of the specific product to get a list of available MNO profiles. -
Disabling LwM2M.
- In SARA-R4 series it can be disabled runtime but not permanently.
- In SARA-R5 series it can be permanently disabled.
-
PSM. On SARA-R5, HPPLMN scan in roaming is not performed in PSM state, it will be postponed to PSM exit or PSM deep-sleep exit. When USB is connected for debug purposes, PSM deep-sleep mode can still be entered. The +URATCONF AT command shall be used to configure entrance into deep-sleep mode in limited service or no service registration states.
Appendix
A System architecture building block
LPWAN technology overview
SARA-R5 “00B” product versions support LTE Cat M1 LPWAN technology. SARA-R5
“01B” product versions support both LTE Cat M1 and NB-IoT (LTE Cat NB2) LPWAN
technologies.
Key applications using LPWAN include:
- Automotive and transportation
- Smart metering
- Smart cities
- Smart buildings
- Connected health
- Agricultural and environmental
LTE Cat M1
LTE Cat M1 is a low‑power wide‑area (LPWA) air interface that allows the connection to IoT and M2M devices with medium data rate requirements. It enables longer battery lifecycles thanks to enhanced power saving mode and extended in‑building range (up to 15 dBm more than LTE, thanks to the repetitions of transmissions provided in the Coverage Enhancement modes), as compared to standard cellular technologies such as 2G, 3G, or LTE Cat 1. LTE Cat M1 is part of the same 3GPP Release 13 standard that also defines Narrowband IoT (NB‑IoT or LTE Cat NB2) – both are LPWA technologies in the licensed spectrum. With uplink speeds of 375 kbit/s, which can reach 1 Mbit/s on some networks thanks to protocol stack enhancements, and downlink speeds of 375 kbit/s in half duplex mode, LTE Cat M1 specifically supports IoT applications with low to medium data rate needs. At these speeds, LTE Cat M1 can deliver remote firmware updates over‑the‑air (uFOTA, with access to MNOs and u-blox servers via the LwM2M protocol) within reasonable timeframes, making it well‑suited for critical applications running on devices that may be deployed in the field for extended periods of time.
Battery life of up to 10 years on a single charge in some use cases also
contributes to lower maintenance costs for deployed devices, even in locations
where end devices may not be connected directly to the power grid.
The LTE Cat M1 standard specifies Connected Mode Mobility, which SARA-R5
supports through inter-frequency and intra-frequency handover capability,
resulting in higher reliability of transmissions, particularly important in
non-static usage.
Low power profile features
When integrating SARA-R5 in a low power consumption device, it is recommended
to enable the power saving mode via +UPSV AT command. Depending on the
configuration of the serial line used, different +UPSV modes can be selected
(see the SARA-R5 series system integration manual [3] and the SARA-R5 series
AT commands manual [2]).
To benefit from the enhancement of the LPWA standard, PSM can be enabled. The PSM feature forces SARA-R5, when in inactive phases, to enter a low power mode state, where the module is totally deactivated. The state is exited either if the host application needs to trigger data or AT commands, or when the device has to perform the periodic registration to the LTE network, which in PSM is done less frequently than in normal, non PSM operational mode (e.g., after a few hours). Overall, this behavior is more convenient with respect to usage of on demand radio switch off/on via AT+CFUN=0/1 but has the disadvantage of long-lasting non-reachability periods while the device is deactivated. Similarly, host applications using mobile-terminated user data (e.g., SMS) can rely on eDRX (extended DRX) to keep the power consumption at optimal level while retaining reachability.
SARA-R5 assures enhanced coverage thanks to the support of coverage enhancement (CE) modes A and B; this benefit is balanced by longer transmission duration due to the several repetitions, which the host application can mitigate by using a reduced transmission duty cycle for optimal tradeoff.
NB-IoT
Narrowband IoT (NB‑IoT), also known as LTE Cat NB2, is a Low Power Wide Area (LPWA) technology that works virtually anywhere. It simply and efficiently connects devices on already established mobile networks, and securely and reliably handles small amounts of infrequent two‑way data. And the best is, it provides:
- Very low power consumption
- Excellent extended range in buildings and underground
- Easy deployment into existing cellular network architecture
- Network security & reliability
- Lower component cost
NB‑IoT will connect many more devices to the Internet of Things and make many new applications a reality. It is optimized for applications that need to communicate small amounts of data over long periods of time. Since it operates in licensed spectrum, it is secure and reliable, providing guaranteed quality of service.
Bi-RAT behavior
Although SARA-R5 “01B” product versions support both LTE Cat M1 and NB-IoT
RATs, there is no inter-RAT coordination, so only a single RAT can be selected
at a time. For more details about RAT selection, see section 6.1.
Glossary
Abbreviation | Definition |
---|---|
BIP | Bearer Independent Protocol |
CIoT | Cellular Internet of Things |
CP | Control Plane |
DCE | Data Circuit-terminating Equipment / Data Communication Equipment |
DL | Down Link (Reception) |
DRX | Discontinuous Reception |
DTE | Data Terminal Equipment |
eDRX | Extended DRX |
ePCO | extended Protocol Configuration Options |
FW | Firmware |
HW | Hardware |
LPWAN | Low Power Wide Area Network |
LwM2M | Lightweight M2M |
MCC | Mobile Country Code |
MNO | Mobile Network Operator |
MO | Mobile Originated |
MT | Mobile Terminated |
NAS | Network Access Stratum |
NVM | Non-Volatile Memory |
NW | Network |
PPP | Point-to-Point Protocol |
PSM | Power Saving Mode |
SW | Software |
TAU | Tracking Area Update |
UE | User Equipment |
UICC | Universal Integrated Circuit Card |
URC | Unsolicited Result Code |
Related documentation
- u-blox SARA-R5 series data sheet, UBX-19016638
- u-blox SARA-R5 series AT commands manual, UBX-19047455
- u-blox SARA-R5 series system integration manual, UBX-19041356
- u-blox SARA-R5 FW update application note, UBX-20033314
- u-blox Internet applications development guide application note, UBX-20032566
- u-blox SARA-R5 series production and prototype validation guidelines application note, contact technical support
- u-blox SARA-R5 series GNSS implementation application note, UBX-20012413
- u-blox Mux implementation in cellular modules application note, UBX-13001887
- u-blox LwM2M objects and commands, UBX-18068860
- u-blox EVK-R5 user guide, UBX-19042592
- 3GPP TS 24.008 – Mobile radio interface layer 3 specification
- 3GPP TS 27.010 V3.4.0 – Terminal Equipment to User Equipment (TE-UE) multiplexer protocol (Release 1999)
- 3GPP TS 31.102 – Characteristics of the Universal Subscriber Identity Module (USIM) application (Release 14)
- ETSI TS 102.221 – UICC-Terminal interface; Physical and logical characteristics (Release 14)
For regular updates to u-blox documentation and to receive product change notifications, register on our homepage (www.u-blox.com).
Revision history
Revision | Date | Name | Comments |
---|---|---|---|
R01 | 28-Oct-2020 | mmar | Initial release |
R02 | 07-Feb-2022 | mace | Generic improvements. |
Added/Improved sections about eSIM, BIP, MNO profiles, +UMNOPROF,
+UTEST. Removed SasS.
R03| 25-Aug-2023| mace| Generic improvements.
Added/Improved sections about application design, time management recommendations, CE modes.
Contact
u-blox AG
- Address: Zürcherstrasse 68 8800 Thalwil Switzerland.
- For further support and contact information, visit us at www.u-blox.com/support.
u-blox or third parties may hold intellectual property rights in the products, names, logos and designs included in this document. Copying, reproduction, modification or disclosure to third parties of this document or any part thereof is only permitted with the express written permission of u-blox.
The information contained herein is provided “as is” and u-blox assumes no liability for its use. No warranty, either express or implied, is given, including but not limited to, with respect to the accuracy, correctness, reliability and fitness for a particular purpose of the information. This document may be revised by u-blox at any time without notice. For the most recent documents, visit www.u-blox.com.
Copyright © u-blox AG.
References
- Cisco IoT Starter Kit
- Home | u-blox
- Home | u-blox
- Contact u-blox | u-blox
- GitHub - u-blox/m-center: Collection of AT scripts that can be incorporated and used on the u-blox m-center tool.
- u-blox.com/docs/UBX-19016638
- u-blox.com/en/docs/UBX-13001887
- u-blox.com/en/docs/UBX-18068860
- u-blox.com/en/docs/UBX-19041356
- u-blox.com/en/docs/UBX-19042592
- u-blox.com/en/docs/UBX-19047455
- u-blox.com/en/docs/UBX-20012413
- u-blox.com/en/docs/UBX-20032566
- u-blox.com/en/docs/UBX-20033314
Read User Manual Online (PDF format)
Read User Manual Online (PDF format) >>