Workshop07cooja Intro

May 30, 2016 | Author: That's Tom | Category: N/A
Share Embed Donate


Short Description

Download Workshop07cooja Intro...

Description

Using COOJA for Contiki development Fredrik Österlind Swedish Institute of Computer Science

1

Using COOJA for Contiki development Fredrik Österlind

Contiki OS Java Simulator

2



Simulator for the Contiki OS



Java-based, but simulates Contiki applications



Support cross-level simulation



Today’s focus: using COOJA



Questions/interruptions/feedback appreciated

Using COOJA for Contiki development Fredrik Österlind

”CoOJa” Cooya = ”Look at me!” (Jamaican broken english) ●

Included with Contiki



Active development for 1½ years



Compared to Contiki Netsim:



3



Heavier



More powerful



(More installation problems)

Uses external programs such as make, gcc, grep... Using COOJA for Contiki development Fredrik Österlind

Cross-level simulation Simulating motes at different abstraction levels. OS level

Application (Java): ●

Effective



Easier to implement

HW level

OS: ●

Deployable code

Emulated: ●

4

Enables low-level driver development Using COOJA for Contiki development Fredrik Österlind

App. level

Workshop COOJA objectives Monday: Using COOJA

Tuesday: Extending COOJA

5

Using COOJA for Contiki development Fredrik Österlind

TODO (before lunch) ●

Installation/Startup ●



6

Compiling code from within COOJA

Create simulations ●

Basic concepts in COOJA



Using plugins to interact with motes



Adding project directories

Using COOJA for Contiki development Fredrik Österlind

Getting started... ●

Need Java and Ant ●



Start COOJA



Compilation problems ●

7

contiki-2.x/tools/cooja> ant run

Use JNI tests to configure COOJA

Using COOJA for Contiki development Fredrik Österlind

Design ●

Mote type represents the simulated software (and hardware) Mote Mote

Mote type GUI

Mote Simulation

Mote type

Mote type

8

Mote

Mote

Using COOJA for Contiki development Fredrik Österlind

Contiki applications ●







9

Scans for applications to simulate

A few test applications available in contiki-2.x/platform/cooja

Applications are compiled the usual way > make testcooja TARGET=cooja .....

Create a Contiki mote type

Using COOJA for Contiki development Fredrik Österlind

Simulating what? ●



COOJA uses glue drivers to communicate with Contik Corresponding parts in Java and Contiki COOJA platform Poll interfaces

Switch node

Get memory

Poll interfaces Handle Contiki event

10

Set memory Using COOJA for Contiki development Fredrik Österlind

Plugins and project directories ●

Main way to interact with simulations and motes



Plugin argument is:



11



Simulator



Simulation



Mote

COOJA needs more plugins ;)

Using COOJA for Contiki development Fredrik Österlind

A few plugins Mote Interface Viewer

Event Breaker

Log Listener

12

Using COOJA for Contiki development Fredrik Österlind

Interacting with the motes

13



Test simulated applications



Via plugins (and interfaces) ●

Click the button



Reload simulation



Break on (radio) events

Using COOJA for Contiki development Fredrik Österlind

Project directories

14



Previously called ’user platforms’



Adds functionality to COOJA



A directory with a configuration file



Import a simple project directory

Using COOJA for Contiki development Fredrik Österlind

More on project directories ●







15

Can be used for much more than adding applications to simulate! Interfaces, plugins, applications, mote types, radio mediums...

Examples available in: contiki-2.x/tools/cooja/examples

Preview of emulated mote

Using COOJA for Contiki development Fredrik Österlind

COOJA’s Radio Mediums

16



Currently two different alternatives (+ one silent)



Unit Disk Graph Medium (UDGM)



Multi-path Ray-tracer Medium (MRM)



Using MRM

Using COOJA for Contiki development Fredrik Österlind

Quick-starting COOJA The usual way is via: contiki-2.x/tools/cooja/> ant run

Shortcut that fits nicely into Contiki development: yourapp/> make myapp TARGET=cooja

Creates a typical simulation and starts a few plugins



17

Hello-World Using COOJA for Contiki development Fredrik Österlind

Questions?

18

Using COOJA for Contiki development Fredrik Österlind

Cross-Level simulations

19

Using COOJA for Contiki development Fredrik Österlind

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF