Cooja is a java-based wireless sensor network simulator distributed with Contiki.
Prior to the installation:
Check if Git, ant are installed if not use the below code for installation
for git installation:
sudo apt-get install git
for ant installation:
sudo apt-get install ant
Now setting up Cooja Simulator
Step 1: Cooja supports only if Java 8 exists because it requires java.xml.bind module. In the higher version it does not exists(removed).
Use the below code to install Java 8
sudo apt-get update sudo apt-get install openjdk-8-jdk Step 2:
Set environment variables for java and point them to location where java is installed.
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 export PATH=${PATH}:${JAVA_HOME}/bin
Check whether java8 is installed or not by using below command
java -version
Step 3:
Clone ContikiOS from github into any directory using command :
git
clone git://github.com/contiki-os/contiki.git contiki
After
cloning contiki we have to download mspsim To download this get into
desired cooja folder : contiki/tools/cooja and download sub-module
code for MSPSim
using
command :
git
submodule update -- init
then
sudo apt install gcc-msp430
Step 4:
Run Cooja
From
contiki/tools/cooja directory, run command
ant
run
No comments:
Post a Comment