tinyos course 02 serial communication
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_2013TRANSCRIPT
WSN Programming Course
TinyOS Lab: Lesson 02: Serial Communication
Manuel Fernández
UAH, 18th September 2013
• Introduction to serial communication • TinyOS native tools • Exercises
2
Contents
3
Configuration
4
Header
5
Module
• Specification:
• Implementation:
Let’s look at Lesson02 and go step by step!
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
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
1. Try sending a message to handle leds from the PC to the mote using SFSend program in utils.
8
Exercises