Menu

Expand
Rate this page:

Works with Super SIM: u-blox SARA-R5

The u-blox SARA-R5 is a family of cellular modules based on u‐blox’s UBX-R5 cellular chipset and M8 GNSS receiver chip. SARA-R5 series modules support Cat-M1 and NB-IoT, and — together with Super SIM — deliver great connectivity optimized for IoT applications.

The SARA-R5 family members

  • SARA-R500S — Multi-regional Cat-M1/NB-IoT module.
  • SARA-R510S — Multi-regional Cat-M1/NB-IoT module for ultra-low power applications.
  • SARA-R510M8S — Multi-regional Cat-M1/NB-IoT module with integrated u-blox M8 GNSS receiver.

Learn more about the SARA-R5 series of modules on the u-blox website.

Update your R5’s firmware to version 3.15 or above for use with Super SIM. You can check the installed version with AT+GMR. Please see the SARA-R5 AT commands manual to learn how to update the module.

Get started with SARA-R5 and Super SIM

The best way to begin working with the SARA-R5 is to take advantage of u-blox’s EVK-R5 developer kit. It features powerful and easy‐to‐use tools in an environment specifically designed for the development and testing of cellular and GNSS applications based on the SARA-R5. It includes a USB interface and a built‐in u‐blox GNSS receiver module for SARA-R5 variants that do not feature an integrated unit. The kit can be connected to and used with a Windows 10, Linux or macOS computer.

The u-blox EVK-R5 developer kit

The EVK-R5 can be obtained from the following recommended suppliers:

If you obtain your developer kit from a third-party, including Digikey and Mouser, please confirm they have the 01B version before purchasing. This version includes the module’s latest production firmware.

Working with the EVK-R5 and SARA-R5 requires a configured Super SIM. If you haven’t set up your Super SIM in the Console, please do so now. The Super SIM First Steps guide has help if you need it.

1. Connect the EVK-R5 to your computer

  1. Slot a Super SIM into the board’s SIM holder. It takes a standard-sized SIM, or a micro- or nano-SIM first fitted into an adapter:
    Fit a Super SIM into the EVK-R5's SIM holder
  2. Connect the supplied LTE antenna to the ANT connector on the SARA-R5 daughtercard:
    Connect the LTE antenna to the EVK-R5
  3. Connect the EVK-R5 to your computer by the supplied mini USB cable. Use the mini USB connector alongside the GNSS daughtercard:
    Connect the mini USB cable
  4. Connect the EVK-R5 to power using the supplied AC adapter.
  5. Turn the board on by flipping the power toggle:
    Power on the EVK-R5 with the toggle switch

2. Access the EVK-R5 from your computer

  1. Open your distribution’s terminal app.
  2. Confirm connection with ls /dev/ttyUSB* — you should see four devices listed /dev/ttyUSBx where x is 0 through 3:
    u-blox EVK-R5 developer kit -- find the device on your Linux computer

    The USB-to-serial device you’ll use to communicate with the EVK-R5 is /dev/ttyUBS2.
  3. Using a serial tool like minicom — you will have to install this separately from source or a package manager like apt — access the board with minicom -o -D /dev/ttyUSB2.
  1. Open the Terminal app.
  2. Confirm connection with ls /dev/cu* — you should see four devices listed /dev/cu.usbserial-FTCSUXUXx where x is 0 through 3:
    u-blox EVK-R5 developer kit -- find the device on your computer

    The USB-to-serial device you’ll use to communicate with the EVK-R5 is /dev/cu.usbserial-FTCSUXUX2.
  3. Using a serial tool like minicom — you will have to install this separately from source or a package manager like Homebrew — access the board with minicom -o -D /dev/cu.usbserial-FTCSUXUX2
  1. Windows 10’s Device Manager will show the EVK-R5 as two USB Serial Ports in the Ports (COM & LPT) section. Try each one in turn, the lowest number first. Note its port’s COM number:
    u-blox EVK-R5 developer kit -- windows setup -- device manager
  2. Right-click on the Pico’s entry in the Device Manager list and select Properties.... Select the Port Settings tab and note the Bits per second: value:
    u-blox EVK-R5 developer kit -- windows setup -- port properties
  3. Download and install PuTTY a terminal emulator for Windows.
  4. Run PuTTY, select Serial under the Connection type, and enter the COM number (as, for example, COM5) in the Serial line field. Make sure the Speed field is set to match the Bits per second: value you got from Device Manager:
    u-blox EVK-R5 developer kit -- windows setup -- putty
  5. Click Open.
  6. When you see references to Minicom in the remainder of the tutorial, perform the tasks using your open PuTTY window.

3. Check your current carrier

Within minicom or PuTTY, enter the AT command AT+COPS? to see which carrier your SARA-R5 is connected through:

Check the connected carrier

Useful AT commands

Firmware

Update your R5’s firmware to version 3.15 or above for use with Super SIM. You can check the installed version with AT+GMR. Please see the SARA-R5’s AT commands manual to learn how to update the module.

Initialization

The SARA-R5 supports LTE Cat-M1 and NB-IoT in bands 1, 2, 3, 4, 5, 8, 12, 13, 18, 19, 20, 25, 26, 28, 66, 71 and 85. Super SIM is compatible with Cat-M1 but not NB-IoT. It’s therefore important to ensure that your SARA-R5 is set to operate using Cat-M1 only.

SARA-R5 supports the use of only a single cellular Radio Access Technology (RAT) at a time, so if Cat-M1 is selected and no suitable network is available, the module will not attempt to connect using NB-IoT. Consequently, if you have set the module to use NB-IoT, it will never connect until Cat-M1 is set as the favored RAT.

By default, all current SARA-R5 variants prioritize Cat-M1, but you can set this manually by issuing the command AT+URAT and specifying the value 7. You should apply the value using the following command sequence:

AT+CFUN=0
AT+URAT=7
AT+CFUN=16

The AT+CFUN commands first disable cellular operation and, lastly, re-enable cellular operation after first rebooting the module. The reboot is required to persist the specified RAT value.

Set the APN

Issue this AT command first to apply the Super SIM Access Point Name (APN):

AT+CGDCONT=1,"IP","super"

The SARA-R5 enables roaming automatically.

Establish a data connection

The following commands can be used to establish a PDP context once the APN has been set:

AT+CGACT=1,1
AT+UPSD=0,0,0
AT+UPSD=0,100,1
AT+UPSDA=0,3

Line two must match the PDP type set in the above AT+CGDCONT command. For example, the latter includes "IP" to select IPv4, so the final parameter of AT+UPSD=0,0,0 must also indicate IPv4, i.e., 0.

Line three maps the module’s internal packet-switched data (PSD) profile, 0, to the PDP context ID, 1, set with the AT+CGDCONT command shown above. For more information on SARA-R5 PSD profiles, please see the SARA-R5 Internet Applications Development Guide.

Line four activates PSD profile 0, and will return +UUPSDA: 0,"aaa.bbb.ccc.ddd" where aaa.bbb.ccc.ddd is your device’s IP address.

Perform a ping

Issue the u-blox specific command AT+UPING=<TARGET_IP_ADDRESS_OR_NAME> to ping a server. Using one of Google’s DNS servers as an example, this will yield:

AT+UPING="8.8.8.8"
OK

+UUPING: 1,32,"dns.google","8.8.8.8",109,1105
+UUPING: 2,32,"dns.google","8.8.8.8",109,271
+UUPING: 3,32,"dns.google","8.8.8.8",109,238
+UUPING: 4,32,"dns.google","8.8.8.8",109,216

By default, +UPING issues only four pings.

Perform an HTTP GET

To perform an HTTP GET using the SARA-R5’s built-in HTTP client:

  1. Set up a data connection as described above.
  2. Reset the parameters of HTTP profile 0 to the defaults: AT+UHTTP=0.
  3. Configure the HTTP server name: AT+UHTTP=0,1,"api.ipify.org".
  4. Perform a GET request using profile 0 and store the result in the file test.ffs: AT+UHTTPC=0,1,"/","test.ffs".
    • The modem will respond with +UUHTTPCR: 0,1,1. This may take a moment or two as the server’s DNS name is resolved and then the HTTP request is issued.

The file test.ffs will contain the response from the server. Request the file by issuing AT+URDFILE="test.ffs". This will yield:

+URDFILE: "test.ffs",178,"HTTP/1.1 200 OK
Server: Cowboy
Connection: close
Content-Type: text/plain
Vary: Origin
Date: Mon, 14 Mar 2022 11:54:03 GMT
Content-Length: 11
Via: 1.1 vegur

3.239.194.9"
OK

This example uses a service that returns the IP address of the requester.

Use low-power modes

While the SARA-R5 supports low-power modes for eDRX and PSM, support for these features will vary by visited network and location. The commands to enable each of these settings on the SARA-R5 are, respectively:

AT+CEDRXS=1
AT+CPSMS=1

Both settings, but especially PSM, can prevent the modem from being accessible through the terminal during its sleep time. It’s best to experiment with these features with the modem local. To disable all power saving if needed, send:

AT+CEDRXS=0
AT+CPSMS=0

You can learn more about implementing these modes in our power optimization documentation and by consulting the SARA-R5 AT commmands manual.

Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

Thank you for your feedback!

Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

Sending your feedback...
🎉 Thank you for your feedback!
Something went wrong. Please try again.

Thanks for your feedback!

thanks-feedback-gif