Cooja Simulator
Contiki is an open source operating system for sensor networks and other networked embedded devices. Contiki supports features like uIP stack (IPv6, RPL, 6LoWPAN), HTTP/CoAP, power profiling and others. It also contains a Cooja network simulator specifically designed for Wireless Sensor Networks.
You can set up Contiki with VMware or Virtual-box.
For VMware:- Install VMware and extract Instant Contiki and start.
For VirtualBox:- use this tutorial for virtual box setup
Cooja Simulator
Contiki is an open source operating system for sensor networks and other networked embedded devices. Contiki supports features like uIP stack (IPv6, RPL, 6LoWPAN), HTTP/CoAP, power profiling and others. It also contains a Cooja network simulator specifically designed for Wireless Sensor Networks.
You can set up Contiki with VMware or Virtual-box.
For VMware:- Install VMware and extract Instant Contiki and start.
For VirtualBox:- use this tutorial for virtual box setup
Contiki/tools/Cooja
Type following Command to Run Cooja
ant run
It will open a Cooja blue window
Create New Cooja Simulation
Select Option File-> New Simulation
Radio Mediums present in Cooja
Unit Disk Graph Radio Medium UDGM: Distance Loss
Both radio ranges grow with the radio output power indicator. The range parameters are multiplied with [output power]/ [maximum output power].
For example, if the transmission range is 100m, the current power indicator is 50, and the maximum output power indicator is 100, then the resulting transmission range becomes 50m.For radio transmissions within range, two different success ratios are used [0.0-1.0]: one for successful transmissions, and one for successful receptions.
If the transmission fails, no radio will hear the transmission.
If one of the receptions fail, only that receiving radio will not receive the transmission, but will be interfered throughout the entire radio connection.
For UDGM with Distance Loss, the received radio packet signal strength grows inversely with the distance to the transmitter.
TX and RX ratios are just random variables that are added to the sending or reception of a packet to allow the simulation of random errors in TX or RX respectively.
The Unit Disk Graph Radio Medium abstracts radio transmission range as circles. It uses two different range parameters: one for transmissions, and one for interfering with other radios and transmissions.
The TX range is the range in which the transmitted packet can be received correctly by any node within this range. while the interference range is the range in which the transmission can be heard but the transmitted packet cannot be received correctly. outside of these two ranges, the packet cannot be heard.
A collision will be sensed if a node tries to transmit while it lies in the TX or INT range of a node that is sending at the same time. if you are using CSMA, the packet will be retransmitted after a random back-off time. if not, then the packet will be dropped.
No Radio Medium
No data is ever transferred through this medium
Multi-path Ray-tracing radio medium (MRM)
Directed Graph Radio Medium(DGRM)
MRM and DGRM do not consider radio output power in the current version.DGRM simply never checks the output transmission power when creating the radio connections, but fully relies on the configured edges. Add two communication links between each set of nodes so that the communication can be bidirectional. Click on Tools->DGRM Links... This will open a DGRM Configurator Dialog box. Click on Add. Select source and destination nodes and again click on add. This will add a unidirectional link from the source to destination node. For a bidirectional link, you need to add one more link with source and destination nodes switched.You can change other parameters of the link such as RX ratio, RSSI, LQI and Delay according to your application. These parameters affect the individual link quality eg. RX ratio affect the ETX values. So to test your application under various Link Quality conditions these parameters can be changed.
Contiki motes platforms
A simulated Contiki Mote in COOJA is an actual compiled and executing Contiki system. The system is controlled and analysed by COOJA. This is performed by compiling Contiki for the native platform as a shared library, and loading the library into Java using Java Native Interfaces (JNI). Several different Contiki libraries can be compiled and loaded in the same COOJA simulation, representing different kinds of sensor nodes (heterogeneous networks). COOJA controls and analyses a Contiki system via a few functions. For instance, the simulator informs the Contiki system to handle an event, or fetches the entire Contiki system memory for analysis. This approach gives the simulator full control of simulated systems. Unfortunately, using JNI also has some annoying side-effects. The most significant is the dependency on external tools such as compilers and linkers and their run-time arguments. COOJA was originally developed for Cygwin/Windows and Linux platform, but has later been ported to MacOS.
Create motes:
Motes-> Add Motes-> Create New Mote -> (Select platform)
Below example for Z1 mote (Udp client server application
RPL Client:- Contiki/examples/rpl-udp/udp-client.
Contiki Simulation
Contiki simulation import windows:
Network:- Shows the location of each node in the network. Can be used to visualize the status of each node including LEDs, mote types, radio ranges, mote IDs, addresses, print outputs.
Simulation Control:- This panel is used to Start, Pause, Reload or execute Steps of the simulation. It shows the time of execution and the speed of simulation. It means that we can run the events several times faster than it would take in real-time execution.
Mote output:- Shows all output of serial interface of the nodes
Simulation Information:- Shows the simulation information like status of simulation stopped/running, time, number of motes present along with different types of motes present and Radio Medium of simulation.
Radio Messages:- It shows capured 6lowpan packets like UDP, DIO,DAO, IPV6 packets.
TimeLine:- It shows radio transmitter status, time and transmitted packet.
Notes:- This is a simple notepad for taking notes about the simulation.
Thanks & Regards,
Vaibhav
Comments
Post a Comment