IoT wireless sensors network simulation, a small project for the Advanced Networks and Wireless Systems exam
 
 
 
 
Go to file
giomba 33c0bf494f updated README.md, final version 2020-05-29 14:44:04 +02:00
client [client] detect when resource is not available 2019-11-16 16:34:22 +01:00
cooja testing final parameters 2019-12-27 17:01:55 +01:00
oracle testing final parameters 2019-12-27 17:01:55 +01:00
proxy [proxy] try to contact again nodes when they go offline 2019-12-15 17:48:47 +01:00
simulation cleanup: removed unused python scripts 2019-12-28 12:13:22 +01:00
.gitignore RFC8428 Json Parsing at proxy 2019-11-08 21:55:43 +01:00
LICENSE First commit README + LICENSE 2019-11-07 21:05:07 +01:00
README.md updated README.md, final version 2020-05-29 14:44:04 +02:00

README.md

NetPP exhibition control wireless sensor network

NetPP is a simulation of a wireless sensor network which makes use of the IEEE stack recommended for IoT, from bottom to top: wireless IEEE 802.15.4, 6LowPAN, IPv6 with RPL routing, UDP and CoAP. This project:

  • was developed for the Advanced Networks and Wireless Systems exam (Networking++ for friends)
  • exploits Contiki and Californium
  • runs on Z1 motes

Scenario

NetPP is a company which organizes public events and exhibitions, which installs a sensor (oracle) for each stand in order to keep track of people's flow.

  • Formal requirements:
    • network must be fully operational in less than 70 minutes, which is an estimation of the time needed to mount all the stands for small daily exhibition
    • nodes run on battery and must use as less energy as possible, in order to make it possible to reuse them for multiple events
  • Other requirements:
    • RPL must use objective function 0, ie find the nearest grounded root
    • Sensor messages must be RFC8428 (SenML) compliant
    • a CoAP proxy must be developed in Java using the Eclipse Californium CoAP library (proxy)

Trickle parameters

In order to satisfy the formal requirements, studies from this paper have been taken in account, thus smallest possible value for k and highest possible value for Imin have been chosen, and in particular these have been exploited:

  • k = 1
  • Imin = 211 (ms)

30 independent simulations have been run, and all of them let the first network DODAG form in less than 20 minutes.

Repository organization

  • client: source code for a CoAP client
  • cooja: sample simulations for Cooja
  • oracle: source code for the sensor node
  • proxy: source code for the CoAP proxy
  • simulation: scripts for running simulations and plot performance graphs

Run

  1. choose a Cooja simulation file from cooja directory
  • start the serial socket server on node 1 (border router)
  • start the simulation
  1. attach a rpl-border-router to Cooja
  • you can use the one from examples/ipv6/rpl-border-router in your Contiki repository
    • if you want to reproduce the simulation results, use the modified version (which outputs the number of discovered routes)
  • connect $ make connect-router-cooja PREFIX="2001:db8:cafe:babe::1/64"

Proxy

  1. $ mvn package
  2. $ java -jar target/proxy-2019.11.0-jar-with-dependencies.jar <prefix> <n>

where

  • <prefix> is your network prefix (specify all 64 bits)
  • <n> is the number of nodes in the network

Example: $ java -jar proxy/target/proxy-2019.11.0-jar-with-dependencies.jar 2001:db8:cafe:babe 30

Resources on the server are named after the node IPv6 address, eg: urn:it.unipi.ing.ce.netpp:c00000001.

You can use a CoAP browser to list all resources on the server, for example:

Client

  1. $ mvn package
  2. java -jar target/client-2019.11.0-jar-with-dependencies.jar <url>

where <url> is a CoAP URL

Example: $ java -jar target/client-2019.11.0-jar-with-dependencies.jar coap://[2001:db8:cafe:babe::1]/urn:it.unipi.ing.ce.netpp:c00000001

Simulation

The simulation/main.sh can be used to run automatically several independent simulations with Cooja.

Parameters

  • REPOSITORY path to this repository root directory
  • CONTIKI path to Contiki repository
  • SIMULATION path to Cooja simulation (.csc file)
  • REPEAT number of repetitions
  • INIT initial repetition number (INIT + REPEAT is used as random seed)

Moreover, inner fors can be tuned in order to explore several combinations of k and Imin.

Output

Output results can be found in simulation/results.

References

[1] Vallati, Carlo & Mingozzi, Enzo. (2013). Trickle-F: Fair broadcast suppression to improve energy-efficient route formation with the RPL routing protocol