Search code examples
simulationiotcontikicooja

How to access 6LowPAN network simulated in cooja from outside?


I implemented a 6LowPAN network simulation using Cooja and Contiki, now i want to send some commands for actuators (motes) after processing data from outside of network.

These commands will be send to motes after processing the data received from border router.

How can i access specific mote in my simulated network from outside and send to it some packet?


Solution

  • You need to:

    1. Enable remote access to the serial port of the border router node. (Right-click on the node and use "More tools...", "Serial socket (SERVER)" in the Cooja graphical interface).
    2. Run a script on the host side that creates a network interface (a tunnel) over the serial port, adds IPv6 address to it, and sends IPv6 prefix to the border router.

    Contiki-NG provides the tunslip6 application for this purpose. There is also a connect-router-cooja make target that basically starts the tunslip6 with default parameters.

    Read the Wiki page for more information: https://github.com/contiki-ng/contiki-ng/wiki/Cooja:-simulating-a-border-router