tinyos course 02 serial communication

9
WSN Programming Course TinyOS Lab: Lesson 02: Serial Communication Manuel Fernández UAH, 18th September 2013

Upload: manuel-fernandez-santo-tomas

Post on 15-Dec-2014

438 views

Category:

Education


1 download

DESCRIPTION

Lesson 02 slides for one day introductory course on wireless sensor networks and TinyOS, that took place at the University of Alcalá de Henares in Madrid Spain the 18th of September 2013. This course was jointly designed by the Electronics Department of the university and Advanticsys. Find source code for the lessons here: http://www.advanticsys.com/wiki/index.php?title=TinyOS%C2%AE_Course_at_UAH_18th_September_2013

TRANSCRIPT

Page 1: TinyOS Course 02 Serial Communication

WSN Programming Course

TinyOS Lab: Lesson 02: Serial Communication

Manuel Fernández

UAH, 18th September 2013

Page 2: TinyOS Course 02 Serial Communication

• Introduction to serial communication • TinyOS native tools • Exercises

2

Contents

Page 3: TinyOS Course 02 Serial Communication

3

Configuration

Page 4: TinyOS Course 02 Serial Communication

4

Header

Page 5: TinyOS Course 02 Serial Communication

5

Module

• Specification:

• Implementation:

Let’s look at Lesson02 and go step by step!

Page 6: TinyOS Course 02 Serial Communication

1. Listen: java net.tinyos.tools.Listen –comm serial@/dev/ttyUSB0:telosb

2. ListenNew java net.tinyos.tools.Listen –comm serial@/dev/ttyUSB0:telosb

TinyOS Native Tools

6

HEADER PAYLOAD HEADER PAYLOAD

Page 7: TinyOS Course 02 Serial Communication

3. Serial Forwarder (java): java net.tinyos.sf.SerialForwarder –comm serial@/dev/ttyUSB0:telosb –port 9002

4. Listen/ListenNew to SF: java net.tinyos.tools.Listen –comm sf@localhost:9002

java net.tinyos.tools.ListenNew –comm sf@localhost:9002

5. Serial Forwarder (c++): ./sf help help start start 9002 /dev/ttyUSB0 115200

TinyOS Native Tools

7

Page 8: TinyOS Course 02 Serial Communication

1. Try sending a message to handle leds from the PC to the mote using SFSend program in utils.

8

Exercises

Page 9: TinyOS Course 02 Serial Communication

Contact Info: Manuel Fernández

[email protected]

9