CSCI5931-02 Research Topic Wireless and Sensor Networks TinyOS and Sensor application development...

21
CSCI5931-02 Research Topic Wireless and Sensor Networks TinyOS and Sensor application development using Crossbow sensor products Deepesh Jain

Transcript of CSCI5931-02 Research Topic Wireless and Sensor Networks TinyOS and Sensor application development...

Page 1: CSCI5931-02 Research Topic Wireless and Sensor Networks TinyOS and Sensor application development using Crossbow sensor products Deepesh Jain.

CSCI5931-02 Research TopicWireless and Sensor Networks

TinyOS and Sensor application development using Crossbow sensor products

Deepesh Jain

Page 2: CSCI5931-02 Research Topic Wireless and Sensor Networks TinyOS and Sensor application development using Crossbow sensor products Deepesh Jain.

Agenda

TinyOS

How Wireless Sensor Network works

Overview of Crossbow Wireless Sensor equipment

Description of the MoteWorks platform

Requirements for the Application

Building A Simple Sensing Application

Page 3: CSCI5931-02 Research Topic Wireless and Sensor Networks TinyOS and Sensor application development using Crossbow sensor products Deepesh Jain.

TinyOS

Open Source System By UC, Berkeley

Has become standard OS for WSN in research community and commercial application

Component based event driven operating system

Designed for low power devices with small memory

It supports microprocessors ranging from 8bit- architectures 2KB of RAM to 32-bit processors with 32 MB of RAM or more.

Page 4: CSCI5931-02 Research Topic Wireless and Sensor Networks TinyOS and Sensor application development using Crossbow sensor products Deepesh Jain.
Page 5: CSCI5931-02 Research Topic Wireless and Sensor Networks TinyOS and Sensor application development using Crossbow sensor products Deepesh Jain.

Overview of Crossbow Wireless Sensor equipment

Sensor Data Acquisition Boards

Processor/Radio Platforms or “Motes”

Gateways and Network Interfaces

Page 6: CSCI5931-02 Research Topic Wireless and Sensor Networks TinyOS and Sensor application development using Crossbow sensor products Deepesh Jain.

Sensor Data Acquisition Boards

Page 7: CSCI5931-02 Research Topic Wireless and Sensor Networks TinyOS and Sensor application development using Crossbow sensor products Deepesh Jain.

MTS310

Page 8: CSCI5931-02 Research Topic Wireless and Sensor Networks TinyOS and Sensor application development using Crossbow sensor products Deepesh Jain.

Processor/Radio Platforms or “Motes”

Page 9: CSCI5931-02 Research Topic Wireless and Sensor Networks TinyOS and Sensor application development using Crossbow sensor products Deepesh Jain.

MICA2

Page 10: CSCI5931-02 Research Topic Wireless and Sensor Networks TinyOS and Sensor application development using Crossbow sensor products Deepesh Jain.

Gateways and Network Interfaces

Page 11: CSCI5931-02 Research Topic Wireless and Sensor Networks TinyOS and Sensor application development using Crossbow sensor products Deepesh Jain.

MIB510

Page 12: CSCI5931-02 Research Topic Wireless and Sensor Networks TinyOS and Sensor application development using Crossbow sensor products Deepesh Jain.

Description of MoteWorks Platform

Uses Three distinct software tiers

Mote Tier – XMesh

Sever Tier – XServe

Client Tier – MoteView

Also includes :

Low Power Operating System – TinyOS

Software Development Tools

Page 13: CSCI5931-02 Research Topic Wireless and Sensor Networks TinyOS and Sensor application development using Crossbow sensor products Deepesh Jain.

Description of MoteWorks Platform

Page 14: CSCI5931-02 Research Topic Wireless and Sensor Networks TinyOS and Sensor application development using Crossbow sensor products Deepesh Jain.

A Simple Sensing Application

Hardware Requirements

Two Motes: standard editions of MICA2 (MPR4x0), MICAz (MPR2400), IRIS (XM2110) or OEM editions MPR600, MPR2600, M2110

One sensor or data acquisition board: MDA100, MTS300 or MTS310

One gateway board: MIB510, MIB520, or MIB600 and the associated hardware (cables, power supply) for each

A Windows PC with MoteWorks installed

Page 15: CSCI5931-02 Research Topic Wireless and Sensor Networks TinyOS and Sensor application development using Crossbow sensor products Deepesh Jain.

Developing an application

Within the MoteWorks framework a minimum of five files will be placed in any application’s directory:

1. Makefile

2. Makefile.component

3. Application’s configuration written in nesC

4. Application’s module written in nesC

5. README (optional)

Page 16: CSCI5931-02 Research Topic Wireless and Sensor Networks TinyOS and Sensor application development using Crossbow sensor products Deepesh Jain.

Two Variation

1. Sensor and Mote plugged into the base station directly through the serial port

2. Sending sensor data over the radio to the another Mote plugged into the base station directly through the serial port

(Difference between the .nc file to switch from one variation to another

if (call SendMsg.send(TOS_UART_ADDR,sizeof(XDataMsg),&msg_buffer) != SUCCESS)

if (call SendMsg.send(TOS_BCAST_ADDR,sizeof(XDataMsg),&msg_buffer) != SUCCESS) )

Page 17: CSCI5931-02 Research Topic Wireless and Sensor Networks TinyOS and Sensor application development using Crossbow sensor products Deepesh Jain.

Variation 1

Hardware setup

Connect a mote on top and sensor board on downside of

MIB510

Top View Downside View

Page 18: CSCI5931-02 Research Topic Wireless and Sensor Networks TinyOS and Sensor application development using Crossbow sensor products Deepesh Jain.

Variation 1

Use Programmer’s Notepad

Compile: Select Tools > make mica2

If successful we get “writing TOS image” in output

Load Program: Select Tools>shell and type in make

mica2 reinstall mib510,com1 or Use MoteConfig

Output: xserve –device=COM1

(* Configure MakeXbowLocal file according to application and

hardware need such as frequency, power, channel, port number

etc. before following these steps)

Page 19: CSCI5931-02 Research Topic Wireless and Sensor Networks TinyOS and Sensor application development using Crossbow sensor products Deepesh Jain.

Variation 2

Hardware setup

Connect a mote on gateway load program in it, plugout that

mote and connect a sensor board on that mote. Connect

another mote on sensor

Page 20: CSCI5931-02 Research Topic Wireless and Sensor Networks TinyOS and Sensor application development using Crossbow sensor products Deepesh Jain.

Variation 2

Compile the application after change : Select Tools >

make mica2

Install in Mote: : Select Tools>shell and type in make

mica2 install,1 mib510,com1 or Use MoteConfig

Remove Mote from the programming board, plug sensor

board on Mote and make sure it has battery and turn it on.

Install Xsniffer application onto another Mote that

remains plugged into board

Use Xsniffer to see the display of packets

Page 21: CSCI5931-02 Research Topic Wireless and Sensor Networks TinyOS and Sensor application development using Crossbow sensor products Deepesh Jain.

References

MoteWorks Getting Started Guide Introduction Introduction to TinyOS and nesC First Steps in nesC Programming A Simple Sensing Application

Crossbow Product reference guide