contiki-ng
release/v5.1Features
-
Full RFC-compliant IPv6 networking stack with 6LoWPAN header compression for constrained links.
-
Support for 6TiSCH (TSCH) providing high-reliability, low-latency, and low-power industrial wireless communication.
-
RPL (IPv6 Routing Protocol for Low-Power and Lossy Networks) available in both Classic and Lite versions.
-
Native support for CoAP and CoAPs for RESTful interaction in constrained environments.
-
Implementation of OMA LwM2M for standardized device management and service enablement.
-
Protothreads-based multitasking providing a memory-efficient, event-driven programming model without the overhead of per-thread stacks.
-
Integrated Coffee File System designed specifically for flash memory storage on resource-constrained devices.
-
Antelope database management system for local data indexing and querying on embedded nodes.
-
Energest software-based energy estimation module for fine-grained monitoring of power consumption.
-
Support for MQTT and MQTT5 protocols for efficient cloud and broker-based connectivity.
-
Comprehensive security suite including AES-CCM*, Elliptic Curve Cryptography (ECC), and CBOR support.
-
Integrated Cooja simulator for large-scale network simulation and cross-level debugging.
-
Link-time optimization (LTO) support to significantly reduce binary footprint on small-memory devices.
-
Hardware Abstraction Layer (HAL) for standardized access to GPIO, UART, SPI, and radio interfaces.
-
Support for MPL (Multicast Protocol for Low-Power and Lossy Networks) as per RFC7731.
Contiki-NG is architected as a modular, event-driven operating system specifically optimized for the Internet of Things. At its core, it utilizes a unique multitasking mechanism called Protothreads, which provides a stackless, C-based implementation of cooperative multithreading. This allows the system to handle complex asynchronous events and networking protocols with extremely low memory overhead, as it avoids the need for dedicated stacks for every process.
The system is structured into several distinct layers: the Hardware Abstraction Layer (HAL), which provides a uniform interface for various MCUs and radios; the Core OS, which manages processes, timers, and events; and the Network Stack, which is the most prominent feature of Contiki-NG. The network stack is highly configurable, allowing developers to choose between various MAC layers (CSMA, TSCH, NullMAC) and network layers (IPv6, NullNet). These subsystems interact through well-defined APIs, enabling the integration of services like LwM2M or MQTT on top of the standard IPv6/6LoWPAN foundation.
Core Components
- Protothreads: Lightweight, stackless threads for event-driven systems.
- uIP Stack: A highly optimized IPv6 stack supporting TCP, UDP, and ICMP6.
- TSCH/6TiSCH: Time-Slotted Channel Hopping for industrial-grade reliability.
- Coffee FS: A flash-optimized file system for persistent storage.
- Energest: A real-time energy profiling tool for tracking power states.
Use Cases
This RTOS is ideal for:
- Industrial Wireless Networks: Utilizing 6TiSCH and TSCH to provide deterministic communication and high reliability in environments with heavy interference.
- Smart City Infrastructure: Leveraging RPL and IPv6 for large-scale mesh networks such as smart street lighting and environmental monitoring.
- Remote Asset Management: Using OMA LwM2M and CoAP for standardized device configuration, firmware updates, and telemetry over low-power wide-area links.
- Energy-Critical IoT Sensors: Employing Energest and low-power MAC protocols for battery-operated devices that must remain functional for years without maintenance.
Getting Started
To begin developing with Contiki-NG, it is highly recommended to use the provided Docker image, which contains the complete toolchain, including compilers for ARM and MSP430, as well as the Cooja simulator. Developers can clone the repository and run a “Hello World” example by navigating to examples/hello-world and executing make TARGET=native. For network simulations, the Cooja Simulator allows for testing large-scale RPL or TSCH networks on a PC before deploying to physical hardware. Detailed documentation, including tutorials on the build system and configuration, is available at docs.contiki-ng.org.
Related Projects (20)
Contiki LoRa TSCH Project
An implementation of the Time-Slotted Channel Hopping (TSCH) MAC protocol over LoRa physical layers using the Contiki-NG RTOS. It features a modified Contiki-NG kernel to support the longer timeslots required by LoRa modulation and includes support for the Orchestra scheduler and RPL routing.
ELISE: SDN-based Solution for IoT Networks
ELISE is a Software-Defined Networking (SDN) framework for Wireless Sensor Networks (WSNs) built on Contiki-NG. It features a Python-based controller with reinforcement learning capabilities, TSCH scheduling, and support for the Cooja simulator and FIT IoT LAB platforms.
QL-TSCH Implementation for Contiki-NG
A specialized implementation of Q-Learning based Time-Slotted Channel Hopping (QL-TSCH) for the Contiki-NG RTOS. It focuses on optimizing scheduling protocols for low-power wireless sensor networks, providing custom MAC layer configurations and support for the Cooja simulation environment.
RL-TSCH Implementation for Contiki-NG
A Reinforcement Learning (RL) based scheduling protocol implementation for Time-Slotted Channel Hopping (TSCH) within the Contiki-NG operating system. It provides modified system files to enable intelligent scheduling in IEEE 802.15.4 networks, specifically targeting the Cooja simulation platform.
Smart-DC-Maintenance
An IoT-based monitoring system for datacenters that tracks rack environmental conditions and worker biometric signals. Built on Contiki-NG for TI CC2650 microcontrollers, it utilizes a hybrid CoAP and MQTT network architecture with a Java collector and Grafana dashboard.
Smart Heating IoT System
A complete IoT home automation system for smart heating using the Contiki-NG operating system and CoAP protocol. It features a sensor-actuator network integrated with a Java-based cloud application built on the Californium framework for remote monitoring and control.
Smart Orchard
An IoT application for smart orchard monitoring and management based on the Contiki-NG operating system. It features a network of CoAP-enabled sensors and actuators, a border router for cloud connectivity, and a Java-based backend for data processing and control. The system is designed to be simulated in the Cooja environment, allowing for extensive testing of network topologies and automated irrigation logic.
SmartOrchard
SmartOrchard is an IoT-based orchard management system utilizing Contiki-NG for low-power mote devices and a Java-based cloud application. It features a network of CoAP-enabled sensors and actuators for monitoring environmental conditions like soil humidity and air temperature, and controlling greenhouse systems.
SX127X LoRa Transceiver Driver for Contiki-NG
A specialized device driver for Semtech SX127X LoRa transceivers designed for the Contiki-NG operating system. It features specific optimizations for the TSCH (Time-Slotted Channel Hopping) protocol and provides a portable SPI-based interface for various embedded platforms.
SX128X LoRa Transceiver Driver for Contiki-NG
A dedicated driver for the Semtech SX128x series of LoRa transceivers, specifically designed for the Contiki-NG operating system. It enables the use of the TSCH (Time-Slotted Channel Hopping) protocol over LoRa for low-power wide-area network research and applications.
X-CUBE-SUBG2 Firmware Package
An STM32Cube expansion package providing drivers and middleware for the S2-LP low-power sub-1GHz transceiver. It features Point-to-Point communication examples and a full 6LoWPAN stack based on Contiki-NG for IoT networking. The software supports various STM32 Nucleo boards and X-NUCLEO expansion shields.
AI for Smart Cities
A comprehensive suite of intelligent solutions for smart city challenges, including anomaly detection, fake task identification, and network attack simulation. It utilizes the Contiki-NG RTOS for wireless sensor network simulations and various machine learning algorithms for data analysis.
CoAP-EAP with EAP-NOOB in Contiki
This project provides an implementation of the EAP-NOOB (Nimble Out-of-Band) authentication method and CoAP-EAP protocol for secure bootstrapping of IoT devices. Built on the Contiki-NG RTOS, it enables secure association of appliances with user accounts using out-of-band communication channels.
Computer Network with Contiki-NG
A repository containing network simulations and RPL protocol implementations for the BIL401 Computer Networks course. It utilizes the Contiki-NG RTOS and Cooja emulator to explore DODAG structures, border node communication, and routing optimizations based on RSSI and hop count.
ContikiPy
ContikiPy is a suite of Python scripts designed to automate Cooja simulations, parse logs, and generate plots for the Contiki-NG and Contiki-OS environments. It simplifies the workflow of extracting results from simulation logs using YAML configurations and integrated data processing with Pandas.