![]() Screenshot of an Ubuntu system showing Contiki 2.6 running on 41 nodes forming an IPv6-RPL-6LoWPAN network in the Cooja Contiki network simulator. | |
Developer | Adam Dunkels |
---|---|
Source model | Open source |
Initial release | 10 March 2003; 22 years ago (2003-03-10) |
Final release | 3.0 / 25 August 2015; 9 years ago (2015-08-25) |
Repository | github |
License | BSD-3-Clause |
Official website | www |
Stable release | 4.9 / June 17, 2023; 21 months ago (2023-06-17) |
---|---|
Repository | github |
Website | www |
Contiki is anoperating system for networked, memory-constrained systems with a focus on low-power wirelessInternet of Things (IoT) devices. Contiki is used for systems forstreet lighting, sound monitoring forsmart cities,radiation monitoring and alarms.[1] It isopen-source software released under theBSD-3-Clause license.
Contiki was created byAdam Dunkels in 2002[2] and has been further developed by a worldwide team of developers from Texas Instruments, Atmel, Cisco,ENEA,ETH Zurich, Redwire,RWTH Aachen University, Oxford University, SAP, Sensinode,Swedish Institute of Computer Science, ST Microelectronics, Zolertia, and many others.[3] Contiki gained popularity because of its built in TCP/IP stack and lightweightpreemptive scheduling overevent-drivenkernel[4] which is a very motivating feature for IoT. The nameContiki comes fromThor Heyerdahl's famousKon-Tiki raft.
Contiki provides multitasking and a built-inInternet Protocol Suite (TCP/IP stack), yet needs only about 10kilobytes ofrandom-access memory (RAM) and 30 kilobytes ofread-only memory (ROM).[1] A full system, including agraphical user interface, needs about 30 kilobytes of RAM.[5]
A new branch has recently been created, known asContiki-NG: The OS for Next Generation IoT Devices
Contiki is designed to run on types of hardware devices that are severely constrained inmemory,power, processing power, and communicationbandwidth. A typical Contiki system has memory on the order of kilobytes, a power budget on the order of milliwatts, processing speed measured in megaHertz, and communication bandwidth on the order of hundreds of kilobits/second. Such systems include many types ofembedded systems, and old8-bit computers.
Contiki provides three network mechanisms: theuIP TCP/IP stack,[6] which providesIPv4 networking, the uIPv6 stack,[7] which providesIPv6 networking, and the Rime stack, which is a set of custom lightweight networking protocols designed for low-power wireless networks. The IPv6 stack was contributed by Cisco and was, when released, the smallest IPv6 stack to receive theIPv6 Ready certification.[8] The IPv6 stack also contains theRouting Protocol for Low power and Lossy Networks (RPL) routing protocol for low-power lossy IPv6 networks and the6LoWPAN header compression and adaptation layer forIEEE 802.15.4 links.
Rime is an alternative network stack, for use when the overhead of the IPv4 or IPv6 stacks is prohibitive. The Rime stack provides a set of communication primitives for low-power wireless systems. The default primitives are single-hop unicast, single-hop broadcast, multi-hop unicast, network flooding, and address-free data collection. The primitives can be used on their own or combined to form more complex protocols and mechanisms.[9]
Many Contiki systems are severely power-constrained. Battery operated wireless sensors may need to provide years of unattended operation and with little means to recharge or replace batteries. Contiki provides a set of mechanisms to reduce the power consumption of systems on which it runs. The default mechanism for attaining low-power operation of the radio is called ContikiMAC.[10] With ContikiMAC, nodes can be running in low-power mode and still be able to receive and relay radio messages.
The Contiki system includes a sensor simulator called Cooja, which simulates Contiki nodes.[11] The nodes belong to one of the three following classes: a) emulated Cooja nodes, b) Contiki code compiled and executed on the simulation host, or c) Java nodes, where the behavior of the node must be reimplemented as a Java class. One Cooja simulation may contain a mix of sensor nodes from any of the three classes. Emulated nodes can also be used to include non-Contiki nodes in a simulated network.
In Contiki 2.6, platforms with theTI MSP430 andAtmel AVR microcontrollers can be emulated.
To run efficiently on small-memory systems, the Contiki programming model is based onprotothreads.[12][13] A protothread is a memory-efficient programming abstraction that shares features of bothmultithreading andevent-driven programming to attain a low memory overhead of each protothread. 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. Examples of external events are sensors that trigger or incoming packets from a radio neighbor.
Protothreads are cooperatively scheduled. Thus, a Contiki process must always explicitly yield control back to the kernel at regular intervals. Contiki 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 preemptive multithreading,inter-process communication using message passing through events, as well as an optionalgraphical user interface (GUI) subsystem with either direct graphic support for locally connected terminals or networked virtual display withVirtual Network Computing (VNC) or over Telnet.
A full installation of Contiki includes the following features:
Contiki is supported by popularSSL/TLS libraries such aswolfSSL, which includes a port in its 3.15.5 release.[14]
{{citation}}
: CS1 maint: location missing publisher (link){{citation}}
: CS1 maint: location missing publisher (link).{{citation}}
: CS1 maint: location missing publisher (link)Dunkels, A.; Schmidt, O.; Voigt, T.; Ali, M. (2006). "Protothreads".Proceedings of the 4th international conference on Embedded networked sensor systems - SenSys '06. p. 29.doi:10.1145/1182807.1182811.ISBN 1595933433.S2CID 983128. (PDF,Presentation slides).