u-blox SARA R4
Configure the u-blox SARA modem to Monogoto
The u-blox SARA R4 series supports LTE-M, NB-IoT and EGPRS. When using the SODAQ SARA development kit, you can jump to the tutorial on

Quick Navigation

Prerequisites

  • Monogoto SIM
  • u-blox SARA R4XX cellular modem

Connect the u-blox SARA to Monogoto

Keep the AT Commands manual next to you for more details about the commands. Click here to download the latest version.
Reset the modem to its default configuration:
1
AT+CFUN=1,1
Copied!
Set the error reporting to verbose, resulting in more descriptive error messages (optional):
1
AT+CMEE=2
Copied!
Check the status of the SIM card. The correct response should be: +CPIN: READY
1
AT+CPIN?
Copied!
If you receive an error, the SIM may not be inserted properly or the SIM is protected with a PIN. By default, Monogoto SIMs are not PIN protected.

Query device information

Request generic device information:
1
ATI
Copied!
The response includes information about the manufacturer, modem model, firmware revision, SVN (Software Version Number) and IMEI. Example response:
1
Manufacturer: u-blox
2
Model: SARA-R412M-02B
3
Revision: M0.12.00 [Jan 01 2030 12:00:00]
4
SVN: 07
5
IMEI: XXXXXXXXXXXXXXX
6
​
7
OK
Copied!
Request the modem firmware version:
1
ATI9
Copied!
This command returns the modem firmware as well as the application firmware, e.g. M0.12.00,A.02.19. Validate if you have the latest firmware running by going to the u-blox website and scrolling down to the section Product Change Note. Find the document which relates to your specific modem model.
Request the IMSI (International Mobile Subscriber Identity):
1
AT+CIMI
Copied!
Request the ICCID (Integrated Circuit Card ID), which is the identification number of the SIM card:
1
AT+CCID
Copied!

Network Configuration

It is possible to let the modem select the mobile network automatically, or to manually define a network to connect with.

Option 1: Automatic network selection

To set the modem to automatic network selection enter:
1
AT+COPS=0
Copied!
Check the network and cellular technology the modem is currently using:
1
AT+COPS?
Copied!
Expected response: +COPS: 0,0,"<name of operator>",X. The last digit indicates the cellular technology:
0: indicates GSM 3: indicates GSM/GPRS with EDGE availability 7: indicates LTE-M 9: indicates NB-IoT
The modem needs some time to search and select a network. If the modem responds with +COPS: 0 wait for a minute and try again.

Option 2: Manual Network Selection

Start by searching for available networks:
1
AT+COPS=?
Copied!
It may take several minutes before the modem responds.
The modem responds with the names and the MCCMNC codes of the available networks. It also shows the cellular technologies the networks support:
Example response:
1
+COPS: (2,"vodafone NL","vodafone","20404",7),(1,"NL KPN","NL KPN","20408",7),(1,"NL KPN","NL KPN","20408",0),(1,"vodafone NL","voda NL","20404",0),(1,"T-Mobile NL","TMO NL","20416",0),(1,"T-Mobile NL","TMO NL","20416",7),,(0,1,2,3,4),(0,1,2)
Copied!
To find which of the networks Monogoto has roaming agreements with, review the Coverage lists.
To find the profile of your SIM, visit the Monogoto Console, open the page Things
and select a specific Thing. Scroll down to Mobile Identities to find your profile in the column Network Provider Name.
​
​
Check the network and cellular technology the modem is currently using:
1
AT+COPS?
Copied!
Expected response: +COPS: 0,0,"<name of operator>",X. The last digit indicates the cellular technology.
Manually set the network and the cellular technology:
1
AT+COPS=1,2,"XXXXX",7
Copied!
Replace XXXXX with the MCCMNC code of your operator, for example"20404" for Vodafone NL. Use 7 for LTE Cat-M1.

Check the radio signal strength and signal quality:

1
AT+CSQ
Copied!
+CSQ returns 2 values separated by a comma. The first value represents the signal strength and provides a value between 0 and 31; higher numbers indicate better signal strength. The second value represents the signal quality indicated by a value between 0 and 7. If AT+CSQ returns 99,99, the signal is undetectable or unknown.

Define the cellular band(s) (optional)

It is possible to lock the modem to one or more specific bands. This may result in a faster boot cycle as the modem does not need to scan for available bands at startup.
Supported LTE-M bands u-blox R412M: 2, 3, 4, 5, 8, 12, 13, 20, 26, 28
Supported LTE-M bands u-blox R410M: 1, 2, 3, 4, 5, 8, 12, 13, 18, 19, 20, 25, 26, 28
Although the modem may support many different bands, your local network operator may not. Have a look at the LTE Cat-M1 overview to find the available band(s) in your region.
To lock the modem to a specific band, a bandmask needs to be sent to the modem indicating which band(s) should be enabled. This can be done using the following command:
1
AT+UBANDMASK=0,<bandmask>
Copied!
Example of creating the bandmask:
To lock the modem to band 3 and 8, create an array or bits where bit 3 and 8 are a 1 (counted from right to left): 10000100
When converting the binary number to decimals, you get the number: 132. This is your bandmask.
To test if the band(s) is properly set, enter the command:
1
AT+UBANDMASK?
Copied!
Example response: +UBANDMASK: 0,524420,1,524420
0 represents LTE Cat-M1 followed by the bandmask indicating the bands. 1 represents NB-IoT. Convert the decimal number to binary number to find out which bands the modem is locked to. 524420 as a binary number is: 10000000000010000100, indicating that the band is locked to band 3, 8 and 20 (count the bits from right to left).

Network Activation

Set the APN to data.mono:
1
AT+CGDCONT=1,"IP","data.mono"
Copied!
Validate if the APN is set correctly:
1
AT+CGDCONT?
Copied!
Expected response: +CGDCONT: 1,"IP","data.mono","0.0.0.0",0,0,0,0,0,0
Activate the PDP (packet data protocol) context:
1
AT+CGACT=1,1
Copied!
Test if the PDP context is activated:
1
AT+CGACT?
Copied!
Expected response: +CGACT: 1,1
Reboot the modem to activate the settings:
1
AT+CFUN=15
Copied!
To test what cellular technology and what band the modem is using, request the network environment information:
This command is not supported by all modem versions. To find your modem version, enter ATI and look and the line Revision
NOT supported by R412M version L0.0.00.00.05.06, L0.0.00.00.05.08 and L0.0.00.00.05.11
NOT supported by R412M version M0.09.00, M0.10.00 and M0.11.01
1
AT+UCGED=2
Copied!
Followed by the command:
1
AT+UCGED?
Copied!
Example response:
1
+UCGED:2
2
6,204,4,6300,20,10,10,546b,235,-89,-11,129,-1,3,255,64,"D2EAE081"
Copied!
The first variable shows the cellular technology used: 2 indicates 2G, 6 indicates LTE Cat-M1, 7 indicates NB-IoT. When you see 5 , run the command AT+UCGED=2 again and retry. The fifth variable indicates the band, in the example you see the modem using band 20.

Validate if your device received an IP address:

1
AT+CGPADDR
Copied!
Expected response: +CGPADDR: 1,XX.XXX.XX.XXX
Do you see an IP address? Congratulations! You’ve successfully connected the u-blox modem to Monogoto πŸŽ‰

Visit the Monogoto Console to inspect the device logs

Visit the Monogoto Console and click on Things. Select the Thing you are working on. Scroll down to the Events section to validate if the device established a connection. You should see something like: Success authenticate_pdp_context
To find the ICCID of the SIM card, enter the command AT+CCID

Useful Links