-
Notifications
You must be signed in to change notification settings - Fork 1
RIOT and Cooja
This README describes the essential steps you need to take in order to run RIOT on two networked telosb boards in cooja. The boards will be simulated by an cycle-accurate hardware simulator called mspsim which is integrated in cooja.
- Please download cooja by running the command:
make cooja
in the pkg
folder.
-
Make sure you have a recent java JDK installed (including the build tool
ant
) -
Make sure your
$JAVA_HOME
variable is set. Please refer to your operating system documentation for information on how to do this. As a side-note: on Linux systems it is not sufficient to merely add this variable to/etc/environment
. The variable has to be exported.
For the sake of simplicity we will compile and use the example/default
project.
-
Change directory to
example/default
. -
Build this application for telosb with the following command:
make clean all BOARD=telosb
- Rename the resulting
default.elf
file inexample/default/bin/telosb/
todefault.sky
.
The last step is required since cooja demands that firmware image files (which are elf files) adhere to the following naming convention: .. The sky suffix refers to the Tmote sky platform which is identical to the telosb platform supported by RIOT.
Now, we will start cooja, set up a simple network topology and start a simulation based on this topology. The default application we built in the previous step will serve as the firmware for the simulated boards in this network.
-
Change directory to
pkg/cooja/cooja/tools/cooja
. -
Depending on your CPU execute either:
ant run
or
ant run64
-
After cooja started click on
File
thenNew simulation
. -
In the dialog box click on
Create
. -
Now a few sub-windows should have opened. Most important are the windows with the title:
Network
,Simulation control
andMote output
. -
Now we will add some simulated nodes to the network. Click on
Motes->Add motes-> Create new mode type->Sky mote
. -
In the dialog box click on browse and navigate to the previously built and renamed RIOT default application firmware file (
examples/default/bin/telosb/default.sky
). -
Now click on
Create
. In the following dialog box change the fieldNumber of new motes
to 2 and clickAdd motes
.
To start your simulation click on Start
in the Simulation control
sub-window.
You should now see the output of both nodes (in different colors) in the Mote output
sub-window.
You can open a serial terminal to a node by right-clicking on it in the Network
sub-window
and then choosing the following option: Mote tools for Sky...->Mote interface viewer
. In the
interface viewer choose Serial port
from the drop down menu. Now try to enter something like
ps
. The output should be display in the Mote output
sub-window after a short while.
RIOT - The friendly Operating System for the Internet of Things
Homepage | [GitHub] (https://github.com/RIOT-OS/) | Developers Mailing List | Users Mailing List | Twitter @RIOT_OS
- Family: ARM
- Board: Airfy Beacon
- Board: Arduino Due
- Board: CC2538DK
- Board: CC2650STK
- Board: HikoB Fox
- Board: IoT LAB M3
- Board: LimiFrog-v1
- Board: mbed_lpc1768
- Board: MSB-IoT
- Board: MSBA2
- Board: Nucleo-L1
- Board: Nucleo-F334
- Board: Nucleo-F303
- Board: Nucleo-F091
- Board: Mulle
- Board: OpenMote
- Board: PCA1000x (nRF51822 Development Kit)
- Board: Phytec phyWAVE-KW22
- Board: RFduino
- Board: SAMR21-xpro
- Board: SAML21-xpro
- Board: Spark Core
- Board: STM32F0discovery
- Board: STM32F3discovery
- Board: STM32F4discovery
- Board: UDOO
- Board: yunjia-nrf51822
- Board: Zolertia remote
- Family: ATmega
- Board: Arduino Mega2560
- Family: MSP430
- Board: MSB-430H
- Board: TelosB
- Board: WSN430
- Board: Zolertia Z1
- Board: eZ430-Chronos
- Family: native
- Board: native
- Family: x86
- Board: Intel Galileo