Cellular Connectivity for The Internet of Things in 5 minutes

/ Written By Pat Wilbur

Our goals at Konekt, Inc. are centered around providing turnkey, practical solutions to the real needs of machine-to-machine (M2M) developers and the Internet of Things. These include establishing connectivity, logging and otherwise consuming data, providing convenient hardware and software development kits, and offering tools for both rapid prototyping and rapid production; however, since we want to help bring ideas to life, both big and small, we also aim to help the entire product lifecycle—securing machine to machine communications, key management, over-the-air (OTA) updates, versioning, cloud-based configuration, connection health monitoring, remote reset, etc.

Our hardware goals are essentially the same and, throughout the development of the Konekt Dash and Konekt Dash Pro cellular dev kits, developers have chimed in and we’ve listened.

We’re excited to announce that we just simplified cellular IoT and M2M development to the absolute simplest form known to us; as a result, your projects need not be made cellular-aware or even include any software libraries in order to utilize cellular Internet/cloud connectivity (although we do provide optional libraries to unlock more advanced features and connection control to your software).

Cellular M2M/IoT connectivity as simple as Serial.print()

If you’ve ever used a standalone dedicated data logger in an electronics or sensing project, you have probably appreciated the simplicity that data loggers provide—generally, you connect a data line (probably serial) between your project and the data logger, and data loggers take care of flash/memory management, handle storage and archival, often provide their own real-time clock for time-series logging, and sometimes even implement file systems to make downloading data on another device even easier.  Similarly, imagine if connecting a device to the Internet of Things or integrating with various cloud services could be as simple as a Serial.write() or Serial.print()? With the Konekt Dash and Konekt Dash Pro, it is!

This is made possible by offloading the cellular bootstrap process, TCP/IP stack, cloud stack, and over-the-air update process away from the primary microcontroller that runs user software. This design offers five main benefits:

  1. More flash space available for your own programs
  2. Better remote unbricking and remote reset capabilities
  3. No need to customize an application to one connectivity solution (i.e. cellular communications via our module)
  4. Code portability to other connectivity options that we provide in the future
  5. Easier turnkey encryption, security, and even TPM-like capabilities

Combine these benefits with our zero-configuration out-of-the-box experience, and you can implement production and deployment-ready cellular connectivity in under five minutes.  Here’s how:

Production and deployment-ready cellular connectivity 

You have two options to get up and running in under five minutes, depending upon your hardware preferences. The first option involves connecting the Dash or Dash Pro to an existing device via TTL UART or USB. The second option involves running your own software on the Dash or Dash Pro using the Arduino IDE.

Option A: Interfacing the Konekt Dash or Konekt Dash Pro to an existing microcontroller or microprocessor (e.g. Arduino, Raspberry Pi, Beagle Bone)

The default firmware image loaded on the Dash and Dash Pro provide serial pass-through functionality (the baud rate and other configuration options can be performed via logging into our website). Here’s what you need to do:

  1. If you haven’t yet activated your SIM, Log In to your Konekt account, click Activate SIM, select a plan, etc.
  2. Connect either the TTL UART Tx and Rx pins or the USB connector on the Konekt Dash or Konekt Dash Pro to your existing device
  3. Connect the battery to your Dash or Dash Pro via the JST connector
  4. Power on your existing device and have it send serial data to the Dash or Dash Pro

Option B: Load custom firmware on the Konekt Dash or Konekt Dash Pro

Even when loading custom firmware on the Konekt Dash or Konekt Dash Pro via the Arduino IDE, achieving cellular connectivity can still be accomplished in under five minutes. Here’s how:

  1. If you haven’t yet activated your SIM, Log In to your Konekt account, click Activate SIM, select a plan, etc.
  2. Connect the battery to your Konekt Dash or Konekt Dash Pro via the JST connector
  3. Connect a USB cable (make sure it is a data cable and not just a charging cable) between the computer and your Konekt Dash or Konekt Dash Pro
  4. Open the Arduino IDE
  5. Write the following sketch:
    # Hello Cloud example
    #
    # Description:
    # Konekt Dash and Konekt Dash Pro simple serial-over-cellular test
    #
    # Author: Patrick F. Wilbur
    # Copyright: Copyright 2015 Konekt, Inc.
    # License: Public Domain
    #
    # Last-modified: 2015-05-08
    
    #define CLOUD Serial1
    
    void setup() {
       CLOUD.begin(9600);
       /* don't place in loop(), else it will consume lots of data... */
       CLOUD.println("Hello, Cloud!");
    }
    
    void loop() {
       /* not used in this example */
    }
    
  6. In the Arduino IDE, click Upload
  7. On the Konekt Dash or Konekt Dash Pro, momentarily press the Program button
  8. Back on our website, click Data Logs from the navigation menu and you will see your device data in our cloud!
  9. (Optionally, click New Routing Rule if you want to route future device data to a third-party cloud service, your own webserver or application via a custom webhook, etc.)
cellular connection for The Internet of Things - Konekt.io

Device data sent to the modem via a Serial.println() function appears in the Konekt Cloud without any additional programming or configuration needed.

A reasonable amount of data can be written to the modem even before the modem bootstrap process has completed, and it will be buffered and sent to the Konekt Cloud once connectivity is established. Device-cloud pairing, cloud credential exchange, modem initialization, and socket and networking control will happen automatically with zero configuration out of the box.

My data is in the Cloud. Now what?

Once your device data is successfully arriving in the Konekt Cloud, you can click New Routing Rule on the Data Routes page to configure routing rules for device data. These routing rules can take your device data and route it (e.g.) to third-party services, an inbox via e-mail, or your own website or application via custom webhook. We also offer a persistent datastore service that can be used alone or in conjunction with routing rules, enabling a time-series log of all device data (accessible both through our website and via API). Best yet, you can later on customize routing rules to enable new uses of your device data possibly without ever needing to reprogram your devices.

cellular connection for The Internet of Things - Konekt.io

Device data can optionally be routed to third-party cloud services, to an inbox via email, or to your own website or application via custom webhook.

This simple-serial example that I demonstrated in this post is only the simplest mode of operation supported by our dev kit and module, but advanced features are also possible via either a simple serial protocol or by including a very lightweight control library in your own software. Such features (tentatively) include:

  • Determining connection status
  • Sending and receiving SMS
  • Sending and receiving binary payloads
  • Connecting directly to third-party servers
  • Performing HTTP GETs and POSTs
  • Changing configuration options
  • Determining amount of device data allotment remaining
  • Many others

Conclusion

My record for performing all of these steps (with my billing information already on file) is 3 minutes and 11 seconds. Think you can beat my record?

Next in the series: Route IoT Device Data with Konekt Webhooks

Did you find this blog post helpful? Let us know in the comments below and tell us what else you’d like to see!

UPDATED (April 20, 2016) – Replaced Topics page with Data Logs and Data Routes. Updated screenshots to reflect this.


 

Comments are closed.