LAB 2 Networks and Communication Systems Department TA

LAB 2 Networks and Communication Systems Department TA. Maram Almuhareb Developing different types of Motes in WSN

Mote definition Mote is sensor node, also known as a , is a node in a sensor network that is capable of performing some processing, gathering sensory information and communicating with other connected nodes in the network.

Sky mote low power wireless sensor. It is high reliability and ease of development. These kind of sensors usually include measuring of relative humidity, temperature and

Z 1 mote Z 1 is a general purpose development platform for wireless sensor networks (WSN) designed for researchers and developers. Equipped with two on board digital sensors (accelerometer and temperature),

Wi. SMote Wi. SMote is a sensor module well adapted to Wireless Sensor Network (WSN) applications. The wireless link operates over the 2. 4 GHz ISM, Wi. SMote is able to monitor any kind of physical measurements in fields like environment, healthcare, smart building, logistics or industrial applications. Software : Contiki operating system (Tiny. OS coming soon) Open source software fully configurable and

Contiki examples v There are plenty of examples in the Contiki source code tree to help you get started with your own code. Some examples show to program network code, others show to interact with the platform hardware v yet others demonstrate different aspects of the Contiki system. Most have a corresponding Cooja simulation available. v Find the code in home/contiki 27 /examples/sensinode/blinkhello. c

Blink- hello example This example aims to demonstrate the co- extinse of two process. One of them prints hello world message and other blinks the LED. We will simulate Contiki programs in the COOJA simulator by adding 3 different motes and run the example on them.

Source code of the application

Source code of the application

Create a Simulation A new simulation is created via the file menu. Enter the simulation name then Choose a radio propagation mode UDGM , random startup time and seed for the random number generator

Create a Node Type Any simulated node in COOJA belongs to a node type. The node type determines, which Contiki applications to simulate. Select Sky mote

Create a Node Type Upload the Contiki program we want to simulate from the directory /home/user/contiki 2. 7/examples/sensi node/blink-hello. c

Create a Node Type Click Compile to start compiling the Contiki program

Add Simulated Nodes One nodes is added to the simulation, randomly located in the XY-plane. Instead of using the Random Position, you can also use Linear, Ellipse, or Manual Positioning. Note that when you add nodes later, the visualizer plugin is rescaled in order to distribute the nodes all over the XYplane. The same happens when you move nodes. Moving nodes is possible by left-clicking on a node and dragging it across the XY-plane.

Network window From view menu in Network window you can show motes properties like IP, LED, mote type . . etc.

Add different simulated nodes You can add different motes type to the simulation and run the same application on them. Here we add Z 1 mote type and Wismote type.

Mote type information To view information about the motes in the simulation Click motes menu , mote type

Start Simulating Click Start to start the simulation.

Save simulation COOJA allows for saving and loading simulation configurations. When a simulation is saved, any active plugins are also stored with the configuration. The state of a current simulation is however not saved; all nodes are reset when the simulation is loaded again. To save your current simulation: Click menu item: File, Save simulation Simulations are stored with the file extensions “. csc”.

Load simulation To later load a simulation: Click menu item: File, Open simulation, Browse. . Select a simulation configuration. When a simulation is loaded, all simulated Contiki applications are recompiled.

Reload simulation A functionality similar to saving and loading simulations, is reloading a simulation. Reloading can be used to reset the simulation – to restart all nodes. More importantly, reloading a simulation will recompile all Contiki code, useful while developing Contiki programs. To reload your current simulation: • Click menu item: File, Reload simulation, or press Ctrl+R

References P. Gonizzi , S. Duquennoy “Hands on Contiki OS and Cooja Simulator: Exercises (Part II) “ Complete tutorial for Contiki –Cooja https: //www. youtube. com/watch? v=DXGdllp. Dy Vs
- Slides: 22