The Multi-Trace Generation tool is a collection of scripts and additions to the Cooja Network Simulator to get more detailed tracing of IoT networks.
Unless explicitly stated otherwise, Multi-Trace sources are distributed under the terms of the 3-clause BSD license. This license gives everyone the right to use and distribute the code, either in binary or source code format, as long as the copyright license is retained in the source code.
You need a toolchain for Contiki-NG to compile code: https://github.com/contiki-ng/contiki-ng/wiki/Toolchain-installation-on-Linux
You also need Java 11 and Python 3.
First checkout all submodules if you have not already done this.
git submodule update --init --recursive
Quickstart of an example simulation with GUI.
./run-cooja-gui.sh applications/blackhole-attack/rpl-udp-ids-cooja.csc
Quickstart of an example simulation without GUI. The simulation must include a configured timeout configured to run the simulation without GUI.
./run-cooja-nogui.sh applications/blackhole-attack/simulations/rpl-udp-base-15-attack-blackhole-random.csc
The directory tools/cooja/scripts
contains some Python 3 scripts to
help with generating simulations and parsing data traces. It also
contains a requirements file for Python dependencies. See
tools/cooja/scripts/README.md
for more information.
To see a summary of mote outputs and radio communication in a data trace:
$ ./tools/cooja/scripts/coojatrace.py -s <data-trace>
Example script using coojatrace.py
to extract RPL statistics from a
data trace generated by the application applications/blackhole-attack
.
$ ./tools/cooja/scripts/extract-rpl-features.py <data-trace>
The resulting CSV file is saved in the data trace folder.