Table of Contents

Advertisement

Quick Links

SARA-R42
Application development guide
Application note
Abstract
This document provides detailed technology architecture and examples of how to use AT commands
with u-blox SARA-R422 / SARA-R422S / SARA-R422M8S modules.
UBX-20050829 - R02
C1-Public
SARA-R4
www.u-blox.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SARA-R42 and is the answer not in the manual?

Questions and answers

Summary of Contents for Ublox SARA-R42

  • Page 1 SARA-R42 Application development guide Application note SARA-R4 Abstract This document provides detailed technology architecture and examples of how to use AT commands with u-blox SARA-R422 / SARA-R422S / SARA-R422M8S modules. UBX-20050829 - R02 C1-Public www.u-blox.com...
  • Page 2: Document Information

    SARA-R42 - Application note Document information Title SARA-R42 Subtitle Application development guide Document type Application note Document number UBX-20050829 Revision and date 09-Jul-2021 Disclosure restriction C1-Public This document applies to the following products: Product name SARA-R422 SARA-R422S SARA-R422M8S u-blox or third parties may hold intellectual property rights in the products, names, logos and designs included in this document.
  • Page 3: Table Of Contents

    SARA-R42 - Application note Contents Document information ..........................2 Contents ................................3 Introduction ............................. 6 Cellular technology overview ......................7 Radio Access Technologies (RATs) ..................... 7 2.1.1 LTE Cat M1 ............................7 2.1.2 NB-IoT ..............................7 2.1.3 GSM/EGPRS ............................8 Low power profile features ........................
  • Page 4 SARA-R42 - Application note GCF-PTCRB (+UMNOPROF: 201) ......................18 SIM ICCID select profile (+UMNOPROF: 1) ..................18 Network registration ......................... 20 Band configuration ..........................20 7.1.1 Scan time ............................20 First time registration setup .......................21 7.2.1 PAP/CHAP ............................21 7.2.2 Change of PDN settings (APN name and PDP type) ..............21 7.2.3...
  • Page 5 SARA-R42 - Application note 11 SIM ................................45 11.1 Chip SIM ..............................45 12 SMS ................................. 46 12.1 Preferred message storage .........................46 12.2 SMS handling and access technology ....................46 13 EFS backup & restore ........................47 13.1 Description ..............................47 13.1.1 EFS backup ............................48 13.1.2 EFS restore ............................48...
  • Page 6: Introduction

    SARA-R422 / SARA-R422S / SARA-R422M8S modules, including AT command sequences examples for specific use cases. Throughout the document, “SARA-R42” represents any of these modules. This should be the first document to read when working on an application integrating a SARA-R42 module. Section starts with a generic overview of the supported cellular technologies.
  • Page 7: Cellular Technology Overview

    SARA-R42 - Application note Cellular technology overview SARA-R42 modules support LTE Cat M1 and NB-IoT as LPWAN technologies plus the 2G RAT as fallback, such as used in application areas: • Automotive and transportation • Smart metering • Smart cities •...
  • Page 8: Gsm/Egprs

    SARA-R42 - Application note 2.1.3 GSM/EGPRS To assure global coverage, the module supports also 2G legacy RAT, more precisely it supports EGPRS class 33 with a downlink maximum speed of ~ 290 kbit/s (the peak bit rate depends on the quality of the radio link).
  • Page 9: Application Design And Development

    SARA-R42 - Application note Application design and development When designing a host application interfacing with a u-blox cellular module, consider the following points, as depicted in Figure • Choose the module’s features that the application needs, and the ones that can be disabled.
  • Page 10: Application Stages

    SARA-R42 - Application note Similar considerations hold for the security client. Power saving features (+UPSV, PSM, eDRX) shall be configured based on the target power consumption profile, based on the suggestions in section 8. The MNO profile (section 6) to be used depends on the type of application and SIM card (regional or global roaming).
  • Page 11: Core Application

    SARA-R42 - Application note 3.2.5 Core application For some details and guidelines on this topic, see the Internet applications development guide application note and SARA-R4 series AT command manual [2]. The application shall handle AT commands, responses and unsolicited indications as suggested in section 4. For diagnostic purposes, the application should rely on status AT commands, see section 9.1.
  • Page 12: At Commands Response Parser

    Due to interface restrictions, when using multiple AT command interfaces, the parser should take into account that in SARA-R42 series it is not possible to have parallel activity on two or more AT terminals. Basically this behavior can be detected in the following configurations: double UART availability, i.e.
  • Page 13: Unsolicited Result Code

    SARA-R42 - Application note Figure 2: Module operating modes and actions causing mode transitions 4.2 Unsolicited result code An unsolicited result code (URC) is a string message (provided by the DCE) that asynchronously indicates the occurrence of an event that might be related to a previous AT command or to the feature the user is currently using, or to the module’s autonomous activity (for example, due to mobility).
  • Page 14: Local Connectivity

    SARA-R42 - Application note Local connectivity 5.1 Serial interface configuration It is possible to switch between 3 serial interface configuration variants, using the command +USIO AT command, as shown in Table Command Response Description AT+USIO=0 (Default configuration) AT on UART (9-wire: RXD, TXD, CTS, RTS, DTR, DSR, DCD, RI, GND), trace on USB.
  • Page 15: At Interface

    SARA-R42 - Application note ☞ The “Set” command is available only for the auxiliary UART interface. ☞ The “Read” command is available for both the main UART and the auxiliary UART interfaces. 5.2 AT interface AT commands can be issued to the module only via UART interface.
  • Page 16: Point-To-Point Protocol (Ppp)

    SARA-R42 - Application note ☞ It is not possible to have parallel activities on AT terminals when the multiplexer is activated through the +CMUX AT command. The only allowed parallel activity is present when it is defined a system architecture with a PPP dial-up on one port and AT commands on the other port.
  • Page 17: Mno Profiles

    SARA-R42 - Application note MNO profiles MNO profiles provide a powerful and flexible method to configure the SARA-R4 series module to seamlessly work with the SIM of the selected network operator. Using the MNO profiles the 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.
  • Page 18: Mno Profile Setting Examples

    SARA-R42 - Application note 6.3 MNO profile setting examples Do not: set the MNO profile while the module is registered (Table Command Response Description AT+CMEE=2 Enable verbose error result code. AT+COPS? +COPS: 0,0,"00101",7 Module is currently registered. AT+UMNOPROF=100 Do not set MNO profile while module is registered.
  • Page 19 SARA-R42 - Application note Table 8 shows an example of automatic MNO profile detection setting usage. Command Response Description Set the automatic MNO profile detection, the AT+UMNOPROF=1 automatic reset and enable the related URC. DTE is required to perform first reboot...
  • Page 20: Network Registration

    SARA-R42 - Application note Network registration At 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.
  • Page 21: First Time Registration Setup

    SARA-R42 - Application note The described behavior has to be considered especially in roaming conditions. 7.1.1.1 OOS scan timings The scan algorithm is implemented when attempting to gain service at power-up and when the out-of-service (OOS) condition is detected. A full system scan is interspersed with sleep intervals to reduce power consumption.
  • Page 22: Attach Types

    SARA-R42 - Application note Command Response Description AT+CGDCONT? +CGDCONT: 1,"IPV4V6","","0. Read IP type and APN for EPS attach bearer. 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 Set APN name ("custom_APN" for example) and the AT+CGDCONT=1,"IPV4V6","cust om_APN" PDP type ("IPV4V6" for example) for EPS attach bearer.
  • Page 23: Radio Policy Manager

    SARA-R42 - Application note 7.2.4 Radio Policy Manager SARA-R4 series modules implement the Radio Policy Manager (RPM) feature according to GSMA connection efficiency TS 34 [14]. RPM aims to prevent cellular devices to aggressively try registration or PDP context activation procedures in case of permanent failures (e.g. “invalid UE” or “EPS services not allowed”), which are usually due to subscription restrictions, in addition to standard 3GPP retry...
  • Page 24: Registration Monitoring

    SARA-R42 - Application note 7.4 Registration monitoring Use the +CEREG AT command to confirm the module is registered on the LTE network for LTE Cat M1 or NB1. Use +CREG and +CGREG AT commands for CS and GPRS network registration status.
  • Page 25: Mobility Scenarios

    SARA-R42 - Application note 7.5 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.
  • Page 26: Psm, Edrx And Deep-Sleep Mode

    SARA-R42 - Application note PSM, eDRX and deep-sleep mode 8.1 Power saving mode (PSM) 3GPP has a standardized PSM to minimize power consumptions for devices that require sporadic access to the cellular network. Instead of switching off the module at the end of the data transfer, if...
  • Page 27: Timer Values

    SARA-R42 - Application note The selection of the requested T3324 timer value is a trade-off between power consumption and responsiveness. Low values save more battery life making it possible for the UE to enter PSM deep-sleep mode more quickly. High values of T3324 give some margin to the application server (AS) to respond to MO data sent by the UE before it enters PSM.
  • Page 28: Psm And Roaming

    SARA-R42 - Application note ☞ All other values are to be interpreted as multiples of 1 minute. Example: "00000100" = 4 x 2 s = 8 s 8.1.3 PSM and roaming When the module is registered on a roaming network (not a home network), and the default “Automatic network selection”...
  • Page 29: Deep-Sleep Mode

    SARA-R42 - Application note Command Response Description +CSCON: 0 At expiry of inactivity time on the network side, the RRC connection is released by the eNodeB. Both T3324 and T3412 timers are started with the assigned values. +UUPSMR: 1,1 At T3324 expiry the module can enter the PSM deep-sleep...
  • Page 30: Deep-Sleep Indications

    SARA-R42 - Application note the many retransmissions related to the Coverage Extension (CE) mode currently assigned to the UE. This can be checked via the +CEINFO AT command and the +CSCON URC. IP based applications (e.g., MQTT, USOCK, UDNS, UFTP, HTTP) instead have no control on deep-sleep.
  • Page 31 SARA-R42 - Application note reliable. 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, MT data delay and reliability. eDRX can be also used along with the PSM feature. In this case eDRX is used while the T3324 timer is running.
  • Page 32: Edrx Deep-Sleep And Paging Only Image

    SARA-R42 - Application note ☞ The 0000 and 0001 are only applicable in LTE Cat M1. If received in NB-IoT they need to be interpreted as if eDRX has not been granted by the network. ☞ The 0100, 0110, 0111 and 1000 values are only applicable in LTE Cat M1. If received in NB-IoT they need to be interpreted as the 0010 value.
  • Page 33 SARA-R42 - Application note depend on any previous RRC connection release. The negotiated T3324 and T3412 timers are also highlighted: eDRX is used during the T3324 active time. The device is in PSM deep-sleep state, not responsive to AT commands nor paging messages. It has already registered at startup, negotiating PSM timers.
  • Page 34: Monitoring Module Status

    SARA-R42 - Application note Monitoring module status 9.1 Retrieve and interpret diagnostic information It is recommended to track the module status in the host application. Such diagnostic information allows detection of specific scenarios and implementation of proper handling and countermeasures in the host application.
  • Page 35: Diagnostic Information Via Urcs

    SARA-R42 - Application note 9.1.1 Diagnostic information via URCs Command Description Can be polled AT+CSCON=1 +CSCON: 1 Return the status of the RRC connection (idle or connected). Persistent setting. AT+CREG=3 +CREG: <stat>[,[<lac>],[<ci>][,[<AcTStatus> Enable registration status URC for non-EPS services (for example, SMS) and ][,<cause_type>,<reject_cause>]]]...
  • Page 36: Diagnostic Information Via Polling

    SARA-R42 - Application note Command Description Can be polled AT+CEINFO=1 +CEINFO: <reporting>,<CE_enabled>,<UE_state Volatile setting, it reports variation of the Coverage extension mode and >,<downlink_repetition_factor>,<uplink_repe related transmission parameters (for example, repetitions schemes to be used) tition_factor>,<RSRP_value>,<CINR> detected by the device or assigned by the network.
  • Page 37 SARA-R42 - Application note Command Response (omitting OK) Description Suggested usage AT+COPS? +COPS: <mode>[,<format>,<oper>[,<AcT>]] It returns the current registered PLMN in the Periodically (30 s) and when detecting configured format, RAT is fixed to 7 (LTE, Cat- problems M1). AT+CGDCONT? +CGDCONT: <cid>,<PDP_type>,<APN>,<PDP_addr>...
  • Page 38: Full-Stack Watchdog: How To React To Unexpected Conditions

    SARA-R42 - Application note Full-stack watchdog: how to react to unexpected conditions The application shall properly handle communication or connectivity problems that can arise when using the module 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.
  • Page 39: Testing

    SARA-R42 - Application note 10 Testing 10.1 OEM production testing The +UTEST AT command is used for non-signaling testing to verify proper assembly of the module and the involved parts in the OEM production line. It is intended for use by the manufacturer of the host device integrating the module.
  • Page 40: Cellular Rf Functional Test

    SARA-R42 - Application note Command Response Description AT+UTEST=2,105060,5000 +UTEST: 105060,5000,0,-21,- Example 2: RX test executed on B12 TX, Ch. 105060, 20,-19 RX measurement on for 5 s. The signal input to the receiver is reported at -20 dBm. Table 12: Entering non-signaling mode with +UTEST After the desired tests have been executed, perform this to return to normal operating mode: •...
  • Page 41: Utest Rx And Tx Non-Signaling Test Sequence

    SARA-R42 - Application note Command Response Description AT+COPS=2 Deregister the module from the network. Enter the non-signaling mode again. AT+UTEST=1 AT+UTEST? +UTEST: 1 Check the module is in non-signaling mode. AT+CFUN? +CFUN: 5 Check +CFUN AT command is set to 5 to ensure the module is in test mode.
  • Page 42: Utest Rf Tx Non-Signaling Continuous Mode

    SARA-R42 - Application note Example of grouping TX and RX tests in non-signaling RF mode: Command Response Description TX test on B12, Ch. 123060, 23 dBm, 5 s on. AT+UTEST=3,123060,23,,,5000 +UTEST: 123060,23,5,1,5000 TX test on B12, Ch. 123095, 23 dBm, 5 s on.
  • Page 43 SARA-R42 - Application note Pin no Name Interface UART GPIO1 GPIO GPIO6 GPIO2 GPIO3 GPIO5 I2S_WA Audio I2S_TXD I2S_CLK I2S_RXD GPIO5 GPIO Table 15: List of pins available for +UTEST digital testing Below is an example of configuring GPIO 1 as output and set to high.
  • Page 44: Network Simulators Testing

    SARA-R42 - Application note Command Response Description AT+UTEST=10,1 (pin description returned) Gets the pin information. AT+UTEST=10,2,"000000000000 The command puts the module in Interface initialized 000000000600" state; the command saves the pins status to restore it at the end of the test. Pins enabled for testing: RTS pin...
  • Page 45: Sim

    SARA-R42 - Application note 11 SIM 11.1 Chip SIM For devices utilizing a physically soldered down chip SIM, consider what network or networks the device will connect to. More specifically, beyond the obvious intended end network(s) the device will deploy on, keep in mind the need to connect with a test network or base station simulator call-boxes, which may require a specific UICC profile to connect to.
  • Page 46: Sms

    SARA-R42 - Application note 12 SMS 12.1 Preferred message storage The factory-programmed value for SARA-R4 series modules is "ME" for the three memory parameters <mem1>, <mem2> and <mem3>. The setting can be set or read by the +CPMS AT command.
  • Page 47: Efs Backup & Restore

    SARA-R42 - Application note 13 EFS backup & restore Due to the nature of Flash memory, the Embedded File System (EFS) may incur memory corruption if the safe & graceful shutdown procedure outlined in the SARA-R4 series system integration manual is not followed.
  • Page 48: Efs Backup

    SARA-R42 - Application note 13.1.1 EFS backup The EFS backup can be initiated with the +UBKUPDATA AT command and will automatically trigger a backup process upon receiving the command. After this procedure is completed, the device will store status information that can be queried with an AT command. After the backup completion, no further action is required.
  • Page 49: Creating Backup After Flashing Fw Update With Delta Package

    SARA-R42 - Application note • The device goes into the non-signaling mode and is unable to exit with AT+UTEST=0 and +CFUN cannot change its state from a value of 5. This non-signaling state can be checked and detected with the +CFUN read command, where the device would return a value of 5.
  • Page 50: Restore Factory Configuration

    SARA-R42 - Application note 14 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.
  • Page 51 SARA-R42 - Application note Command Response Description AT+CFUN=16 Reboot the module. At next reboot, UART and +UPSV settings are reverted to the factory programmed values. Cancel a delete operation (before reboot) AT+UFACTORY=1,0 Set a +UFACTORY action. AT+UFACTORY? +UFACTORY: 1,0 Check the action currently set. At the...
  • Page 52: Specialized Application Notes By Topic

    SARA-R42 - Application note 15 Specialized application notes by topic 15.1 Multiplexer See the Mux implementation in cellular modules application note [8]. 15.2 IP based applications See the Internet applications development guide application note [5]. 15.3 Security suite See the Security suite application note [6].
  • Page 53: Migration Guide From Sara-R410M / Sara-R412M And Hints

    SARA-R42 - Application note 16 Migration guide from SARA-R410M / SARA-R412M and hints Below is a list of software changes between SARA-R410M / SARA-R412M and SARA-R422 / SARA-R422S / SARA-R422M8S 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-R4 series AT commands manual [2].
  • Page 54 SARA-R42 - Application note Command or SARA-R422 / SARA-R422S / SARA-R412M-02B-03 SARA-R410M-63B / SARA-R410M-02B-03 feature SARA-R422M8S SARA-R410M-73B / SARA-R410M-83B reapplied with UMNOPROF set command and set back to the changed via +UMNOPROF set command and set back to the command.
  • Page 55 SARA-R42 - Application note Command or SARA-R422 / SARA-R422S / SARA-R412M-02B-03 SARA-R410M-63B / SARA-R410M-02B-03 feature SARA-R422M8S SARA-R410M-73B / SARA-R410M-83B +ULWM2MSTAT Applied syntax (no spaces between the Applied syntax (spaces between the Applied syntax (spaces between the Applied syntax (spaces between the...
  • Page 56: Appendix

    SARA-R42 - Application note Appendix A Glossary Abbreviation Definition CHAP Challenge handshake authentication protocol Data Circuit-terminating Equipment* / Data Communication Equipment* Down Link (Reception) Discontinuous Reception Data Terminal Equipment eDRX Extended DRX Firmware Hardware LPWAN Low Power Wide Area Network...
  • Page 57: Related Documentation

    SARA-R42 - Application note Related documentation u-blox SARA-R4 series data sheet, UBX-16024152 u-blox SARA-R4 series AT commands manual, UBX-17003787 u-blox SARA-R4 series system integration manual, UBX-16029218 u-blox SARA-R4 FW update application note, UBX-17049154 u-blox Internet applications development guide application note,...
  • Page 58: Ubx-20050829 - R02

    SARA-R42 - Application note Contact For complete contact information, visit us at www.u-blox.com. u-blox Offices North, Central and South America Headquarters Asia, Australia, Pacific Europe, Middle East, Africa u-blox America, Inc. u-blox Singapore Pte. Ltd. u-blox AG Phone: +1 703 483 3180...

This manual is also suitable for:

Sara-r422Sara-r422sSara-r422m8s

Table of Contents