IoT Developer’s Software Toolkit. Part I: Operating Systems and Frameworks

October 6, 2015

Internet of Things is the brave new world for thousands if not millions of developers who have decided to try their hand at putting together an appliance that has to do with sensors, actuators, and data processing.

Be it a smart home solution with scores of devices connected to each other or a few telemetry sensors in your car, developers always have choices to make when designing their IoT appliance. We have already taken a look at different ready-made cloud platforms and visualization tools for IoT, so now it’s time to dig deeper.

Image credit: Christiaan Colen / Flickr
If you’re building an IoT system from the scratch, your choice is wider than ever. In the first part of the overview of software tools and solutions, we’ll talk about operating systems to run on your hardware and frameworks that can make actual development less of a chore.

Operating systems

contiki

The choice of the OS to power your sensors and other hardware can be more or less wide depending on the devices you’ve chosen. If you haven’t made you mind yet, check out our brief overview.

For example, if you want the system to be controlled by a Raspberry Pi or Arduino, you will most likely have just a couple of solutions to choose from. Here are the most interesting OS on offer today.

Raspbian

Arguably the most popular operating system for Raspberry Pi, Raspbian comes with over 35,000 packages optimized for best performance on these computers. As the name suggests, Raspbian is actually a port of Debian, namely Debian Wheezy released in 2013.

Being a “normal” full-fledged OS at its core, Raspbian can be used for any kind of task, including IoT applications. A Raspberry Pi can function as a hub that collects and, in some cases, analyzes data from a number of sensors and passes it on to the cloud or elsewhere.

In addition to that, Raspbian can use MATE, a fork of the discontinued Gnome 2, to provide a graphic user interface.

Contiki

This operating system has been around since 2003 and is widely used in systems with limited resources. Requiring just 10 KB of RAM and 30 KB or ROM to function, Contiki is now positioning itself as an ultimate OS for the Internet of Things.

The main goal of Contiki is to connect low-power microcontrollers to the Internet. The platforms it can run on include Re-Mote, wismote, seed-eye and many others.

One of Contiki’s benefits is easy development. Apps for the OS are written in standard C, while the Cooja simulator allows to emulate a Contiki network to test your code. In addition to that, you can download Instant Contiki, an entire develpment environment in the form of an Ubuntu Linux virtual machine.

Riot OS

Another operating system focused on the Internet of Things, RIOT requires even less memory to run than Contiki. The versatile OS is supposed to be functioning with just 1.5 KB of RAM and 5 KB of ROM. What’s even more interesting, it can run on a few embedded architectures but also on common x86 computers.

RIOT OS offers developers a possibility to run code in C and C++ and use standard tools, including gcc, gdb, and valgrind. You can write and test your code on Linux or OS X using the native port.

In order to enable maximum energy efficiency, RIOT supports multi-threading with a threading overhead of less than 25 bytes per thread in addition to providing real-time capability with low interrupt latency and priority-based scheduling.

Windows 10 IoT Core

Publicly released in August 2015, this is a special edition of Windows for resource-constrained embedded devices. The operating system currently supports Raspberry Pi 2 and MinnowBoard MAX. In addition to that, you can create virtual shields for Arduino boards.

Obviously, Windows 10 IoT Core will let you run code in any language you’d normally use with Windows, which is a great benefit for developers who want to try their hand at the Internet of Things.

Although still living through early stages, Windows 10 IoT Core appears to have good prospects, especially considering the giant corporation with virtually unlimited resources behind it.

Frameworks

nodered

The Internet of Things appliances require quite a bit of low-level programming in order to ensure that sensors and other devices communicate with each other smoothly and “understand” the data sent to them. That’s why we need frameworks, which basically provide a higher level of abstraction and take care of the underlying communication protocols and other nuances.

Check out some of the most interesting ones you can use in your projects.

Eclipse Kura

Part of the Eclipse IoT project, Kura is a platform for building IoT gateways. It runs on top of the JVM (Java Virtual Machine) and offers a bunch of APIs to access different pieces of hardware, including serial ports, GPS, USB, GPIOs, etc.

Kura comes with a number of services, such as remote management, telemetry data storage and forwarding, cloud services communication API, remote management, and web-based management console. It can be used in systems based on Raspberry Pi, BeagleBone and Intel Edison boards.

Node-RED

While not being exactly a framework, Node-RED is a fairly interesting platform for wiring together devices, APIs and online services. It provides a browser-based visual flow editor that allows to create and connect nodes and flows.

The whole thing is built on Node.js, which makes it lightweight and suitable to run on resource-constrained devices. Node-RED supports the most popular IoT hardware platforms: Raspberry Pi, Arduino, and BeagleBone.

KinomaJS

Another JavaScript-based IoT framework, KinomaJS is a part of Kinoma’s offering for IoT that also includes the Kinoma Studio IDE and Kinoma Create hardware prototyping platform.

The application framework also provides an optional XML programming interface. KinomaJS itself is open source, while Kinoma’s hardware prototyping products work with off-the-shelf components.

AllJoyn

The open-source product released by the Allseen Alliance is a flexible framework that “makes it easy for developers to write applications that can discover nearby devices, and communicate with each other directly regardless of brands, categories, transports, and OSes without the need of the cloud.”

This noble goal is achieved by providing a simple API for secure communication between devices. It runs on RTOS, Arduino, Linux, Android, iOS, Windows, and Mac, supporting bindings in C, C++, Objective C, and Java.

M2MLabs Mainspring

As follows from the name of its creator, Mainspring is an application framework for building machine-to-machine (M2M) applications. Use cases of such apps include remote monitoring, fleet management or smart grid solutions.

Mainsprings’ features include flexible modeling of devices and their attributes, convenient device configuration, long-term storage of data in a compact format, and data retrieval functions for external applications using REST API.

The framework is written in Java and runs on standard J2EE6 application servers, while the data storage is powered by the Cassandra noSQL database.

 

This overview of operating systems and frameworks for IoT projects should help you to choose right products for your next big thing.

In the second part of this article, which will be out soon, we’ll talk about middleware and M2M communications solutions. Stay tuned!