Skip to content
NDN IoT Package over POSIX with CMake
C CMake Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.



The NDN-Lite library implements the Named Data Networking Stack with the high-level application support functionalities and low-level OS/hardware adaptations for Internet of Things (IoT) scenarios.

The library is written in standard C.

Please go to our wiki page for the project details.

NDN-IoT Package over POSIX

NDN-IoT Package over POSIX is a integrated IoT package based on NDN-Lite for POSIX compatible OS, such as Raspberry Pi, Mac OS and Ubuntu.


CMake >= 3.5


This package uses CMake. A way to build is:

git clone --recursive
cd ndn-iot-package-over-posix
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j2

Unit Test

Run ./unittest in the build folder.

A Demonstration of NDN-Lite's Security Bootstrapping and Service Discovery

This requires two devices (e.g., two laptops, or one laptop one RaspberryPi) connected through WiFi ad-hoc or WiFi AP mode whose UDP multicast has been enabled.

1 Generate a QR code for the controller to scan

We first generate the shared secret and a new pair of ECC keys on the device side:

cd build

Then we use the to encode the public information into a QR code image.

cd ..

Notice: to run, one needs to install the dependency:

pip3 install pyqrcode
pip3 install pypng

2 Set up the IoT system controller

Go to to download and run our python based controller. The controller require NFD running on the same device as the controller.

3 Play with the examples: Bootstrapping

Controller: a. click bootstrapping on the left sidebar and upload the QR code image. b. click bootstrap button which will trigger a blocking packet listen. Device:

cd build

4 Play with the examples: Service Discovery

Device: After the bootstrapping process, the device program will automatically broadcast its services to the system, where the controller will hear the information. Controller: By clicking the service list on the left sidebar, one can know all the heard services in the system. To invoke a service, simply copy the service name, e.g., /ndn-iot/%01/%0B/device-123 (the device ID must be the same as your bootstrapped device), into the NDN ping page, modify the name to be /ndn-iot/%0B/device-123/%00, set the signed interest to be true, input a integer 0 to 5 into the parameter box as the desired and express the interest out.

Notice: %01 means service in NDN-Lite service discovery protocol. %0B is the service type, which is LED service. %00 at the end of the name is the command index 0 under the LED service, which is to control the LED light.

Notice: If the ping Interest is not signed, the service cannot be invoked successfully.

Generate XCode Project and Documentation

If you prefer to use XCode for your application development, you can generate a XCode project by the following commands.

Generate XCode Project

mkdir xcode
cd xcode
cmake -G "Xcode" ..
open ndn-lite.xcodeproj

One can also generate a Doxygen-empowered library documentation by the following commands.

Generate Doxygen Documentation

mkdir build
cd build
make docs
open docs/html/index.html
You can’t perform that action at this time.