All posts tagged: operating

Let’s take a brief look at the FreeRTOS operating system, and the FreeRTOS+Nabto platform. It’s the market-leading, real-time operating system (RTOS) for embedded systems that is not only open-source, high quality and well supported – but also provides strong cross-platform support across 33 different architectures, access to high-quality training and information, pre-configured example projects and a growing user community.

Furthermore FreeRTOS is available in a high-reliability TUV-approved version for demanding, safety-critical applications – providing peace of mind to commercial users, with strict configuration management to ensure high quality development of the FreeRTOS project’s code, and FreeRTOS is free to embed in commercial products without any requirement to expose your proprietary source code.

By combining the FreeRTOS real-time operating system with the patented Nabto peer-to-peer remote access communication platform for embedded systems, you can harness a simple and secure HTML5 or native application interface for your end users, along with an adaptive and flexible data-acquisition interface for data collection, central analysis and monitoring systems.

The resulting combined system brings simplicity, platform independence, inclusive cloud hosting services and entry level access to Nabto’s Internet-of-Things solution together into an interesting easy yet powerful real-time platform for use with embedded Internet-of-Things systems.

FreeRTOS+Nabto is a small piece of C code that, when integrated into an embedded networked device, allows that device to be remotely accessed and controlled through a rich web-based or native iOS or Android app-based interface or intelligent data acquisition system – consuming less than 23 Kb of flash in a typical system including both the FreeRTOS kernel and the IP stack.

Each device has a unique URL, allowing the device to be automatically located across the Internet, and the Nabto technology allows secure, authenticated and bandwidth-efficient peer-to-peer connections to be established even when the device is deployed behind a NAT firewall which removes the complexity of configuring firewall penetration for embedded Internet-of-Things devices in enterprise environments. 

FreeRTOS+Nabto enabled devices can also be accessed over the local network in the absence of Internet connectivity. As FreeRTOS+Nabto is a new, simple, cross-platform and fully integrated solution for the Internet of Things, it provides a cloud infrastructure that enables IoT devices to be accessed through a rich user interface running in a web browser or a smartphone app – requiring the device itself to only supply the live sensor data and no other components of the interface, supplying this data via UDP in a lightweight way.

Free RTOS

This means that the embedded devices themselves can be kept simple, power-efficient and lightweight – the use of cloud technologies means small FreeRTOS+Nabto devices can be given rich user interfaces without the need for any on-board filesystem or a TCP/IP stack, only relatively lightweight UDP/IP networking support.

These rich user interfaces can be accessed locally via the LAN or anywhere in the world via the Internet, from a computer, tablet or smartphone, with local device discovery and unique and resolvable URLs for each FreeRTOS+Nabto device provided over the chosen domain (LAN or Internet), solving the traditionally difficult problem of naming and uniquely identifying devices in large Internet-of-Things networks.

Using FreeRTOS+Nabto you can connect to a remote IoT device wherever that device is at the time of the connection simply by knowing the device’s unique URL, and being securely authenticated as a legitimate user, with the system handling all the networking, routing and encryption necessary to securely network your IoT devices, address and find them – across the LAN or across the Internet.

All you need to do as an application developer is compile the source code, write a single interface function, and make use of the FreeRTOS+Nabto fully managed cloud service. Instructions and tutorials are provided to make this easy for you, with a strong community of users and the availability of professional support for commercial customers.

Different web content can be served to different geographic regions, moving the burden of internationalisation from the embedded device into the cloud, allowing for even smaller code size and simpler more maintainable designs. All the network routing and protocol details are encapsulated within the FreeRTOS+Nabto product and its inclusive cloud hosting service, enabling FreeRTOS+Nabto to interface with the user’s application source code through a single C function, and enabling FreeRTOS+Nabto to be accessible to users and developers without an advanced level of existing networking expertise.

The FreeRTOS+Nabto platform includes a fully documented live online example that is running on a small real-world microcontroller and a separate project that uses the FreeRTOS Windows simulator. The Windows simulator version creates live virtual FreeRTOS+Nabto nodes on a local network to allow FreeRTOS+Nabto to be evaluated quickly and easily and without the need to purchase any specific hardware.

Although the simulator differs from FreeRTOS running on real hardware in that it does not exhibit real-time behaviour, the ability to set up a development environment, create and experiment with FreeRTOS+Nabto Internet-of-Things applications on a local network before purchasing any specific hardware is still a very useful and attractive capability.

Thanks to the open nature of FreeRTOS, it can be used in a wide range of embedded hardware and become part of your new or existing IoT products. As experts not only embedded hardware but also full idea-to-delivery of products, our consultants and engineers can work with you to meet your goals.

The first step is to join us for an obligation-free and confidential discussion about your ideas and how we can help bring them to life – click here to contact us, or telephone 1800 810 124.

LX is an award-winning electronics design company based in Sydney, Australia. LX services include full turnkey design, electronics, hardware, software and firmware design. LX specialises in embedded systems and wireless technologies design.

Published by LX Pty Ltd for itself and the LX Group of companies, including LX Design House, LX Solutions and LX Consulting, LX Innovations.

Muhammad AwaisFreeRTOS – the cross-platform OS for Embedded Hardware

RIOT is a relatively new operating system specifically aimed at applications in lightweight embedded systems, wireless sensor networks and Internet-of-Things applications. Billed as “the friendly operating system for the Internet of Things”, RIOT is competing with similar offerings such as TinyOS, Contiki and embedded Linux.

This may sound complex, however RIOT is aimed at developer friendliness, allowing you to program like you are used to – using standard programming languages such as C or C++, with standard compilers and tools such as gcc, gdb and valgrind, without the developer wasting time having to learn new or complex development environments.

As a real-time operating system that supports C and C++ development, multithreading and a high degree of modularity, RIOT offers all this with a very small, lightweight footprint that is well suited to use with small microcontrollers with limited memory and resources available.

Thus RIOT is aimed at minimising the learning curve needed for embedded programming whilst also being convenient and accessible to developers with established non-embedded programming experience.

The origins of RIOT can be traced back to 2008, when it was originally forked from the output of a German research program called FeuerWhere, that was dedicated to monitoring the location, safety and environmental conditions of Berlin firefighters working in emergency situations.

After being rebranded and expanded, RIOT was released to the public as an open-source project. RIOT is aimed at bridging the gap between fully-fledged Linux operating systems and existing solutions like Contiki and TinyOS that are aimed primarily at wireless sensor networks. The key design goals of RIOT are memory efficiency, energy efficiency in battery-powered devices, modularity and a developer-friendly programming interface.

RIOT is free, open-source software released under a LGPL license, meaning you can freely re-distribute and modify the software. RIOT is a publicly available community project, with an active community of users and developers online where you can learn more about RIOT, get help with writing an application for RIOT from other users and developers, and participate yourself and contribute to open-source kernel development or the integration of support for new platforms, microcontrollers and peripheral devices.

Implementing systems with RIOT isn’t difficult, due to the numerous supported embedded platforms, including the NXP LPC1768, the Texas Instruments MSP430, ST Microelectronics’ STM32 32-bit ARM family and other Cortex-M3 and Cortex-M4 devices, as well as common x86 PCs and x86 embedded systems.

The hardware dependent code is reduced to a minimum and abstracted from the kernel itself. For users that are more familiar with non-embedded programming and software development, you can start with the native port of RIOT, allowing you to run RIOT inside a process on Linux or OSX.

This eases the development and debugging of both RIOT itself and the projects you are developing that run on top of RIOT, allowing you to analyse, develop, test and debug your software with familiar, open tools and platforms such as gdb and valgrind, and to create virtual testbeds of multiple instances of RIOT running on a virtualised embedded hardware platform, running simultaneously and networked together with a configurable network topology, using only your PC.

After development and testing of your code on the native port and using this virtualisation capability, it can easily be deployed to your real embedded devices. Integrated system-on-chip devices containing integrated microcontrollers and radio transceivers on a single chip, such as TI’s CC430F6137, can be used, along with development boards and platforms such as the mBed, ScatterWeb MSB-A2, ScatterWeb MSB-430H, Memsic Telos-B, Texas Instruments’ eZ430-RF2500 and EZ430-Chronos.

You can write your code once, and easily compile and deploy the same code for both 16-bit platforms such as the MSP430 and 32-bit platforms such as ARM.

RIOT is specifically designed with features that are aimed at lightweight embedded devices for wireless sensor networks and Internet-of-Things applications, including very efficient memory and resource use, reliability and robustness in embedded applications running for long periods out in the field without maintenance, a real-time kernel with very low interrupt latency, priority-based scheduling and a tickless scheduler, high energy efficiency, strong code-footprint flexibility and multi-threading with very low threading overhead – making RIOT well suited to the smaller things in the Internet of Things.

RIOT includes core support for IPv6 6LoWPAN (RFC6282 and RFC6775 compliant), UDP, TCP including 6LoWPAN header compression, RFC6550/RFC6719-compliant RPL, and CCN-lite for content-centric networking support.

Furthermore the system includes high-resolution and long-term timers, which is important for embedded applications where timers may need to be running constantly in a device that is deployed for months or years without being rebooted. Other useful tools and utilities are built in, such as support for SHA-256 and Bloom filtering. RIOT includes wiselib built-in, which is a generic C++ algorithm library for heterogeneous, distributed, embedded systems, including algorithms for routing, clustering, time sync, localisation, security, and other common functions.

LX2

RIOT includes many built-in drivers for hardware peripherals that allow you to get started with useful hardware applications right out of the box. Some of the supported hardware peripherals include the CC2420, CC1100 and AT86RF231 radio transceivers, the Sensirion SHT11 humidity and temperature sensor, the LTC4150 battery charge/discharge counter, and many other sensors including accelerometers and ultrasonic rangefinders.

Thus with your product needs identified, RIOT can work with a wide range of hardware and base MCUs to form a complete product without “re-inventing the wheel”. If this is of interest, or you need guidance for any or all stages of product design – the first step is to discuss your needs with our team of experienced engineers that can help you in all steps of product design, from the idea to the finished product.

To get started, join us for an obligation-free and confidential discussion about your ideas and how we can help bring them to life – click here to contact us, or telephone 1800 810 124.

LX is an award-winning electronics design company based in Sydney, Australia. LX services include full turnkey design, electronics, hardware, software and firmware design. LX specialises in embedded systems and wireless technologies design.

Published by LX Pty Ltd for itself and the LX Group of companies, including LX Design House, LX Solutions and LX Consulting, LX Innovations.

Muhammad AwaisRIOT – the friendly OS for the IoT

Contiki is a lightweight, multitasking operating system aimed primarily at memory-constrained embedded systems, wireless sensor networks, low-power networked embedded devices and the general “Internet of Things”. Contiki is resource efficient, highly portable, and it is free, open-source software.

Although Contiki is free software and its underlying source code is freely downloadable, some commercial companies such as ThingSquare provide professionally supported solutions for the deployment of Contiki-based Internet-of-Things applications and products in the commercial sector, just as is the case with the Linux ecosystem.

Designed to run on embedded hardware platforms that are severely constrained in terms of memory, processing power and communication bandwidth, Contiki still offers a multitasking kernel and a built-in TCP/IP stack, and a real-world Contiki deployment can be run on an 8-bit microcontroller, for example, with only about 10 kilobytes of RAM, 30 kilobytes of flash, a clock on the order of 10 MHz and a power budget on the order of 10 milliwatts.

Thanks to these low system requirements, Contiki has been or is being ported to many common microcontroller platforms – such as Atmel AVR, Microchip dsPIC and PIC32, TI’s MSP430 low-power microcontrollers, and ARM-based systems such as the TI CC2538.

Contiki

Networking is easy with Contiki, as it provides three lightweight, memory efficient networking stacks – the uIP TCP/IP IPv4 stack, the uIPv6 stack, providing support for IPv6 networking, and the Rime stack, which is a set of custom lightweight networking protocols designed specifically for low-power wireless sensor networks.

The IPv6 stack also contains the RPL routing protocol for increased tolerance of packet loss in low-power IPv6 radio networks and the 6LoWPAN header compression and adaptation layer for IEEE 802.15.4 radio networks. Contiki is particularly well suited to use with microcontroller systems-on-chip incorporating an IEEE 802.15.4 radio transceiver on board, such as the Atmel ATmega128RFA1 family or the Texas Instruments CC2538.

Such hardware platforms, combined with Contiki, provide highly integrated, cost-efficient, power-efficient single-chip wireless sensor network or Internet-of-Things platforms with wireless IPv6 802.15.4/6LoWPAN networking support on board, allowing IPv6 internet connectivity to be routed right down to the wireless, power efficient end nodes of an Internet-of-Things network.

The Rime stack is an alternative network stack that is intended to be used in applications where the overhead of the IPv4 or IPv6 stacks is prohibitive. The Rime stack provides a set of communication primitives intended for very lightweight applications in low-power embedded wireless networks, which by default include single-hop unicast, multi-hop unicast, network flooding and address-free data collection.

These primitives can be used on their own or combined to form more complex protocols and mechanisms whilst still maintaining the most lightweight mechanism possible to perform the networking task required.

Contiki also provides a set of mechanisms for reducing the power consumption of the system on which it runs, including the ContikiMAC radio duty cycling protocol for improving power efficiency in radio-networked platforms, keeping the radio powered down or running in a low-power mode for as much time as possible while still being able to receive and relay network messages.

These mechanisms enable powerful Contiki-based solutions in severely power-constrained environments such as battery-operated wireless sensor network devices that are expected to operate unattended for long periods of time without battery maintenance or replacement.

To run efficiently on memory-constrained systems, the Contiki programming model is based on protothreads, which are thread-like memory-efficient programming abstractions that share features of both multi-threading and event-driven programming to attain a low memory overhead.

The kernel invokes the protothread of a process in response to an internal or external event. Examples of internal events are timers that fire or messages being posted from other processes, whilst examples of external events could include external interrupts that are triggered by external sensor inputs, or radio-triggered interrupts created by incoming packets on the wireless network.

These protothreads are cooperatively scheduled, meaning that a Contiki process must always explicitly yield control back to the kernel at regular intervals. Processes may use a special protothread construct to block waiting for events while yielding control to the kernel between each event invocation.

Contiki supports per-process optional pre-emptive multi-threading, interprocess communication using message passing through events and an optional GUI subsystem with either direct graphic support for locally connected terminals or networked virtual displays via VNC or Telnet. However, the use of a graphical user interface does increase memory requirements a little, from a minimum of 10 kilobytes of RAM up to a minimum of about 30 kilobytes of RAM.

The Contiki system includes a network simulator called Cooja. The Cooja Contiki Network Simulator simulates networks of nodes running Contiki which may belong to one of three classes – emulated nodes, where the entire hardware of each node is emulated, Cooja nodes, where the Contiki code for the node is compiled for and executed on the simulation host, or Java nodes, where the behaviour of the node must be reimplemented as a Java class.

A single Cooja simulation may contain many nodes from a mixture of any or all of the three classes. Emulated nodes can also be used to include non-Contiki nodes in a simulated network environment. Cooja can also be used to simulate real-world physical effects in large wireless mesh networks, such as packet loss and network degradation in RF networks.

With the combination of low-powered embedded wireless hardware, Contiki and the tools included – you have the foundation for a scalable, efficient and contemporary Internet-of-things.

To get started with your own ideas and Contiki, or to explore other options to solve your problems – join us for an obligation-free and confidential discussion about your ideas and how we can help bring them to life – click here to contact us, or telephone 1800 810 124.

LX is an award-winning electronics design company based in Sydney, Australia. LX services include full turnkey design, electronics, hardware, software and firmware design. LX specialises in embedded systems and wireless technologies design.

Published by LX Pty Ltd for itself and the LX Group of companies, including LX Design House, LX Solutions and LX Consulting, LX Innovations.

Muhammad AwaisContiki – the low-power IoT Operating System