Date post: | 15-Dec-2014 |
Category: |
Education |
Upload: | manuel-fernandez-santo-tomas |
View: | 438 times |
Download: | 1 times |
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