Contiki-NG
develop
Getting Started
Docker
Setup
Launching and Exiting
Shell for new container
Additional shell for existing container
Exit
Usage
On Windows
Prerequisites
Limitations
How to Run
On macOS
Without XQuartz
for “Docker for Mac”
for “Docker Toolbox on macOS”
With XQuartz
for “Docker for Mac”
for “Docker Toolbox on macOS”
Using a different docker image
Running out-of-tree-tests
NAT64 for Contiki‐NG
NAT64
Running NAT64 / Jool
Installing Jool
Starting up Jool
DNS64
Tutorial
The Contiki‐NG build system
Build system output structure
Cleaning
More options
Makefiles used in the Contiki-NG build system
The Contiki‐NG configuration system
Modules
Network Stack: MAC Layer
Network Stack: NET Layer
Routing protocol
System configuration
The Contiki‐NG logging system
Using the logging system
Supporting the logging system in a module
Toolchain installation on Linux
Install development tools for Contiki-NG
Install ARM compiler
Install MSP430 compiler
Install Java for the Cooja network simulator
Install JTAG software for CC2538 (optional)
Install a CoAP client (optional)
Install the Mosquitto MQTT broker and accompanying clients (optional)
User access to USB
Improve stability for CC2538
After configuration
Clone Contiki-NG
Toolchain installation on macOS
Install development tools for Contiki-NG
Install some python packages
Install the ARM GCC toolchain
Using homebrew
Manual Installation
Install the MSP430 toolchain
Install Java JDK for the Cooja network simulator
Install a CoAP client (libcoap)
Clone Contiki-NG
Vagrant
Instructions
Provision a VM with a desktop environment
Making local modifications to your Vagrant image
Connecting USB devices to your vagrant guest image
An example for VirtualBox
VirtualBox: Adding USB devices manually
VirtualBox: Adding USB devices by configuring the Vagrant image
Programming Contiki-NG
6TiSCH 6top sub layer
Overview
Code Structure
Configuration Paramters
Caveat
Example
Test
Using 6top
Implementing a Scheduling Function
References
Antelope
Programming Antelope
Antelope Query Language (AQL)
Creating a database
Adding an index
Inserting data
Querying the database
CoAP
About CoAP
CoAP in Contiki-NG
Main parts of the CoAP implementation
Configuration
CoAPs - Secure CoAP
Limitations
Changes 4.0 -> 4.1
Usage
Coffee
The CFS Programming Interface
Opening and Closing Files
Using Files
Listing Directory Contents
Coffee extensions of CFS
Files
Garbage Collection
The Root Directory
Porting Coffee
Communication Security
Application-layer security
Link-layer security
Energest
The Energest Module
The Energest types
Adding new Energest types in a platform
Adding new Energest types in an application
Platform configuration for Energest
Using the Energest Module
IPv6
IPv6 multicast
The Big Gotcha
Where to Start
How to Use
How to extend
IPv6 over BLE
Overview
Features
Modules
BLE radio
BLE L2CAP layer
Using BLEach
IPv6-over-BLE node (BLE slave)
LWM2M
OMA Lightweight M2M and IPSO Smart Objects
LWM2M in Contiki-NG
Creating an IPSO Object
MQTT
MQTT in Contiki-NG
Limitations
Memory management
MEMB: Memory Blocks
Heap Memory (HeapMem)
Multitasking and scheduling
Processes and Events
The Contiki-NG Scheduler and Event Dispatch
Interrupts and contexts
Access to Shared Resources
Writing interrupt handlers
NullNet
Sending with NullNet
Receiving with NullNet
Orchestra
Overview
Requirements
Getting Started
Configuration
Packet buffers
uIP buffer
Packetbuf
Queuebuf
Porting Contiki‐NG to new platforms
Port Contiki-NG to your board and MCU
CPU code
Configure the build system
Develop MCU drivers
Interrupt handlers
Platform code
Prepare the configuration system
Configure the build system
Provide startup, main loop and low-power functions
Develop platform drivers
Add support for similar board variants
Create some examples
Add CI tests
Add documentation
Some common good practice
Observe the code style convention
Avoid code duplication
Is it a CPU thing, or is it a platform thing?
Do not add platform code in platform-independent files
Support
Processes and events
Process Definition
Events and Scheduling
Waiting for events
Pausing and yielding
Stopping processes
System-defined Events
User-defined Events
RPL
About RPL
Implementations
RPL Classic
RPL Lite
Modes of operation (MOP)
Storing mode
Non-storing mode
Mode of operation 0 (MOP0)
RPL Lite: topology formation and configuration
DAG Advertisement
Joining
Preferred parent selection
Route registration
DAG maintenance
Repository structure
SNMP
Documentation: SNMP
SNMP in Contiki-NG
Versions
Usage
Todo
Synchronization primitives
Global Interrupt Manipulation
Data Memory Barriers
Critical sections
Mutexes
Atomic compare-and-swap
TSCH and 6TiSCH
Overview
Getting started
Features
Platforms
Code structure
Using TSCH
Using TSCH with Security
TSCH Scheduling
Configuring the association process
Porting TSCH to a new platform
Radio features required for TSCH
Timing macros required for TSCH
Per-slot logging
Additional documentation
TSCH example applications
Timers
The Clock Module
The Timer Library
The Stimer Library
The Etimer Library
The Ctimer Library
The Rtimer Library
UDP communication
Tutorials
CoAP
Build your own CoAP application
CoAP client
Cooja: simulating a border router
Energy monitoring
The Energest module
Running the energest example
Hello, World!
Running the example as a native node
Running the example on a real device
Running the example in Cooja
Tips
IPv6 ping
Instrumenting Contiki NG applications with energy usage estimation
Using the Energest Module
Energest Module capabilities
Interpreting Simple Energest output
Platform’s current consumption model
Estimating charge consumption and energy consumption
Code example
LWM2M and IPSO Objects
Example IPSO objects LWM2M client
For platform native
For a wireless embedded device
LWM2M Server
On your computer
Registering with global LWM2M server via NAT64
LWM2M with DTLS (pre-shared keys)
Bootstrapping
References
LWM2M and IPSO Objects with Queue Mode
LWM2M with Queue Mode
Logging
MQTT
On your Linux / OS X device
Run your mosquitto broker
Subscribe to an MQTT topic and publish to it
Build and run the mqtt-client for platform native
Run on an embedded device
Control your device using MQTT subscriptions
Use with the IBM Watson IoT platform
RAM and ROM usage
Binary file inspection
Saving RAM and ROM
RPL
Deep dive
RPL border router
Native Border Router
Custom Border Router
Running Contiki‐NG in Cooja
Running Cooja without GUI
Running Contiki‐NG in Renode
Starting Renode
Running from the Contiki-NG tree
Running Renode from an arbitrary location
Using Renode
Running a RPL network in Cooja
Shell
Troubleshooting: it doesn’t work!!!
Troubleshooting: it works, but I can’t see what I’m typing
Switching to TSCH
Configuration
Reducing the memory usage
See also
TSCH and 6TiSCH
Enabling link-layer security
Timers and events
The etimer
The ctimer
Running the timer example
Platforms
cc2538dk: TI cc2538 development kit
Port Features
Requirements
Toolchain Installation
Drivers
For the SmartRF06 EB (UART)
For the CC2538EM (USB CDC-ACM)
Improve Stability on Linux
Jumper Settings
Device Enumerations
Software to Program the Nodes
Use the Port
Node IEEE and IPv6 Addresses
Scripted multi-image builds
Build a Sniffer - Live Traffic Capture with Wireshark
Advanced Topics
Switching between UART and USB (CDC-ACM)
Selecting UART0 and/or UART1
UART Baud Rate
RF and USB DMA
Low-Power Modes
Build headless nodes
Code Size Optimisations
More Reading
cc26x0-cc13x0: TI cc26x0 and cc13x0 platforms
Important Note
Getting Started
Port Features
Requirements
Examples
Build your First Example
How to Program your Device
Over JTAG
Using the ROM bootloader
Device enumeration over USB in Linux/OS X
Conditions to use the ROM bootloader.
Building deployment / production images
CC13x0/CC26x0 Border Router over UART
CC13x0/CC26x0 slip-radio with 6lbr
Filename conflicts between Contiki and CC26xxware
Some Sensortag-specific notes
UART usage (with or without the Debugger Devpack)
External flash on the sensortag
IEEE vs Sub-GHz operation
Low Power Operation
cooja: Cooja native motes platform
gecko: Contiki-NG for Silicon Labs (using GSDK)
Port Features
Prerequisites and Setup
Getting Started
Examples
Compilation Options
Support
License
Resources
native: Contiki-NG as a native process
nrf: Nordic Semiconductor nRF5340 and nRF52840 (nRF MDK)
Port Features
Prerequisites and Setup
Getting Started
Examples
Compilation Options
Compilation Targets
nRF5340
Support
License
Resources
nrf52840: Nordic Semiconductor nRF52840 (nRF5 SDK)
Port Features
Prerequisites and Setup
Getting Started
Examples
Compilation Options
Compilation Targets
Virtual COM and Real Time Transfer
Support
License
Resources
openmote-cc2538: OpenMote cc2538
Requirements
Toolchain Installation
Software to Program the Nodes
Build your First Examples
Node IEEE and IPv6 Addresses
Low-Power Modes
Build headless nodes
Code Size Optimisations
Maintainers
simplelink: TI SimpleLink MCU Platform
Port Features
Requirements
Examples
How to Program your Device
Over JTAG
Using the ROM bootloader
Device Enumeration
Conditions to use the ROM bootloader
Building Deployment / Production Images
Border Router over UART
slip-radio with 6lbr
2.4 GHz vs Sub-1 GHz operation
Low-Power Operation
SimpleLink Software Environment
Override Core SDK
Configure TI Drivers
SimpleLink Support
Set up Contiki-NG in Code Composer Studio
sky: Tmote Sky / TelosB
zoul: Zolertia Zoul platforms: Firefly, RE-mote and Orion
Zoul Platforms
Zolertia Firefly Revision A
Firefly pin-out
Zolertia RE Mote platform (revision A)
Zoul pin-out
Zolertia Firefly
Zolertia Orion Ethernet Router
Orion Technical documentation
Orion Ethernet Router pin-out
Zolertia RE Mote platform (revision B)
Zolertia Zoul Module
Zoul pin-out
Port Features
Requirements
Toolchain Installation
Drivers
Software to Program the Nodes
Build your First Examples
Node IEEE and IPv6 Addresses
Low-Power Modes
Shutdown Mode
Build headless nodes
Code Size Optimizations
More Reading
Maintainers
Organization
Code style
Naming
Formatting scripts
Example file
Contributing
What to contribute
How to contribute
To which branch do I submit my PR?
Pull request merging policy
GitHub Actions continuous integration
New platforms
Development cycle
Branches and tags at a glance
Issue and Pull Request Labels
Labels exclusive to PRs
Labels exclusive to Issues
Roadmap
Bugs
Questions and answers
Generic labels
License
Logo
Short NG version
Expanded version
Icon
Other versions
More about Contiki‐NG
Getting Around
Organization
Press release
Find out more at:
Engage with the community:
API changes for ports outside the main tree
Centralized clock_time_t definition
Cooja API changes for plugins outside the main tree
Changelog
Contiki-NG
Cooja
Roadmap
Roadmap
Where to report issues, ask questions, etc.?
Gitter
Github discussions
Stack Overflow
Github issues
Examples
6tisch/6p-packet
6P Packet Examples
6tisch/channel-selection-demo
6tisch/custom-schedule
6tisch/etsi-plugtest-2017
The 1st F-Interop 6TiSCH Interoperability Event
Overview
Authors
Supported Hardwares
Usage
Configuration
6tisch/simple-node
Modes of operation
Command line settings
6tisch/sixtop
6top Example Description
6top Operation
6tisch/timesync-demo
6tisch/tsch-stats
benchmarks/result-visualization
Result visualization
The Cooja approach
The testbed approach
Analyzing and plotting the results
coap
CoAP examples: client, server, and plugtest server
cplusplus
dev/button-hal
Button HAL Example
Supported devices
dev/gpio-hal
GPIO HAL Example
Supported devices
Extending for other platforms
dev/leds
LED HAL Example
Supported devices
dev/rgb-led
RGB LED Example
Supported devices
hello-world
libs/deployment
libs/ipv6-hooks
libs/ipv6-uipbuf
libs/logging
Logging
libs/shell
libs/simple-energest
Example unittest project
lwm2m-ipso-objects
LWM2M with IPSO Objects Example
mqtt-client
MQTT Client Example
Publishing
Subscribing
IBM Quickstart Service
platform-specific/cc2538-common
README file for CC2538 common examples
platform-specific/cc26x0-cc13x0/base-demo
CC13xx/CC26xx Base Demo
platform-specific/cc26x0-cc13x0/ble-ipv6
BLEach: a fully open-source IPv6-over-BLE stack for Constrained Embedded IoT Devices
Overview
Features
Modules
BLE radio
BLE L2CAP layer
Using BLEach
IPv6-over-BLE node (BLE slave)
platform-specific/cc26x0-cc13x0/cc26x0-web-demo
CC26xx Web Demo Readme
Network UART (net-uart)
6lbr Client
CoAP Server
HTTPD
IBM Quickstart / MQTT Client
IBM Watson IoT Platform
platform-specific/zoul
Zolertia Zoul test examples
Compile and install an example
Visualize the console output
Documentation and guides
platform-specific/zoul/node-red
RE-Mote + Node Red README
Install Mosquitto
Fire up a Re-Mote
Deploy your Node Red
Browse
Do more cool stuff
platform-specific/zoul/orion
RE-Mote IP64 README file
IP64 router
HTTP client examples
rpl-border-router
Embedded border router
Native border router
RPL node
rpl-udp
sensniff
sensniff Contiki Project
Running
Adding support for more platforms
slip-radio
storage/cfs-coffee
Contiki File System (CFS) and Coffee Examples
Supported Hardware (tested or known to work)
API documentation
Contiki-NG
»
Examples
»
libs/simple-energest
Edit on GitHub
libs/simple-energest
This is a minimal example for the module simple-energest.
Read the Docs
v: develop
Versions
master
release-v4.9
release-v4.8
release-v4.7
release-v4.6
release-v4.5
release-v4.4
release-v4.3
release-v4.2
release-v4.1
release-v4.0
develop
Downloads
On Read the Docs
Project Home
Builds