How to Send Data to the Cloud
Connecting the SiLabs XBee3 LTE-M Expansion Kit to Medium One IoT Cloud

Image Source: Fit Ztudio/shutterstock.com
By Greg Toth for Mouser Electronics
Published June 10, 2020
The Silicon Labs XBee3® LTE-M Expansion Kit contains a pre-certified LTE-M modem from DIGI that provides cellular Internet connectivity to the cloud. When combined with the EFM32™ Giant Gecko 11 Starter Kit, it provides a flexible IoT development platform for sensing, processing, and control applications communicating wirelessly over LTE-M cellular networks. The Medium One IoT Platform is a cloud-based IoT platform designed to help early-stage developers prototype IoT projects or connect existing hardware to the cloud. In this project, we’ll set up an IoT development environment using the XBee3 LTE-M and EFM32 Giant Gecko GG11 to read temperature, humidity, and pressure sensors, and send the data to the Medium One cloud where it can be processed and viewed using programmable workflows and configurable widget dashboards.
Project Materials and Resources
The project BOM lists components used in this project. Additional hardware and software development tools are also identified.
Project Bill of Materials (BOM)
- 634-SLEXP8021A - Silicon Labs XBee3 LTE-M Expansion Kit
- 634-SLSTK3701A - Silicon Labs EFM32 Giant Gecko GG11 Starter Kit
- 349-M1IOTPROTO - Medium One Prototyping Sandbox subscription
- 888-XBIB-CU-TH - DIGI XBee XBIB-C Development Board (optional for updating LTE-M modem firmware if needed)
Hardware
- Personal computer (PC) running Microsoft Windows®, MacOS, or Linux
Accounts and Software
- Web browser for accessing software download sites and Medium One IoT Platform
- Login account for the Medium One IoT Platform
- Login account for the Hologram SIM provisioning platform
- Login account for Silicon Labs to allow downloading software
- Silicon Labs Simplicity Studio 4 Integrated Development Environment (IDE)
- Application project files available in GitHub repository
- Serial terminal program such as Tera Term on the PC (optional)
Project Technology Overview
Silicon Labs XBee3 LTE-M Expansion Kit
The Silicon Labs LTE-M Expansion Kit (Figure 1) is an add-on board that features the DIGIâ XBee3â LTE-M cellular modem for low-power, long-range, mobile, and secure cloud-connected IoT. The kit contains an expansion board with radio board socket, FCC and carrier-certified XBee3 radio board, GNSS receiver, global SIM card, and LTE-M patch antenna. The included SIM card can be activated on the Hologram cellular provisioning platform and includes an initial amount of LTE-M data bandwidth for prototyping. Additional cellular bandwidth can be added for a charge. The LTE-M service carrier is configurable and the modem and SIM will default to the strongest signal. The board's ESP header allows it to be connected to a Silicon Labs EFM32 Giant Gecko GG11 board for application development and control. The modem can be controlled using AT commands or API frames and includes onboard MicroPython programmability for custom scripting directly on the modem. DIGI's free multi-platform XCTU utility program can be used to configure the modem and perform maintenance operations such as firmware updates.
More detailed information about the board can be found here, here, and here.

Figure 1: Silicon Labs XBee3 LTE-M Expansion Kit (Source: Mouser Electronics)
Silicon Labs EFM32 Giant Gecko GG11 Starter Kit
For this project, we'll connect the LTE-M Expansion Kit to a Silicon Labs EFM32™ Giant Gecko GG11 board (Figure 2). The Giant Gecko GG11 is an IoT development board containing a number of features for developing sensor, processing, and control applications:
- EFM32GG11B820F2048GL192 MCU with 2MB flash and 512KB RAM
- Advanced Energy Monitoring system for precise current tracking
- Integrated Segger J-Link USB debugger/emulator and virtual COM port
- Color LCD-TFT display
- 2 user push buttons and 2 user RGB LEDs
- Capacitive touch slider
- Temperature and humidity sensor
- Hall-effect and inductive LC sensors
- Dual microphones
- USB interface for Host/Device/OTG
- 32MB Quad-SPI Flash memory
- Micro-SD card slot
- RJ-45 Ethernet jack
- EXP expansion header
- Breakout pads for easy access to I/O pins
- Power sources include USB and coin cell battery
More detailed information about the board can be found here and here.
Figure 2: Silicon Labs EFM32 Giant Gecko GG11 Board (Source: Mouser Electronics)
Silicon Labs Simplicity Studio 4
Firmware programs that run on microcontrollers are typically developed and tested using an Integrated Development Environment (IDE) running on a personal computer. The IDE provides an editor, compiler, linker, debugger, and a mechanism for transferring binary program images to the microcontroller.
The Giant Gecko GG11 can be programmed using SiLabs Simplicity Studio 4, an Eclipse-based IDE that runs on Windows, Mac, and Linux computers. It connects to the Giant Gecko using a USB cable that supports programming and debugging. Simplicity Studio can be downloaded for free from the Simplicity Studio site.
Project Application Source Code Files
For this project, Simplicity Studio was used to create an initial set of project source code files that have been modified and extended to work with the Medium One IoT Platform. The resulting files have been put in a GitHub repository that you can download for this project. The project files will be imported into the Simplicity Studio IDE where they’ll be compiled and downloaded to the Giant Gecko board. The project files consist of a main application program and supporting functions for I/O and cloud connectivity.
Medium One IoT Platform
The Medium One IoT Platform (Figure 3) is designed to help early-stage developers prototype their IoT project or connect their existing hardware to the cloud. It offers an IoT Data Intelligence platform enabling customers to quickly build IoT applications with less effort. Programmable workflows allow you to quickly build processing logic without having to create your own complex software stack. Configurable dashboards allow you to visualize application data and view real-time data in various formats. Medium One’s iOS and Android apps allow you to build simple mobile app dashboards that can communicate with your devices through the IoT platform.

Figure 3: Medium One IoT Platform (Source: Mouser Electronics)
IoT devices can exchange data with Medium One through either a REST API or MQTT. More detailed information about the Medium One IoT Platform can be found here and on the Medium One site.
The Setup (Hardware)
While setting up the hardware be sure to remember that electronic components are static-sensitive, so handle accordingly.
Personal Computer (PC)
Power up the personal computer and allow it to boot up.
XBee3 LTE-M Expansion Kit and Giant Gecko GG11 Starter Kit
Follow the getting started instructions and Quick Start Guide to set up the LTE-M and Giant Gecko GG11 boards. The main steps will include:
- Downloading and installing Simplicity Studio IDE on your PC
- Activating the included SIM card on the Hologram platform using the free "Maker" plan
- Upgrading the LTE-M modem firmware if needed; there are several ways to upgrade the firmware, one of which makes use of the optional DIGI XBIB-C Development Board and DIGI XCTU utility software
- Assembling the LTE-M expansion board and antenna
- Connecting the LTE-M expansion board to the Giant Gecko GG11 board
- Connecting the Giant Gecko GG11 to your PC using the included USB cable
- Adding your boards in Simplicity Studio
- Updating software packages in Simplicity Studio
- Running the lte_xbee_sms demo app
The demo app checks basic functionality of the LTE-M modem and SIM card. Make sure that is working before proceeding further. Monitor SIM connectivity status and data usage in the Hologram dashboard to help troubleshoot issues. If you consume the entire amount of free bandwidth, you can add more in small increments for a charge.
The Setup (Software)
Simplicity Studio IDE
The installation of Simplicity Studio was covered during the hardware setup steps. When Simplicity Studio is running and your boards are connected to the PC via USB and are registered within Simplicity Studio, the Launcher page should look like Figure 4.

Figure 4: Simplicity Studio Launcher Screen with Boards Connected (Source: Mouser Electronics)
Download and Open the Project Application Source Code Files
Web browse to the GitHub repository https://github.com/Mouser-Electronics/ma14_files and find the SiLabs_XBee3_MediumOne_1.0.0.zip file. Download that file to your computer and unzip it to create a directory named import containing file SLSTK3701A_lte_xbee_medium_one.sls.
In Simplicity Studio, select File > Import … and select the import directory unzipped earlier. Once the import directory is selected, the Detected projects list should show SLSTK3701A_lte_xbee_medium_one. Continue clicking Next until you get to the final project configuration dialog indicating a Project name of SLSTK3701A_lte_xbee_medium_one using the default location. Click Finish to complete the import. After a successful import, the Project Explorer window should look like Figure 5.

Figure 5: After Importing SLSTK3701A_lte_xbee_medium_one Project (Source: Mouser Electronics)
We’ll come back to the source code files later after setting up Medium One.
Set Up the Medium One IoT Cloud
Web browse to the Medium One IoT Platform and log in, after which you should see an initial dashboard resembling Figure 3. If you have trouble logging in, check your Medium One credentials to make sure you're using the latest URL provided with your sandbox subscription. Click Setup > Manage Users > Add New User. Set Username to mydevice, create a password of your choosing and enter it in both password fields, then click Save. In the Manage API Users list, you should see a new user account having Login ID = mydevice and an auto-generated user MQTT ID like Figure 6.

Figure 6: Newly Created User ID (Source: Mouser Electronics)
Next, we’ll create an API key. Navigate to Setup > Manage API Keys > Add New API Key. Set the description to mydevice, make sure Enabled is check-marked, and click Save. The result should look like Figure 7.

Figure 7: Newly Created API Key (Source: Mouser Electronics)
Update Application Source Code Files for Medium One Account Parameters
In Simplicity Studio open the source code file src/http_client.c. Find these constants and set them to the Medium One credentials you just created:
- MEDIUMONE_LOGIN_ID mydevice
- MEDIUMONE_PASSWORD
- MEDIUMONE_APIKEY
- MEDIUMONE_DEVICE_ID mydevice
Save the modified file and then build the project. Verify the code compiles without errors. If you see compilation errors, check the changes you make to the Medium One configuration constants.
Run the Application
Make sure the Giant Gecko board is connected to the PC through USB and the Giant Gecko and LTE-M boards are configured as described in the setup steps. Build the program and then download to the Giant Gecko board and run it. You should see messages on the LCD display indicating the processing steps being performed.
By default, the application is configured to print messages on the board LCD display. You can optionally uncomment #define PRINTF_SERIAL in src/main.c to print messages on the USB serial port instead. To view messages that way, connect a serial terminal program such as Tera Term to the USB comm port and set parameters to 115200,N,8,1.
The constant FIRST_RUN in src/main.c controls whether NB-IoT is disabled on the LTE-M module during startup. When FIRST_RUN is set to 1, NB-IoT is disabled when the application starts up and this setting is saved in the LTE-M module's non-volatile memory. You can optionally set FIRST_RUN to 0 to skip this initialization the next time the application runs, to speed up the startup sequence. If you change the LTE-M module or reset it to factory defaults, set FIRST_RUN back to 1.
How the Application Program Works
This program was created by modifying one of the SiLabs example applications to work with the Medium One cloud. The high-level program flow includes:
- Initialize board and sensor hardware
- Initialize LTE-M module
- Read sensors and generate event data message for Medium One
- Log into Medium One (on first connection)
- Post the event message to Medium One
- Repeat the sensor read/publish loop with time delay
Event Message Format
Event messages are formatted as JSON strings according to the Medium One API specification. Here’s an example message:
{"event_data":{"iteration":59,"timestamp":369363,"temp":73.477,"humid":34.916,"button0":0,"button1":0}}
Fields:
- iteration = counter that increments by 1 in each event_data message
- timestamp = milliseconds since the application started
- temp = temperature in degrees F
- humid = relative humidity in percent
- button0 = 1 for pressed, 0 for released
- button1 = 1 for pressed, 0 for released
Try pressing and releasing the buttons or heating/cooling the temperature sensor to see the values change.
View Data in the Medium One Dashboard
In the Medium One dashboard navigate to Data Viewer > Data Streams and click raw Events. You should see raw messages (Figure 8) being received. Click the “+” sign to view message details.

Figure 8: Raw Message Display (Source: Mouser Electronics)
Click Dashboard on the top left, then click Add Widget > Single User Real Time Events Stream to add an event stream widget to the dashboard.
In the Select user dropdown, select mydevice. You should now see messages appearing in the Real Time Events Stream widget (Figure 9). Click the dashboard save icon in the upper right corner to save your modified dashboard.

Figure 9: Real Time Events Stream Widget Display (Source: Mouser Electronics)
Add More Widgets
To display more widgets we need to enable specific data fields contained in the message payload. Navigate to Config > Data Streams and click on raw Events. The Schema Map should be pre-populated with fields detected in the incoming messages; however, they are currently disabled. Check-mark the Active box on raw.button0, raw.button1, raw.humid, raw.iteration, raw.temp, and raw.timestamp, then click Save Data Stream. These fields are now available for use in other dashboard widgets.
Back on the dashboard, click the Single User Last Value Table widget and select the mydevice user within the widget. Click the widget’s Tag Config icon to the right of the mydevice user selection and check-mark raw:button0, raw:button1, raw:humid, raw:iteration, raw:temp, and raw:timestamp, then click Save. The Last Value Table should now populate with the most recent received values for each field (Figure 10). Click the dashboard save icon toward the upper-right corner to save the updated dashboard.

Figure 10: Last Value Table Widget Display (Source: Mouser Electronics)
Now let’s add dashboard widgets for the buttons, temperature, humidity, and iteration counter. Click Single User Real Time Gauge and select the mydevice user. Click the widget’s Tag Config icon and check-mark the raw:button0, raw:button1, raw:humid, and raw:temp rows, then click Save. The updated dashboard should look like Figure 11. Click the dashboard save icon to save the updated dashboard. Try pressing and releasing the buttons or heating/cooling the temperature sensor to see the gauge values change.

Figure 11: Real Time Gauge Widgets Added to Dashboard (Source: Mouser Electronics)
At this point your boards are running continuously, periodically reading the sensors and transmitting data measurements to the Medium One cloud through the LTE-M cellular network. Remember to power off the boards when you’re done; otherwise, the board will continue to send messages to Medium One and consume daily message allotments and LTE-M bandwidth.
Troubleshooting Tips
- Make sure the boards, SIM card, and Simplicity Studio are fully set up according to the associated documentation.
- Make sure you're in an area with LTE-M coverage and/or adjust the LTE-M antenna.
- Monitor the ASSOC LED on the LTE-M board.
- Make sure you have available bandwidth remaining on your SIM card account.
- Make sure Medium One is set up and the Medium One parameters are set correctly in the source code.
- View information messages on the board LCD display or USB serial port.
- Look up error numbers in the errno.h include file.
- Use the Simplicity Studio source level debugger.
Conclusion and Where to Go Next
This project created an end-to-end sensor-to-cloud application that sends real-time sensor data to the Medium One IoT Platform through a LTE-M cellular network. It can be modified and extended in a number of ways, and here are a few examples:
- Dive deeper into the application code and board hardware by reading the XBee3 LTE-M User Guide, EFM32 Giant Gecko GG11 User Guide, the Simplicity Studio documentation, and studying the source code.
- Add more widgets to the Medium One dashboard, such as a real-time line chart of temperature and humidity readings.
- Learn about the Medium One Workflow Studio, which lets you create data processing workflows to transform your sensor data.
- Experiment with the Medium One mobile apps.
- Modify the sensor data publishing interval by modifying the application source code.
- Read other sensors on the Giant Gecko board and include the data in messages sent to Medium One.
- Add more cellular data capacity to your Hologram account.