Home/ Machine Talk Blog

Hands-on MicroPython Programming Examples for Edge Computing: Part 2

Posted on:

In our first post in the MicroPython programming for the edge series, we talked about how to collect sensor readings and make sense of them using the Digi XBee3 Cellular LTE-M Kit, as well as Digi’s free configuration software, XCTU, and some simple MicroPython code. Welcome to Part 2 of this series.

The edge intelligence provided in Digi’s XBee3 line of embedded RF modules makes sending data to the cloud a snap. For our second project in this hands-on series, we show how to upload temperature readings measured from a Digi XBee3 Cellular LTE-M module to “data streams” on Digi Remote Manager (DRM). Developers can use this data and device management platform for free. The Digi XBee3 Cellular line supports open communications standards, so it can also share data with Amazon’s IoT Platform, Microsoft Azure, Adafruit.io, Google Cloud IoT, ThingSpeak, IBM Watson and many others. Look for hands-on tutorials or several of those in future projects. Readers of our first project will recall that MicroPython is an open-source programming language based on Python 3, modified to fit on small devices and optimized for microcontrollers. By using MicroPython you can rapidly create connections to cloud services right from the edges of your network.

Send Data to Digi Remote Manager

Many IoT systems feed data to online cloud platforms on the Internet. They typically sample some value locally, like temperature, then send the readings to any one of a dizzying number of online application for logging, processing and data visualization. In this project, we will take some temperature measurements using a simple sensor, then send them to Digi Remote Manager® as a “data stream” that can be visualized in different ways, accessed via an open API or stored for later use.

We begin with the exact same hardware setup used in the “Sense, Transform and Send a Value” project, including the TMP36 temperature sensor.

Set up the Hardware

If you missed our first post, please work through the following items to prepare for this second project:

  1. Getting Started: Demonstrates how to set up the hardware and software you’ll need.
  2. Hello World Example: Teaches how to upload code to Digi XBee3.
  3. Sense, Transform and Send a Value – shows how to take a temperature reading and send it as a text message.

Once you have set up the Digi XBee3 hardware, hooked up the TMP36 temperature sensor, connected it to the configuration software, and opened the MicroPython terminal in XCTU, you are ready to begin. Your setup should look similar to this one:

TMP36, Digi XBee3 Cellular, XBIB connected to MicroPython Terminal in XCTU

About Digi Remote Manager

Remote Manager enables you to configure and manage dynamic device networks. A free developer account lets you explore Remote Manager’s application development and device management tools, with a limited number of devices and transactions, for as long as you need to.

To create your free developer account:

  1. Navigate to http://myacct.digi.com.
  2. Follow the steps for creating your account.

Developer account setup

If you need help setting up or using your account, see the Remote Manager User Guide.

Your Remote Manager account username and password will let your Digi XBee3 Cellular upload data streams, in this case temperature measurements. It provides a layer of security that’s appropriate to this simple example. Many additional layers of security and authentication are available to provide increased protection for production applications, though we won’t look at those right now so we can focus on the basics.

Library Uploads

To make our code simpler and more readable, we rely on two libraries uploaded to the file system inside the Digi XBee3 Cellular module. These libraries are collections of pre-written code. They provide simple ways to call complex routines without the routines themselves cluttering up your program. For this example we will use the remotemanager library, and the urequests library that remotemanager requires.

  1. Locate the remotemanager.py and urequests.py libraries on this GitHub page: https://github.com/digidotcom/xbee-micropython/tree/master/lib.
  2. Right-click on each filename and select Download to create a local copy of each on your computer. (GitHub users could also Clone or Download the entire repository here: https://github.com/digidotcom/xbee-micropython).
  3. With your Digi XBee3 and XBIB board added to XCTU, open the Tools menu and select File System Manager.
  4. Click Open to connect the File System Manager to your Digi XBee3’s file system.
  5. Navigate the “Local Path” folders in the left-hand column to find the remotemanager.py and urequests.py files you just downloaded.
  6. Use the “Remote Path” folders in the right-hand column to open the “lib” directory (“/flash/lib”).
  7. Drag the remotemanager.py and urequests.py files from your local directory and drop them in the remote “lib” directory to store them on the XBee3.
  8. When you are done, close the File System Manager window.
Currently the MicroPython program pasted at the Ctrl-F prompt in the REPL is the only way to run a program at startup. Once this pasted program is executing, it can import modules from the file system as well as writing files out to it. Launching from a filesystem file is on Digi’s development roadmap so look for this feature in future firmware.

Configure the XBee

The module is configured identically to our first Sense, Transform and Send a Value project. If anything might have changed, mount the Digi XBee3 Cellular on the XBIB board and connected to your computer over USB, launch the XCTU program.

  • Add a radio module, then click on that device in the list to configure it.
  • BD Baud Rate should be set to 115200 [7]  and AP API Enable set to MicroPython REPL [4].
  • Write these settings to the module, using the pencil icon at the top.

Load the Code

Copy the below code to a text editor like Notepad. Be sure to enter your own username and password, replacing “your_username_here” and “your_password_here” before uploading the code. By default, this program sends a temperature reading to Digi Remote Manager data stream once per minute, over 24 hours (1440 samples).  You can customize that by changing the wait_time or cycles variables as desired.

Remember, this sample code must be edited before you upload it.

# Digi XBee3 Cellular DRM Example
# uses a TMP36 to measure temperature and post it to Digi Remote Manager
# by default repeating once per minute, 1440 times total, stopping after a day
# ENTER YOUR DRM username and password, REPLACING "your_username_here" etc. BEFORE UPLOADING THIS CODE!
from remotemanager import RemoteManagerConnection
from machine import ADC
from time import sleep
from xbee import atcmd
cycles = 1440 # number of repeats
wait_time = 60 # seconds between measurements
username = 'your_username_here' #enter your username!
password = 'your_password_here' #enter your password!
# Device Cloud connection info
stream_id = 'temperature'
stream_type = 'FLOAT'
stream_units = 'degrees F'
description = "temperature example"
# prepare for connection
credentials = {'username': username, 'password': password}
stream_info = {"description": description,
                   "id": stream_id,
                   "type": stream_type,
                   "units": stream_units}
ai_desc = {
    0x00: 'CONNECTED',
    0x24: 'RECOVERY_NEEDED',
    0x2A: 'AIRPLANE_MODE',
    0x2B: 'USB_DIRECT',
    0x2C: 'PSM_DORMANT',
def watch_ai():
    old_ai = -1
    while old_ai != 0x00:
        new_ai = atcmd('AI')
        if new_ai != old_ai:
            print("ATAI=0x%02X (%s)" % (new_ai, ai_desc.get(new_ai, 'UNKNOWN')))
            old_ai = new_ai
# Main Program
# create a connection
rm = RemoteManagerConnection(credentials=credentials)
# update data feed info
print("updating stream info...", end ="")
    rm.update_datastream(stream_id, stream_info)
except Exception as e:
    status = type(e).__name__ + ': ' + str(e)
    print('\r\nexception:', e)
while True:
    print("checking connection...")
    for x in range(cycles):
        # read temperature value & print to debug
        temp_pin = ADC("D0")
        temp_raw = temp_pin.read()
        print("raw pin reading: %d" % temp_raw)
        # convert temperature to proper units
        temperatureC = (int((temp_raw * (2500/4096)) - 500) / 10)
        print("temperature: %d Celsius" % temperatureC)
        temperatureF = (int(temperatureC * 9.0 / 5.0) + 32.0);
        print("temperature: %d Fahrenheit" % temperatureF)
        # send data points to DRM
        print("posting data...", end ="")
            status = rm.add_datapoint(stream_id, temperatureF) # post data to Device Cloud
            print('posted to stream:', stream_id, '| data:', round(temperatureF), '| status:', status.status_code)
        except Exception as e:
            print('\r\nexception:', e)
        # wait between cycles

Use It

With the Data to Digi Remote Manager example running, a new temperature measurement will be uploaded to a DRM data stream each minute. If you left the settings at their default, you will receive 1440 uploads, one minute apart, or 24 hours worth. To monitor the data stream:

  1. Log in to Digi Remote Manager and select the Data Services tab.

    Remote Manager Data Services
    Digi Remote Manager Data Services
  2. Click on the Stream named “temperature” to select it.
  3. Locate the Charts and Raw Data area below. It may be helpful to drag the separator line upwards to enlarge this area.
  4. Click on Raw Data to see the data points that have been uploaded

    Raw Data
    Digi Remote Manager Raw Data
  5. Click on Charts to see line graphs of the temperature data. Daily, weekly, monthly and yearly summary graphs can be generated.

    Remote Manager Charts
    Digi Remote Manager Charts

Related white paper: 5 Reasons You Should Consider Embedded Cellular Connectivity.


Digi Remote Manager has a complete API for sharing your data with other online systems. Thanks to its RESTful interface, it can accept standard requests (using HTTP GET) from a web browser. Use this link to see your temperature data. You’ll  be prompted to enter your username and password:


The output will be in XML format, and will look like this:

Digi Remote Manager XML Response
Digi Remote Manager XML Response
Digi Remote Manager API Explorer
Digi Remote Manager API Explorer


This Digi Remote Manager example demonstrates one way to centralize your IoT system’s data uploads. You can now create multiple sensors that all transfer data to a central location online. You created your first DRM account, located your data and visualized it. We also covered uploading libraries to Digi XBee3 Cellular using the File System Manager in XCTU. The File System Manager can also manage key files and security certificates that are required by many online IoT platforms. In future posts, we will look at uploading data to other cloud applications, triggering alerts, improving battery life, reducing bandwidth costs and much more.

Your feedback about this series is welcome. Please post any questions or suggestions in the comments below.

>>> Learn more about the Digi XBee Ecosystem of wireless modules, or contact us to discuss your needs.

Hands-on MicroPython Programming Examples for Edge Computing: Part 1

Posted on:

The new Digi XBee3® line of embedded RF modules feature edge intelligence to help execute business rules and a whole lot more. By running simple Python-based scripts on Digi XBee3, you can save money, extend battery life, improve responsiveness and enhance system reliability.

The best way to understand the power of edge intelligence is hands-on. In this series we’ll take you through some simple examples that you can use directly, then customize and extend to bring the power of programming to everyone’s favorite line of radio modules.

MicroPython is an open-source programming language based on Python 3, modified to fit on small devices and optimized for microcontrollers. Using MicroPython, an easy-to-learn scripting and programming language, you can rapidly prototype intelligent behaviors at the edges of your network. Cryptic sensor readings can be transformed into useful data, excess transmissions can be intelligently filtered out, and modern sensors and actuators can be employed directly, with complex procedures carried out locally when needed.

Getting Started

XCTU v6.3.8 and later feature a new MicroPython terminal, allowing the user to interact with MicroPython on the Digi XBee3 modules. Through the serial interface in the terminal, users can write, test, load, and run MicroPython code using the familiar REPL interactive prompt.

It’s simple to get started. We’ll begin with the Digi XBee3 Cellular LTE-M Kit. (Other Digi XBee3 Cellular Kits are similar.)

MicroPython Terminal

  1. Assemble the hardware and connect it to the XCTU configuration software. Complete instructions, if needed, can be found in the Getting Started Guide.
  2. Open the XCTU program.
  3. Add a device (help).
  4. The XBee Cellular Modem appears as a box in the Radio Modules information panel. Click this box to select the device and load its current settings.
  5. Set the device’s baud rate to 115200 bps for the best experience. In the BD field, select 115200 [7] and click the Write button.
  6. To put the XBee Cellular Modem into MicroPython mode, in the AP field select MicroPython REPL [4] and click the Write button.
  7. Note what COM port(s) the XBee Cellular Modem is using, because you will need this information when you use terminal communication. The Radio Modules information panel lists the COM port in use.

To use the MicroPython Terminal in XCTU:

  1. Click the Tools drop-down menu and select MicroPython Terminal.
  2. Click Open. If you have not already added devices to XCTU:
    1. In the Select the Serial/USB port area, click the COM port that the device uses.
    2. Verify that the baud rate and other settings are correct.
  3. Click OK. (The Open icon changes to Close, indicating that the device is properly connected.)
  4. Press Ctrl+B to get the MicroPython version banner and prompt.

Related white paper: 5 Reasons You Should Consider Embedded Cellular Connectivity.

Hello World Example

Let’s upload some simple “Hello World” code to confirm everything is working. Using a text editor, such as Notepad in Windows or TextEdit on MacOS, type in this short script:

from time import sleep
while True:
    print("Hello World!")
    1. In XCTU at the MicroPython Terminal, press Ctrl+F at the >>> prompt to put MicroPython into Flash Compile mode.
    2. Copy the script from your text editor and paste it into the MicroPython Terminal, then press Ctrl+D to finish.
    3. You won’t need to run this code at startup, so answer N when you’re asked.
    4. Finally press Ctrl+R to run your code. It will begin printing Hello World to the screen every two seconds. You can stop execution by pressing Ctrl-C. Here’s how your entire session should look:
MicroPython v1.9.4-797-g4361c12 on 2018-09-20; XBC LTE-M/NB-IoT Global with EFR32MG
Type "help()" for more information.
flash compile mode; Ctrl-C to cancel, Ctrl-D to finish
   1^^^ from time import sleep
   2^^^ while True:
   3^^^         print("Hello World!")
   4^^^         sleep(2)
Compiling 67 bytes of code...
Used 10/371 QSTR entries.
stack: 424 out of 3584
GC: total: 32000, used: 224, free: 31776
 No. of 1-blocks: 6, 2-blocks: 2, max blk sz: 4, max free sz: 1933
Compiled 67 bytes of code to 108/31232 bytes of flash.
Automatically run this code at startup [y/N]? N
Stored code will not run at startup.
Press CTRL-R in the REPL to run the code at any time.

MicroPython v1.9.4-797-g4361c12 on 2018-09-20; XBC LTE-M/NB-IoT Global with EFR32MG
Type "help()" for more information.
Running 108 bytes of stored bytecode...
Hello World!
Hello World!
Hello World!
Hello World!
Hello World!

Traceback (most recent call last):
  File "<stdin>", line 4, in <module>


Hello World Summary

By completing this Hello World example you now have all the skills needed to start using edge intelligence. You have set up the Digi XBee3 hardware, connected it to the configuration software, opened MicroPython, loaded working code, and run it yourself. You are ready to run your first real application.

Sense, Transform and Send a Value

Now that we know how to create MicroPython code on the Digi XBee3 platform, let’s do something useful with it. Many IoT systems are fundamentally sensor networks. They sample some value locally, such as temperature, water pressure or human presence, then send that information for logging, processing and decision-making by online applications. For our next project, we’re going to take a temperature measurement using a simple sensor, then send it to your phone as an SMS text message. This measurement cycle repeats every minute, stopping after 10 rounds to protect your sanity.

Many sensors produce a simple varying voltage that needs to be transformed into the proper units. For example, at 25º Celsius a temperature sensor might output 750 mV. While it’s possible to send the meaningless number 750 to the cloud application, it would be much clearer to send 25ºC instead—that’s the actual temperature. This is easily accomplished in MicroPython, and these transformations will be increasingly helpful as we build more intelligent systems.

First, let’s attach a sensor to our Digi XBee3 Cellular modem. To make things easy, we will use a the TMP36 temperature sensor, which is self-calibrating and communicates over a single wire.

Parts to Order

Prepare the Board to Connect Components

20-pin headerThe easiest way to connect additional components to the XBIB development board is to solder one of these headers to the 20-pin socket on the XBIB labeled P1. Now you can use jumper wires to attach peripherals like sensors or motors.

Note: If you don’t have jumper wires or a header, soldering wires or sensors directly to the XBIB board will also work.

Assemble the Hardware

Use jumper wires to connect the TMP36 temperature sensor to the XBIB board.

  1. With the flat side of the TMP36 facing you, the leftmost lead gets connected to pin 1, VCC on the XBIB board.
  2. The middle lead connects to pin 20 (right next to it) DIO0.
  3. The rightmost lead goes to pin 10, GND.

TMP36 temperature layout

Configure the XBee

With the Digi XBee3 Cellular on the XBIB board and connected to your computer over USB, launch the XCTU program.

  1. Add a radio module, then click on that device in the list to configure it.
  2. BD Baud Rate should already be set to 115200 [7]  and AP API Enable set to MicroPython REPL [4].
  3. With these two confirmed, locate the P# Destination Phone Number field and enter the mobile phone number you want to receive the temperature texts.
  4. Write these settings to the module, using the pencil icon at the top.

Load the Code

Copy the below code to a text editor like Notepad. Be sure to enter your own phone number, replacing “your_mobile_number_here” before uploading the code. Enter it just as you would dial it on a cell phone, including the + symbol if needed. By default, this program sends a temperature reading once per minute, 10 times total. You can customize that by changing the wait_time or cycles variables as desired.

Remember, this sample code must be edited before you upload it.

# Digi XBee3 Cellular Basic Example
# uses a TMP36 to measure temperature and send it as an SMS message
# by default repeating once per minute, 10 times total

import network
from machine import ADC
from time import sleep
wait_time = 60 # seconds between measurements
cycles = 10 # number of repeats
number = "your_mobile_number_here" # this phone number receives the text notifications
# while True: 
for x in range(cycles):
    # read temperature value & print to debug 
    temp_pin = ADC("D0")
    temp_raw = temp_pin.read()
    print("Raw pin reading: %d" % temp_raw)

    # convert temperature to proper units
    temperatureC = (int((temp_raw * (2500/4096)) - 500) / 10)
    print("Temperature: %d Celsius" % temperatureC)
    temperatureF = (temperatureC * 9.0 / 5.0) + 32.0;
    print("Temperature: %d Fahrenheit" % temperatureF)

    # send as text to phone number 
    message = ("Temperature: %d'F  (%d of %d)" % (temperatureF, x+1, cycles))  # message
    c = network.Cellular() 
    while not c.isconnected():
        print("waiting for cell network...") 
        sleep(1.5)  # Pause 1.5 seconds between checking connection 
    print("connected to cell network.")
        c.sms_send(number, message)
        print("message sent successfully to " + number)
    except Exception as e:
        print("Send failure: " +  str(e))

    #wait between cycles


Once the code has been edited by adding your mobile phone number, it can be uploaded in XCTU at the MicroPython Terminal in the usual way:

  1. Press Ctrl+F at the >>> prompt to put MicroPython into Flash Compile mode.
  2. Copy the script from your text editor and paste it into the MicroPython Terminal.
  3. Press Ctrl+D to finish and answer N when you’re asked.
  4. Finally press Ctrl+R to run your code. You can stop execution by pressing Ctrl-C.

Use It

With the temperature SMS example running, you should begin receiving text messages. If you left the settings at their default, you will receive ten messages, one minute apart. The results on your phone should look like this:

SMS Temperature Example


By completing this SMS example you have created real, if basic, edge intelligence. Now you have experience hooking up a sensor, recording its values, transforming them into useful units and sending them to a mobile phone. In future posts, we will look at uploading data to cloud applications, triggering alerts, improving battery life, reducing bandwidth costs and much more.

Your feedback about this series is welcome. Please post any questions or suggestions in the comments below.

>>> Learn more about the Digi XBee Ecosystem of wireless modules, or contact us to discuss your needs.

Digi Edge Compute with AWS Greengrass

Posted on:

Edge compute, messaging, data caching, sync, and ML inference capabilities for connected devices

AWS Partner Network logoDigi ConnectCore® embedded solutions along with AWS Greengrass are designed to support edge devices with cloud connectivity.

Based on the NXP i.MX line of application processors, Digi ConnectCore embedded SOMs and SBCs deliver the compute power necessary to run Greengrass Core and interact directly with the cloud.

Developers can use AWS Greengrass to integrate Lambda functions locally and then conveniently deploy them to connected devices at the edge of the network.

AWS connectivity
Source: Amazon Web Services

With Digi SOMs and SBCs, you can move quickly from idea, to prototype, to deployment with the powerful combination of AWS Greengrass and Digi ConnectCore:

  • • Implemented on Yocto Project Linux for embedded devices
  • • Integration of embedded AWS Lambda device-level functions
  • • Digi TrustFence® device-level security with features such as secure connections, authenticated boot, and secure physical ports
  • • Remote device monitoring with Digi Remote Manager®
  • • Secure firmware update to group devices using AWS-based firmware images via the Greengrass Core

Related white paper: IoT Device Security — Built-in, Not Bolt-on: The 10 Security Factors Every Device Designer Should Consider

“Building connected devices for the industrial IoT requires secure local device level intelligence without dependency on constant connectivity,” said Scott Nelson, Chief Product Officer at Digi International.

“The unique combination of Digi TrustFence device security, local Lambda extensions, Digi Remote Manager® integration, and Amazon Web Services’ Greengrass delivers the vision for the next generation of IoT edge intelligence in embedded devices.”

>> Learn about Digi’s strategic embedded solutions for scalable, future-proof connectivity.

IoT Solutions for Transportation

Posted on:

Among industry sectors that are rapidly adopting IoT technology, public transportation is one that can benefit the most from gains in operational efficiencies, cost savings, safety and security. The automotive industry also has unique needs, and some excellent innovations are emerging to support that market as well.

In this post we will look at some specific IoT solution examples for transportation from the Digi collection of customer success stories, such as Positive Train Control (PTC), vehicle analytics, ticketing systems, transit system security and high-speed passenger Wi-Fi.

IoT-Enabled Solutions for Transportation

Smart city IoT transportation iconsTechnology advances are supporting the development and deployment of IoT solutions across the transit sector. For example, the networks themselves have advanced with the rapid growth of 4G networks and the advent of 5G.

Meanwhile, 2G and 3G networks are shutting down, contributing to the growth of new and enhanced products and systems optimized for more advanced networks. In metropolitan areas today, the reliability of cellular networks now rivals, and even exceeds, traditional wired networks.

Moreover, new mobile access router technology provides the critical connectivity to support these applications. For example, Digi transportation routers provide secure cellular connectivity and multi-purpose data routing for demanding
transit and industrial environments affected by factors such as
temperature fluctuations, moisture, movement and vibration.

Transit sector solutions must meet a range of objectives, depending on the use case:

  • Public transit systems: Improve on-board rider experiences, including safety, with high-speed Internet connectivity
  • Railways: Improve train safety and responsiveness to emergency situations, while meeting PTC regulatory requirements
  • Trucking/supply chain: Track vehicle analytics, reduce the need for truck rolls, and expand automated processes to save operational costs

Case Study Examples: IoT Solutions for Transit and Automotive

Digi customers develop a wide range of IoT applications and solutions using Digi products. Here are a few examples of solutions that serve the transportation sector today.

SEPTA: Positive Train Control (PTC)


The Southern Pennsylvania Transportation Authority (SEPTA) provides light rail, subway and bus service to more than one million riders daily in and around Philadelphia. SEPTA was one of the early transit systems to mobilize their Positive Train Control (PTC) installation, a sophisticated train-signaling system designed to prevent crashes, derailments and track worker injuries resulting from speed and signal violations.

SEPTA worked with Digi to deploy the right connectivity solution for PTC:

  • • The Digi® WR44-RR mobile access router.
  • • PTC message routing and wireless communications via a Mobile Communications Package (MCP)
  • • An integrated, drop-in MCP assembly that houses Digi WR44 RR, a 220 MHz TDMA radio, power supply and RF filters

TransPort WR44 RR Train configuration


The Digi WR44 RR is the integral communications hub in all locomotives and vehicles, relaying PTC data messages to and from waysides via 220 MHz radio and enabling remote system maintenance, configuration and network management over a cellular link.  Increased network reliability and rail system visibility extends performance beyond PTC toward Communications-Based Train Control (CBTC), resulting in more efficient scheduling, greater capacity and increased fuel savings.

Read our white paper on rail-certified cellular communications: The Fast Track to Positive Train Control Compliance.

TransData: Passenger Ticketing and Information System

Train passengerSystems integrators in the IoT space have enormous opportunity today to support the needs of organizations across the transport sector, from city bus and light rail agencies to trucking companies in the supply chain, and long distance passenger trains. The needs are growing as these agencies work to meet compliance requirements and compete in their marketplaces by providing enhanced services and improved security.

TransData is an IoT systems integrator that develops applications for public transit, such as payment and identifications systems, for the Slovak market. TransData’s flagship product is a multi-faceted solution that supports a broad range of public transport capabilities:

  • • Secure fare transactions
  • • Easy-to-use electronic card system simplifies passenger experiences
  • • GPS-tracked route guidance minimizes delays
  • • Display local shops, restaurants and points of interest
  • • More reliable Internet access and high-speed passenger Wi-Fi
  • • Monitor traffic activity with on-vehicle security cameras
  • • Route communications through a central depot or dispatch


The applications above are enabled by Digi ConnectCore® 6 ultra-compact system-on-module (SOM), which supports TransData connectivity requirements at an affordable price point. TransData ticketing and information systems require superior video performance, Wi-Fi and Bluetooth, and connectivity to the vehicle data system and cellular modem. The applications also require a stable package and small form factor that can withstand rugged conditions such as extreme heat, humidity and vibration while maintaining network connectivity to perform these complex tasks.

SMART: Public Transit System Computer-Aided Dispatch

SMART city transit

The Suburban Mobility Authority for Rapid Transit (SMART) metro bus fleet of 330 biodiesel and hybrid-electric buses covers more than 1,100 miles and supports 32,000 riders daily. With this extensive fleet, it is critical to monitor the vehicles in order to ensure the highest levels of passenger safety and on-time performance.

The business problem to solve involved the upgrade of an aging CAD/AVL (Computer-Aided Dispatch / Automatic Vehicle Location) system built on a legacy analog radio network connected via three leased towers. SMART first evaluated migrating from analog to digital signals and increasing the number of towers, but that was cost-prohibitive. Ultimately SMART switched to VOIP on cellular for CAD, taking advantage of the packet priority services built into the Digi WR44 R mobile cellular router.


With its switch to a cellular-based AVL, SMART can collect and analyze a much wider range of data and metrics — including vehicle location and speed — in real-time. Maintenance data is also captured to help prevent breakdowns and accelerate repair cycles, in order to minimize vehicle downtime. Data is transmitted to the operations center through a highly secure VPN tunnel, while operators can communicate with Central Dispatch using VoIP handsets.

Due to these upgrades and enhancements, the SMART leadership estimates they are saving over $70,000 each year.

Macchina: Auto Control Center

Macchina and Digi devicesMacchina worked with Digi to develop an affordable 4G LTE solution with a small footprint. The team chose the Digi XBee® Cellular embedded modem based on its design – an open source interface for car hobbyists and professionals to program a device or service into the automotive aftermarket.

“Our vision is to offer a ‘one-to-many’ interface,” explained Josh Sharpe, Macchina chief technical officer. “In the database world, you might call this middleware. The device maker will be able to create one device with one interface to our board – and we handle integration to hundreds of vehicles.”

The product therefore enables developers to “Another way to think of Macchina is that it’s like a key to unlock the control center of the car. Once you are in, you can use Macchina to make changes and tweaks to the car. You can do anything from simple projects, like stopping that annoying ding, to more complex upgrades such as unlocking more horsepower or improving fuel economy.”


Macchina essentially provides a project template that enables development and encourages innovation. Developers appreciate the open source platform to write code, as well as a community of car hobbyists, enthusiasts and professionals to consult with as they explore various approaches to their own product development.


The transportation sector is seeing a substantial adoption of IoT solutions to improve safety, public transit monitoring and routing and ridership experiences. A complete set of Digi solutions satisfy a range of transport needs, from Positive Train Control, high-speed Wi-Fi and surveillance cameras, to secure IDs, easy-to-use ticketing systems and more efficient route management.

Additionally, the Digi professional services teams can provide guidance at any point, from wireless design services to proof of concept, PCB layout and certification assistance.

>> For more information about Digi’s IoT solutions for transportation, contact us today, or download our white paper, Making the Connection in Transportation.


Mission Critical Communications for Transportation

Posted on:

City residents expect their transit systems to run on schedule. To make that happen, regional transportation officials need to be able to dynamically redirect capacity where needed during rush hour, special events and unforeseen incidents. Transit agencies are also expected to immediately activate emergency response procedures following a disaster. All this requires a communication network that is fail-safe, interoperable and highly secure. Most would agree that today’s networks are not completely adequate, and that further improvement is required to achieve more effective communications.

In this post, we will cover IoT solutions available for the broad-spectrum needs of the transit sector, including railroad companies, city transit systems and emergency responders. We will review specific connectivity solutions that support the requirements of these organizations, from secure IoT devices to cloud-based management platforms and professional services to help guide IoT implementations.

PTC Automatically Controls Trains to Prevent Collisions, Derailments or Switching Errors

Some, but not all, railroads have met the Positive Train Control (PTC) deployment deadlines, which continue to be extended. The challenges most often cited include system complexity, capital investment and spectrum allocation. The communications network adds to the complexity, due to the need to integrate a fiber backbone with cellular and 220 MHz, and to deal with 220 MHz interoperability issues. The communications network is considered a safety-critical PTC system component, so if it is in a failed state the train can proceed at reduced speed only if other signaling systems are operating.

To help expedite PTC compliance, Digi offers a complete communications connectivity solution that includes the Digi WR44 RR router, purpose-built for the rail industry and designed to be mounted on board locomotives and rail cars. It meets all rail-certification requirements for AREMA C and H, EN50155 and AAR S-5702. Communications interfaces include hardened connectors, specifically M12 for Ethernet and serial, as well as TNC connectors for antennas. Digi routers offer drop-in deployment with simple, secure remote control.

PTC message routing and wireless communications use a Mobile Communications Package (MCP) featuring an integrated assembly that houses the Digi WR44 RR, 220 MHz TDMA radio, power supply and RF filters. Functioning as the integral communications hub in locomotives and rail cars, Digi WR44 RR relays data messages to and from waysides via 220 MHz radio, and enables system maintenance, configuration and network management over a cellular link.

Another key component to help maintain both device and network health is supplied by Digi Remote Manager®. It gives you a single, secure platform to access data and manage IoT devices from anywhere. Digi Remote Manager also enables effective and efficient control to keep PTC deployments on track – edit configurations, update firmware, and monitor, schedule and automate tasks – all from a central location.

Today, transit agencies can leverage both existing LTE, LTE-Advanced and evolving 5G international standards for mission critical applications and services over commercial cellular networks. The services can be built on protocols and mechanisms that guarantee priority and preemption for voice, video and data, to meet the needs of the new First Responder Network Authority (FirstNet) and enable better device interoperability across different agencies.

Protecting Citizens and Critical Infrastructure

With this new and evolving technology, first responder vehicles, traffic and transit systems will be able to utilize specialized on-board cellular mobile access routers as network gateways that securely bridge local subnets to agency systems. Agencies seeking to deploy these routers will need to understand how to evaluate them for reliability, ruggedness and security along with ensuring forward compatibility as new public safety applications emerge. Note that Digi Professional Services can provide assistance with implementation, installation and other needs.

Mission critical services are being deployed in stages. Fortunately, the structural network technology used for priority voice, video and data is currently in place. Bandwidth on shared or reserved spectrum can be allocated for priority access using dedicated bearers with associated quality-of-service levels. Transit agencies that deploy equipment compatible with these structural capabilities can take advantage of the priority data services available today, and then efficiently layer future services such as group video calls with simple firmware upgrades.

Due to advances in network equipment and services, most buses have an on-board cellular router that functions as a communications gateway for the various systems. A bus has become a mobile data center of sorts. Central dispatchers can coordinate the bus fleet through transmission of location and voice communications. Voice communications are increasingly implemented using IP technologies, Voice over IP (VoIP) or Voice over LTE (VoLTE). As a result, these systems are mission critical and need to run over a fail-safe communications network. In this recent whitepaper, Making the Connection in Transportationread how transit operators can consolidate cellular connectivity for smart, safe, and more efficient operations.

As always, passenger safety and security are the chief concerns of all transit agencies. There are few on-board systems more important in this area than the mobile access router – the method of communication that links the entire chain of command. The recent standards developments are just now enabling deployment of mobile access routers having forward compatibility with the many new services envisioned for mission critical applications. Reliable communications for all on-board systems ensures a safe environment is maintained and that authorities are promptly notified of any incidents.

The new Digi WR64 transit router is designed for mission critical communications, with support for priority, pre-emption and failover to backup networks. This is critical for coordinated dispatch and reliable location tracking following an incident when cellular networks may be overloaded, in order to expedite the arrival of emergency response teams. Additionally, multiple transit applications can be combined on a single communication platform. GPS, vehicle tracking, on-board payment systems, ticket kiosks and more can be managed with one router. By consolidating vehicle connectivity, agencies can improve operational efficiency and effectiveness while helping extend the life of transit assets.

Related white paper: Making the Connection in Transportation: How Transit Operators Can Consolidate Cellular Connectivity for Smarter, Safer, and More Efficient Operations.


The New Standard for Dual Redundant Communications

Digi WR64 Cellular Router

Passengers today demand a faultless on-board Internet experience. And with so many transportation options available, transit organizations must provide seamless Wi-Fi to retain and grow their ridership. Meanwhile, agencies must also be able to integrate vehicle data from engines, logistics programs, fare collection, security cameras, even digital signage – all while maintaining the highest level of security and reliability with a suite of cybersecurity features: Digi TrustFence®, a data privacy and device security framework, IPsec VPNs and dual concurrent cellular links.

Digi WR64 meets these complex simultaneous needs with dual CAT 11 cellular modules and dual high-speed Wi-Fi radios so that transit agencies can securely segment private data from public data, and deliver an Internet experience that keeps riders coming back. Internet access for riders is managed separately without impacting on-board communications systems.

The Future of Transit Connectivity

Digi designs and manufactures industrial-grade communications equipment used in transportation and transit systems around the world. The newest member of the family is Digi WR64, a mobile access router with the latest cellular, WLAN and GPS technology. This high-performance router is designed to meet the complex requirements of the transit industry and other demanding applications that must meet strict operating standards, without disruption. While the new Digi WR54 is a compact general purpose router for transportation and public safety applications.

Digi cellular routers, servers, adapters and gateways support critical and emerging needs in rail, bus, traffic, emergency response, energy and smart cities. They enable connectivity to standards-based and proprietary equipment, assets, IoT devises and sensors – to ensure reliable communications over virtually every form of wireless or wired system. An integrated remote management platform helps speed deployments using highly efficient network operation for mission critical functions such as mass configuration and firmware updates, including system-wide monitoring with dashboards, alarms and performance metrics.

The future of transit belongs to agencies, operators and authorities that can leverage smart, secure and cost-efficient connectivity to improve the rider experience, lower costs and improve safety and performance. With cellular routers like Digi WR64 and Digi WR54, organizations can consolidate remote connectivity and simplify their infrastructures.

Steve Mazur, Digi Business Development Director, will be hosting a round table at Smart Transit in Philadelphia, October 23-25. Visit our Events page for more information.

Introducing Digi XBee3 Cellular LTE‑M/NB‑IoT

Posted on:

Last week, we released Digi XBee3™ Cellular LTE-M/NB-IoT, a single SKU that provides original equipment manufacturers (OEMs) with a simple way to integrate low-power narrow-band cellular connectivity into their Internet of Things (IoT) devices. This latest addition to the Digi XBee3 lineup combines global connectivity, built-in security, and design flexibility for IoT applications.

Digi XBee3 Cellular smart modems accelerate time to market for product designers, OEMs, and solution providers by quickly enabling wireless connectivity and easy-to-add functionality. Building on industry-leading technology, pre-certified Digi XBee3 modules offer the flexibility to switch between multiple frequencies and wireless protocols, as needed.

Digi XBee3 Cellular LTE-M/NB-IoT expands the Digi XBee Ecosystem of wireless modules, gateways, software and development tools — all engineered to accelerate development and deployment to market. Ideal for low-data (typically <5 MB per month and where latency is not critical), low-power, low-cost applications, Digi XBee3 Cellular LTE-M/NB-IoT modules feature a power saving mode that extends sleep time and battery life.

With Digi Remote Manager®, Digi XBee3 Cellular can be easily configured and controlled from a simple, central platform with over-the-air (OTA) updates. Built-in Digi TrustFence® security, identity and data privacy features use more than 175 controls to protect against new and evolving cyber threats. Standard Digi XBee API frames and AT commands, MicroPython and XCTU software tools simplify tasks such as set-up, configuration, adding functionality and testing.

>> Find more information and get started with the award-winning Digi XBee3 Cellular LTE-M/NB-IoT.

Summit Envirosolutions Streamlines Data Processes with Wireless Sensors and Digi

Posted on:

At our Global IoT Conference earlier this year, we sat down with local consulting firm Summit Envirosolutions to discuss the sophisticated, yet simple, information systems that gather and evaluate critical environmental data used to provide more insightful recommendations.

Focusing specifically on cultural, environmental and water resources, Summit resource management teams help clients better follow regulatory guidelines at local, state, and federal levels. John Dustman, a hydrogeologist with Summit, shared how everything from agriculture and mining to food processing and municipal supplies use our most valuable resource, water. This requires a certain level understanding, of course, but also demonstrates that groundwater can still be a big mystery to many. To find out more, watch the video:

With over 20 years of experience developing groundwater visualization tools, Summit combines the power of environmental science with data management tools to monitor the quality of water – and to enhance our understanding of physical, biological, and chemical relationships. Summit was also a collaborative developer of AQUILYTICS, software that uses continuous water level and flow rate data to perform hydrogeological tasks that were previously unavailable in any other software program.

Summit developed a protocol for acquiring telemetric data, and created an environmental/water supply database and corresponding graphical user interface to enable instantaneous access, querying, graphing and GIS visualization. “It’s like an MRI for a water well,” said Dustman, “and the ROI is almost immediate from a couple of perspectives.”

>> Read the full Summit customer success story to see how they streamlined the data collection process with Digi Connect Sensor+.

IoT Development with Wireless Communications: Getting Started

Posted on:

Embarking on an IoT development project presents many questions that need to be answered — whether you have extensive experience in machine-to-machine communications or you are just starting out. This enormously fast growing field offers a growing selection of supporting components and connectivity methods, and for developers it can feel like the landscape changes daily. In this post we’ll lay some groundwork to help make sense of it all, and talk about the key things to consider as you are preparing to launch an IoT development project.

While we may not be able to completely mitigate the overwhelm factor, we can certainly help to highlight the important considerations that drive decision making and provide resources for getting answers.

Wireless Technology in IoT Product Design

At the heart of the explosion of the Internet of Things (IoT) and the Industrial IoT (IIoT) is wireless technology, made possible via RF or radio frequency. This technology enables devices to communicate with another without being physically connected. With its roots in the early 20th century, RF technology is not new. But it has grown to include cellular devices and other advances, keeping in stride with an enormous demand for new consumer and industrial applications.

Technological enhancements that support this incredible growth include the speed and bandwidth of the underlying networks, extended battery life of IoT devices, broader capabilities of wireless communication protocols, and more secure management of devices and networks. These advancements have allowed a significant number of industries to replace expensive, and often unreliable, wired communication with wireless communication.

Wireless communication in smart city applicationsMillions of miniature wireless devices — sensors and radio modules — now gather and send data in a vast array of environments from smart cities to manufacturing facilities and other industrial settings, and deliver that data faster than you can blink.

To manage it all, cloud applications such as Digi Remote Manager® allow network administrators to monitor the health and security of their devices from a central console, update the firmware of many devices with one command, automate security monitoring, and get notified quickly in the event of a problem anywhere those devices are deployed, worldwide.

That said, how do you get started designing and developing a successful IoT or IIoT product? While there’s far too much to cover in a single blog post, we can talk about some of the key things you will need to know if you are going to develop a product incorporating wireless technology.

Oh, and we have exciting news: Digi has an upcoming guide to all the concepts and important considerations in wireless communications for IoT product design. Sign up now to get notified of its release.

Key Considerations for Wireless Design in IoT

Launching a wireless design project can be daunting. You need on-staff expertise, supporting professional services, or both, to define your requirements, design and develop your IoT product, and ensure that it will pass testing and certification to meet your time-to-market promise. You will need to carefully assess the costs involved in building your product against your go-to-market pricing and ROI goals. And you will need to ensure that you have a strategy for secure device operation.

The considerations vary by the type of application, and there is no one-size-fits-all process. For example, an industrial tank sensor and a wearable device that reports heart metrics are both IoT applications, but with very different requirements. However, in most cases, the key considerations can be summarized as follows, regardless of the product parameters and its intended use.

Product Requirements

Be sure to take time to assess all of your product requirements. It is far too common for teams to launch the design process without taking the critical first step of accurately identifying the market needs, which can be a costly mistake. Some of the considerations in this phase include:

  1. Market and use case: What is the intended use for the finished product? How much data does it need to process, and how fast? Are you solving a real business problem with the product? Time to market is also a key consideration, as market opportunities can be short lived before other competitors fill the space.
  2. Target price: How will you price your product against any competing products? You want to ensure that you can build sell your product within that market’s price expectations.
  3. Physical placement: How and where will the product be used? For example, will your IoT product be placed in a stable location, such as a medical facility, warehouse or industrial tank? Or will it be on a moving vehicle such as a bus, or perhaps worn by a cyclist or runner?
  4. Geographic location: Where in the world do you want to sell the product? This will affect several design decisions, your entire go-to-market strategy, and the types of certifications required.

Wireless Connectivity and Range

There are several questions to answer in the process of determining your IoT product connectivity requirements:

  1. How will the product connect and transmit data? Will the product have access to a reliable wireless connection, and will it need to communicate over Wi-Fi or cellular for best performance? This decision has several ramifications. For example, a Wi-Fi network will need a gateway for data routing, and local technical support personnel, while a cellular network is maintained by the carrier and requires less maintenance, but it will require a data plan. Note that you can also enable both Wi-Fi and cellular connectivity.
  2. Will the deployment location have structures or objects that can obstruct the signal, or will it be deployed in a remote area?  For example, are you developing an industrial IoT product to be deployed deep in a mine or on a remote oil derrick? If so, you will need a strategy for managing connectivity issues.
  3. What type of antenna will you need to support your connectivity requirements? Antenna requirements are based on several factors including the wireless range needed, size of the device, its location and placement, the radio hardware and wireless communication protocol, and whether the device is indoors or outdoors.

Battery Life

Determining whether your IoT product will be wireline powered or battery powered is a significant decision and involves several considerations. The type and location of the device will help to determine whether it should be rechargeable, or whether it is more important to design for proactive battery management to support long battery life. For example, you would expect to regularly recharge most cellular devices, such as wearables, but a device that monitors a remote industrial tank would require a battery that needs to be changed out infrequently. Another key consideration in IoT development is that some wireless protocols are better suited to battery-powered devices than others.

Certifications and Time-to-market

Wireless products have certification requirements based on the region(s) in the world in which they are deployed. For example, in the U.S., wireless products must pass FCC and cellular certifications. Other regions have different requirements, and you will need to meet them all if you want to market your product worldwide, or in multiple regions. This process can be arduous if you have not planned and designed your product with knowledge of the various certification requirements in mind. On the other hand, planning for certification, and even starting with pre-certified communication modules, can dramatically reduce the time, cost and pain involved in moving through the certification process.

Building your product using a pre-certified module and designing your product for rapid certification can also help speed your time-to-market. IoT product developers often struggle with the question of whether to build their product from the ground up or start with pre-built components. If you have plenty of time and your application’s end-user cost is more important than time-to-market, you may want to build. If you need to get to market quickly to release a competitive or in-demand product, building your IoT application based on pre-certified modules will likely give you more advantage.

Launching Your Product Design

Once you have determined your IoT product requirements in detail, and ensured that you have a feasible product that meets a market requirement, you are finally ready to embark upon your product design. The electrical design of a wireless product includes the layout of your PCB, considerations around isolation of your RF signal, impedance matching, types and locations of ports and connectors, and power supply. To make these determinations, you will need to have an experienced RF engineer and mechanical engineer on staff, or have the ability to consult with a professional RF design services team to create the board layout and ensure component decisions match the product requirements.

As a best practice, consider performing a feasibility study to ensure your design plan is going to work, and start by prototyping the product to learn about any obstacles you may encounter in your final design. Resolving these issues in the prototyping phase of your project can save an enormous amount of time and cost, and ensure that you get to market on schedule.

Design and Build Resources

Digi offers a wide range of solutions for every aspect of your wireless product design process, from a complete suite of product components, to professional design services that can support your design, feasibility, certification, testing, security and deployment requirements, to documentation and Knowledge Base articles. To learn more about Digi’s end-to-end solutions for IoT development, contact Digi today.

>>Be sure to sign up to get notified of the release of our upcoming guide, Wireless Communication Basics: A conceptual guide to RF technology for IoT.

Contact a Digi expert and get started today! Contact Us
Have a Question?