u-blox AWS IoT ExpressLink SARA-R5 Starter Kit User Manual

June 10, 2024
u-blox

AWS IoT ExpressLink SARA-R5 Starter Kit

AWS IoT ExpressLink SARA-R5 Starter Kit

The u-blox AWS IoT ExpressLink SARA-R5 Starter Kit provides access to AWS IoT Core and AWS IoT services over a cellular LTE-M (also known as LTE Cat M1) connection. The kit includes a u-blox AWS IoT ExpressLink SARA-R5 module mounted on a SparkFun MicroMod Asset Tracker Carrier Board into which a SparkFun MicroMod processor board can be inserted, allowing the module to be used with many different microprocessors.

IMPORTANT: this starter kit is for evaluation purposes only; it is NOT suitable for production use. The module included in the kit has not been provisioned for commercial use and supports limited features. Please see section 8 of the user manual for the supported features.

Getting Started

To use the u-blox AWS IoT ExpressLink SARA-R5 Starter Kit, follow the steps below:

Step 1: Set up your hardware

Follow the instructions in section 3.1 of the user manual to set up your host machine.

Step 2: Setup your AWS account and permissions for IoT development

Follow the instructions in section 4 of the user manual to set up your AWS account and permissions for IoT development.

Step 3: Registering AWS IoT ExpressLink SARA-R5 with your development

account

Follow the instructions in section 5 of the user manual to register the module with your AWS account.

Step 4: Connecting to and interacting with the AWS cloud

Follow the instructions in section 6 of the user manual to connect to and interact with the AWS cloud.

PLEASE BE PATIENT: Cellular is not like Wi-Fi, many radio bands must be searched, more than one network might need to be tried, all before a connection to the AWS service can even be attempted.
Please be patient, response times can be long, especially for commands such as AT+CONNECT, AT+SEND and AT+DISCONNECT.

UBX-21042016 – R02 C1-Public

Abstract
This document describes how to begin working with the u-blox AWS IoT ExpressLink SARA-R5 Starter Kit, which consists of a u-blox AWS IoT ExpressLink SARA-R5 module mounted on a SparkFun carrier board such that it can be used with a variety of microcontrollers or an attached PC. The u-blox AWS IoT ExpressLink SARA-R5 module provides communications over a cellular network anywhere that LTE-M (also known as LTE Cat-M1) service is available and presents a simple-to-use AT interface designed to allow even resource- constrained microcontrollers to connect to AWS IoT Core.

Document information

  • Title AWS IoT ExpressLink SARA-R5 Starter Kit
  • Subtitle Getting started guide for u-blox AWS IoT ExpressLink SARA-R5 Starter Kit
  • Document type Getting started
  • Document number UBX-21042016
  • Revision and date R02 1-Dec-2021
  • Disclosure restriction C1-Public

This document applies to the following products:
Product name: u-blox AWS IoT ExpressLink SARA-R5 Starter Kit

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.

Overview

The u-blox AWS IoT ExpressLink SARA-R5 Starter Kit provides access to AWS IoT Core and AWS IoT services over a cellular LTE-M (also known as LTE Cat M1) connection. The kit includes a u-blox AWS IoT ExpressLink SARA-R5 module mounted on a SparkFun MicroMod Asset Tracker Carrier Board into which a Sparkfun MicroMod processor board can be inserted, allowing the module to be used with many different microprocessors.

VERY IMPORTANT: you MUST complete the setup procedures of sections 3, 4, and 5 to configure the endpoint connecting to your development account. The process used in this prototype version is for the evaluation phase only and will be simplified in the commercial release.
IMPORTANT: this starter kit is for evaluation purposes only; it is NOT suitable for production use. The module included in the kit has not been provisioned for commercial use and supports limited features. Please see section 8 for the supported features.
PLEASE BE PATIENT: cellular is not like Wi-Fi, many radio bands must be searched, more than one network might need to be tried, all before a connection to the AWS service can even be attempted. Please be patient, response times can be long, especially for commands such as AT+CONNECT, AT+SEND and AT+DISCONNECT.

Hardware description

This evaluation kit is based upon the standard SparkFun MicroMod Asset Tracker Carrier Board but has the following critical differences:

  • The SARA-R5 module mounted on the board is a SARA-R510S, not a SARA-R510M8S, and hence the board (a) does NOT include GNSS functionality (and so is not provided with a GNSS antenna) and (b) does NOT power on automatically (see section 8 for the module power-on procedure),
  • The SARA-R5 module mounted on the board is loaded with AWS IoT ExpressLink firmware and hence offers the AWS IoT ExpressLink AT interface and NOT the usual u-blox AT interface,
  • Because of the above, the example code provided by SparkFun does not apply; instead see the AWS IoT ExpressLink example code here: https://github.com/aws/iot-expresslink,
  • The kit includes a Thingstream SIM card,
  • The SIG_INT (G5/bus 5/pin 73) signal of the MicroMod connector is connected to the GPIO3 pin of the SARA-R5 module.

Data sheet
The product description for the u-blox AWS IoT ExpressLink SARA-R5 Starter Kit can be found on the product page of the Sparkfun website.
Documentation for the u-blox SARA-R5 cellular module can be found on the SARA-R5 pages of the u­blox web site. All the information found there applies to the u-blox AWS IoT ExpressLink SARA-R5 module except the AT command manual; the AWS IoT ExpressLink programmers manual replaces the SARA-R5 AT command manual.
The hardware (pins, voltages, timings, power-on procedure etc.) of the u-blox SARA-R5 module and the u-blox AWS IoT ExpressLink SARA-R5 module is the same, with the following exceptions:

  • The UART flow control lines, RTS and CTS, are NOT used,
  • The EVENT pin, as defined by AWS IoT ExpressLink, is pin GPIO3 of the AWS IoT ExpressLink SARA-R5 module and is available on the SARA_INT (G5/bus 5/pin 73) signal of the MicroMod connector on the board,
  • The baud-rate of the UART is fixed at 115200.

This means that the power-on procedure for the u-blox AWS IoT ExpressLink SARA-R5 module is NOT the AWS one, it is the original u-blox SARA-R5 one and there is no WAKE pin, see section 8.

Standard kit contents

This kit includes:

  • The board with the SARA-R5 module,
  • A cellular antenna,
  • A Thingstream SIM card, which will have already been inserted into the board,
  • An Asset Tracker Update Tool M.2 board.

This is sufficient to allow you to use the u-blox AWS IoT ExpressLink SARA-R5 module from an attached PC via the USB-C interface.

The SIM card includes 250 Mbytes of data transfer with the cellular network and after that must be discarded.

Not covered in this getting started guide, but also included in this kit, is an ESP32 MicroMod board that can be plugged into the M.2 socket on the board, allowing you to experiment with driving the module from a microcontroller; please refer to the ESP32 documentation for how to develop software using the ESP32 chip.

User provided items
To use the board via an attached PC, and to power it from USB, a USB-C cable is required.

Third party purchasable items
A variety of other SparkFun MicroMod processor boards, each carrying a different microcontroller (e.g. nRF5, STM32F4, Raspberry Pi Pico, etc.) are available to plug into the M.2 socket on the carrier board to use the module directly.

Set up your hardware

Set up your hardware following the hook-up guide for the standard SparkFun MicroMod Asset Tracker Carrier Board, noting the differences described at the start of section 2.

Set up host machine
To drive the u-blox AWS IoT ExpressLink SARA-R5 Starter Kit from an attached host machine, which is ESSENTIAL during setup, you must plug the provided Asset Tracker Update Tool into the M.2 socket on the carrier board.

On the host machine you must install the drivers for the CH340 USB to UART bridge.

Open a terminal application on your host machine (e.g., TeraTerm or Docklight for Windows or CoolTerm for Mac) and select the port corresponding to the evaluation kit. Configure – the terminal application as follows – and take special note of the first three items:

  • End of line: line feed (i.e. 0x0a, not 0x0d)
  • Local echo: yes
  • Flow control: none
  • Baud rate: 115200
  • Bits: 8
  • Parity: none
  • Stop: 1

u-blox m-center and tools such as PuTTY will NOT work with the u-blox AWS IoT ExpressLink SARA-R5 module since those tools use carriage return as a line ending when sending to the module, not line feed.

For a quick check, turn the cellular module on by pressing the “SARA On” button on the carrier board for around one second. Your terminal window should show the welcome message Welcome to u-blox AWS IoT ExpressLink SARA-R5 from the cellular module1. In the terminal window type AT and press . If you receive the answer OK, congratulations! You have successfully connected the evaluation kit to your host machine.
Keep the terminal application open and connected, as it is needed for the subsequent steps.

Setup your AWS account and permissions for IoT development

Refer to the instructions at Set up your AWS Account. Follow the steps outlined at that link to:

  • Sign up for an AWS account,
  • Create a user and grant permissions,
  • Open the AWS IoT console.

Pay special attention to the notes.

Registering AWS IoT Express Link SARA-R5 with your development account

Setting up the module
Before a cellular module can be registered with your development account for the first time, it must have registered with the cellular network for the first time. Ensure that:

  • The provided Thingstream SIM is inserted in the board,
  • A cellular antenna is connected to the antenna connector marked “LTE”,
  • You are in range of a cellular network that supports LTE-M,
  • The board is connected to a host machine using the USB-C connection,
  • A serial terminal application configured as specified in section 3.1 is running on the host machine.

Then a “dummy” CONNECT is performed as in the following steps:

  1. In the AWS IoT Console, choose Settings (bottom left of the navigation bar) and copy your account “Endpoint” string from “Device data endpoint”.

  2. Press the “SARA On” button on the carrier board for around one second to power the cellular module on; the white “On” LED should light. After a short while, in your terminal application the text Welcome to u-blox AWS IoT ExpressLink SARA-R5 should appear.

  3. In the terminal application type the command AT+CONF EndPoint=<your endpoint string from step 1 here> and press .
    ⚠ The configuration parameter name EndPoint is case sensitive.
    You should get OK back.4. In the terminal application, type the command AT+CONNECT and press . This will take

  4. In the terminal application, type the command AT+CONNECT and press . This will take a long time and should fail. The exact expected response is ERR14 UNABLE TO CONNECT Certificate generation completed. Proceed to register device with AWS cloud and then try to connect again. On this very first cellular connection the module may take some considerable time to find LTE-M network service; many minutes, up to 15 minutes. This is because the device does not yet know the radio environment and must search all of the global LTE-M RF bands on each visible cellular network. Connections should be quicker on subsequent attempts as the module will remember how it gained service previously.

If you get an error response that is different than the one shown above (e.g., just ERR14 UNABLE TO CONNECT), then the cellular connection has not been successful, and you should try again. See section 7 for troubleshooting advice.

With these steps completed, the cellular module has in fact successfully connected to the cellular network for the first time and registered with the necessary u-blox servers to create the certificates you will need to register it with your AWS account in the next steps (after which you should get OK 1 CONNECTED back to your AT+CONNECT attempts). Please proceed to section 5.2.

Registering with your AWS account
To create an IoT Thing and add it to your account, you will need to retrieve the u-blox AWS IoT ExpressLink SARA-R5 module ThingName and its corresponding certificate. Please follow the steps below.

  1. Open the AWS IoT Console. Select Manage then select Things.

  2. Click Create things, select Create single thing and click Next.

  3. With the u-blox AWS IoT ExpressLink SARA-R5 module still switched on, In the terminal application type the command AT+CONF? ThingName and press .
    ⚠ The configuration parameter name ThingName is case sensitive.

  4. Copy the sequence of numeric characters (i.e., the equivalent of “357862090000000” in the image above) from the terminal. On the Specify thing properties page, paste the copied string from the terminal into the Thing name under Thing properties in the console. Leave the other fields as default, then click Next.

  5. In the terminal application type the command AT+CONF? Certificate and press .
    ⚠ You must use the name Certificate and NOT the more recently introduced Certificate pem, which is not supported/necessary in this release.

  6. Copy the returned string, including —–BEGIN CERTIFICATE—– and —–END CERTIFICATE— — but not including the line beginning with OK, into a text file on your host machine named “Thing Name. cert. pem”.

  7. On the Configure device certificate page, select Use my certificate and choose CA is not registered with AWS IoT.

  8. Under Certificate, select Choose file and upload the file “Thing Name .cert .pem” from step 6.

  9. Under Certificate status, select Active and click Next.

  10. Click Create policy and a new browser tab will open:

  11. Type in a policy name of your choosing (e.g., “IoTDevPolicy”) and click Advanced mode.

  12. Replace the contents of the black console area that appears with the single line of text below:
    { “Version”: “2012-10-17”, “Statement”: “Resource”: “” } ] }{ “Effect”: “Allow”, “Action”: “”, …then click Create to create the policy. Note: the examples in this document are intended only for development environments. All devices in your fleet must have credentials with privileges that authorize only intended actions on specific resources. The specific permission policies can vary for your use case. Identify the permission policies that best meet your business and security requirements. For more information refer to Example IoT Policies and Security Best Practices.

  13. Return to the original browser tab, select the policy you just created (you can close the policy creation tab now) and click Create thing to complete your Thing creation.

  14. Congratulations! You have successfully created a new Thing in your AWS account.

  15. Return to the terminal application, type the command AT+CONNECT once more and press . After a short while you should receive the response OK 1 CONNECTED. Congratulations! You have successfully connected to your AWS cloud account.

  16. To close the connection, type the command AT+DISCONNECT in the terminal application and press . After a short while you should receive the response OK 0 DISCONNECTED.

Completion
Congratulations! You have completed the registration of the evaluation kit as a Thing in your IoT account. You will not need to repeat these steps the next time you connect, as the u-blox AWS IoT ExpressLink SARA-R5 module will remember its configuration and will be ready to connect to your AWS account automatically.

Connecting to and interacting with the AWS cloud

We will use the MQTT client in the AWS IoT console to help us monitor the communication between your evaluation kit and the AWS Cloud.

  1. Navigate to the AWS IoT console and select Test from the navigation pane to open the MQTT test client.
  2. In Subscribe to a topic, enter # as the Topic filter and then click Subscribe.

Connecting
With the u-blox AWS IoT ExpressLink SARA-R5 module switched on, in the terminal application, establish a secure connection by typing the command AT+CONNECT and pressing .
After a while, you should receive the response OK 1 CONNECTED. Some cellular networks will refuse service to a device for a “guard time” (e.g., 1 hour) if the device is seen to connect and disconnect [again] more than a handful of times in quick succession; frequent connections/disconnections should be avoided.

Sending data to the AWS cloud
To send a “Hello World!” message, in the terminal application type the command AT+SEND data Hello World! and press .

After a short while, you should receive the response OK.

You should see the Hello World! message appear on the AWS IoT console under the topic data. In poor coverage conditions there may be up to a 30 second delay between the message arriving in the AWS IoT console and OK being returned in the terminal application.

Receiving data and commands from the AWS cloud
To receive messages on your device, in the terminal application type the command AT+CONF Topic1=/MyTopic and press .
You should receive the response OK. The AT+CONF TopicX command is NOT persistent across power-cycles of the device.
Next, type the command AT+SUBSCRIBE1 and press ; you should receive the response OK. You must re-subscribe after an AT+DISCONNECT or after powering-down the module.

From the AWS IoT console MQTT test client, select Publish to a topic, type /MyTopic into the Topic name field (replacing the # that was there), under Message payload enter Hello from the AWS IoT console and then click Publish.

Wait for a handful of seconds for the message to arrive at the device (or monitor the EVENT pin) and then, in the terminal application, type the command AT+GET1 and press .
You should receive the response OK Hello from AWS IoT console.

Exchanging Thing-specific data and commands with the AWS cloud
If you leave the leading / off the topic name then the Topic Root, which defaults to the Thing Name, will automatically be prepended to the subscription.
For instance, if you typed the command AT+CONF Topic2=My Topic (i.e., leaving off the leading /) and pressed , then subscribed to that topic by typing the command AT+SUBSCRIBE2 and pressing :

…then in the AWS IoT console MQTT test client, under Publish to a topic, you typed /ThingName/MyTopic into the Topic name field and, under Message payload, entered Hello just to ThingName (or any message you like) and then clicked Publish:

…and then a few seconds later, in the terminal application, you typed the command AT+GET2 and pressed , you should receive the response OK Hello just to Thing Name.

You can also send to a TopicX using the command AT+SENDx ; if that TopicX does not start with a leading / then your entire send/get exchange will automatically occur beneath the unique ThingName of this device.

Troubleshooting

Problem Action
No lights come on. Ensure power is supplied to the board, e.g., via the USB-C

connector.
No welcome message is displayed when an AT terminal application is attached to the board.| Check that the white LED marked “On” is illuminated; the cellular module does NOT come on automatically when the board is powered, you must press the “SARA On” button for around one second to power the module on.

Also make sure that the baud rate of your terminal application is set to 115200.

I don’t see anything in the terminal

application when I type in it.

| The AWS IoT ExpressLink specification does not include echoing of received characters, which is normal for a “machine”-oriented interface; when typing in commands manually, please set “local echo” on in your terminal application so that you can see what you’re doing.
I can’t use backspace or delete or the cursor keys to edit my AT commands when typing in the terminal application.| The AWS IoT ExpressLink specification does not support use of editing keys; it is meant to be used by a microcontroller, another machine, which would have no use for editing keys. If you find this irritating when typing in commands manually, then you should find a terminal application that holds the entire command string locally, in the application, allowing you to edit it, and only sends the command string once is pressed.
No response is received to any AT commands typed in the terminal application.| Make sure that the baud rate of your terminal application is set to 115200 and that AT commands are formed exactly as defined in the AWS IoT ExpressLink programmers manual: the line ending must be line feed (0x0a); carriage return (0x0d) and carriage return followed by line feed (0x0d 0a) cannot be used.
The AT command CONNECT does not work.| Make sure that the supplied SIM card is inserted in the board, an antenna is connected to the antenna socket on the board (the one marked “LTE”, not the GNSS one) and that you are within range of a cellular network that provides LTE-M coverage.

Make sure that you have followed the registration procedure of section 5, including registering your device in your AWS account; the connection is to the endpoint of the device in that account (not just the cellular network) and so it cannot succeed until all of the registration steps have been completed.

If CONNECT has worked in the past but is now failing in the same location and

after using the device for some while, it may be that the cellular network has

decided to refuse service for a “guard time” (e.g. 1 hour) because the device has connected and disconnected [again] more than a handful of times in quick succession; unfortunately there is nothing that can be done about this (other than avoiding many connections/disconnections), it is a network “feature”.

The AT command SEND returns OK even when I have disconnected the cellular antenna and so I am plainly not in coverage.| Messages are queued until it is possible to send them; if you reconnect the cellular antenna, you should find that the messages will be successfully published. If you do not do so, or you disconnect or reset the device, the queued messages will be lost.
Setting a topic with the AT command CONF TopicX (where X is 1 to 16) returns an error.| While a topic is subscribed-to it cannot be modified; please use the AT command UNSUBSCRIBEX to unsubscribe from topic X before modifying it.
The AT commands CONFMODE, OTA, HOTA and WHERE do not work.| These AT commands are not supported in this preview release.
Some parameters to the CONF command do not work.| Only parameters that are relevant to a cellular device, and are not required only by OTA or HOTA, are supported; see section 8 for a full list.
Issuing the SLEEP AT command does not reduce the power consumption of the board.| In this preview release the SLEEP command is accepted for compatibility purposes but does not actually put any hardware into a low power state.
The AT command TIME? does not work.| You must be connected to the cellular network to obtain the time. If the problem happens when you are connected, then the cellular network you are using does not support reporting of time to the mobile terminal (the feature is optional in the network).
Some downlink messages from the server are going missing.| Make sure that no downlink message exceeds 2048 bytes in size; in this release any downlink message larger than 2048 bytes in size will be silently discarded.
Messages larger than around 512 bytes in size cannot be sent.| The maximum AT command length in this release is 512 bytes and hence this limits the maximum length of MQTT message that can be sent.

Features supported

The firmware provided on the u-blox AWS IoT ExpressLink SARA-R5 module in this evaluation kit is a preview release and hence it does NOT support all the features of the AWS IoT ExpressLink command set. The following commands are supported:
CONNECT, DISCONNECT, SLEEP2, RESET, FACTORY_RESET, SEND3, GET4, SUBSCRIBE, UNSUBSCRIBE, CONF, EVENT, DIAG, TIME5.

For the avoidance of doubt, the following commands are not currently supported:
CONFMODE, OTA, HOTA, WHERE.

  • OTA of the module is supported but only through u-blox uFOTA since it must work within the constraints applied by the cellular network operators.
    For the CONF command, only the following parameters are supported:
    About, Version, ThingName, Certificate (without pem after it), EndPoint, APN, TopicRoot, TopicX (where X is 1 to 16, i.e., MaxTopic is 16).

  • The power-on behavior of the module is defined by the underlying SARA-R5 HW, i.e. the module does not power on until the PWR_ON pin is asserted for 1 second and then released, see the u-blox SARA-R5 data sheet for more details; the pin MUST be released as if it is held for more than 16 seconds an emergency restart of the module will be performed. On the SparkFun MicroMod Asset Tracker board a “SARA On” button is provided which will assert the PWR_ON pin while pressed.

  •  The PWR_ON pin is a toggle, i.e., if it is asserted for 1 second and then released while the module is powered on then the module will power off again. It is ALWAYS a good idea to power the module off in this way before physically removing power.

  • From the perspective of the SARA-R5 module, “asserted” means “pulled low” but the SparkFun MicroMod Asset Tracker Carrier Board includes an inverter in the line and hence, from the perspective of an MCU on a MicroMod processor board, asserted means “held high”.

  • The behavior of the WAKE pin described in the AWS ExpressLink documentation is not supported.

  • The behavior of the RST pin described in the AWS ExpressLink documentation is offered by the RESET_N pin of the module. On the SparkFun MicroMod Asset Tracker Board a “Reset” button is provided that will effect a reset of the module.

    • 2 While the command is supported the module does NOT currently enter a low power state, i.e. the command is only “emulated”.
    • 3 The maximum AT command-line length in this release is 512 bytes, which will set a limit on the maximum size of an MQTT message being sent.
    • 4 The maximum receive message size is 2048 bytes.
    • 5 Must be connected to work and not all cellular networks support indication of time to the mobile terminal.

Related documentation

  1. AWS IoT ExpressLink website
  2. AWS IoT ExpressLink SARA-R5 Starter Kit product page
  3. AWS IoT ExpressLink programmers manual
  4. AWS IoT ExpressLink example code
  5. u-blox SARA-R5 series data sheet, UBX-19016638
  6. u-blox SARA-R5 series system integration manual, UBX-19041356
  7. ESP32 development guide

For product change notifications and regular updates of u-blox documentation, register on our website, www.u-blox.com.

Revision history

Revision Date Name Comments
R01 30-Nov-2021 rmea Initial release.
R02 01-Dec-2021 rmea Correct picture in section 5.2 sub-bullet 9. Some

minor style corrections.

Contact
For complete contact information, visit us at www.u-blox.com.

u-blox Offices

North, Central and South America u-blox America, Inc.

Regional Office West Coast:

Technical Support:

Headquarters Europe, Middle East, Africa u-blox AG

Asia, Australia, Pacific

Regional Office Australia:

Regional Office China (Beijing):

Regional Office China (Chongqing):

Regional Office China (Shanghai):

Regional Office China (Shenzhen):

Regional Office India:

Regional Office Japan (Osaka):

Regional Office Japan (Tokyo):

Regional Office Korea:

Regional Office Taiwan:

References

Read User Manual Online (PDF format)

Read User Manual Online (PDF format)  >>

Download This Manual (PDF format)

Download this manual  >>

Related Manuals