u-blox SARA R4
Configure the u-blox SARA modem to Monogoto
Last updated
Configure the u-blox SARA modem to Monogoto
Last updated
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 here.
Monogoto SIM
u-blox SARA R4XX cellular modem
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:
Set the error reporting to verbose, resulting in more descriptive error messages (optional):
Check the status of the SIM card. The correct response should be: +CPIN: READY
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.
Request generic device information:
The response includes information about the manufacturer, modem model, firmware revision, SVN (Software Version Number) and IMEI. Example response:
Request the modem firmware version:
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):
Request the ICCID (Integrated Circuit Card ID), which is the identification number of the SIM card:
It is possible to let the modem select the mobile network automatically, or to manually define a network to connect with.
To set the modem to automatic network selection enter:
Check the network and cellular technology the modem is currently using:
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.
Start by searching for available networks:
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:
To find which of the networks Monogoto has roaming agreements with, review the Coverage lists.
Check the network and cellular technology the modem is currently using:
Expected response: +COPS: 0,0,"<name of operator>",X
. The last digit indicates the cellular technology.
Manually set the network and the cellular technology:
Replace XXXXX
with the MCCMNC code of your operator, for example"20404"
for Vodafone NL. Use 7
for LTE Cat-M1.
+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.
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:
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:
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).
Set the APN to data.mono
:
Validate if the APN is set correctly:
Expected response: +CGDCONT: 1,"IP","data.mono","0.0.0.0",0,0,0,0,0,0
Activate the PDP (packet data protocol) context:
Test if the PDP context is activated:
Expected response: +CGACT: 1,1
Reboot the modem to activate the settings:
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
Followed by the command:
Example response:
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
.
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 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
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.