Changes between Version 2 and Version 3 of Old/TinyOS/Serial


Ignore:
Timestamp:
Dec 24, 2008, 1:17:24 AM (15 years ago)
Author:
shweta
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Old/TinyOS/Serial

    v2 v3  
    11== Mote-PC Serial Communication ==
    22
    3 The basic abstraction for mote-PC communication is a '' packet source ''. A packet source is a communication medium over which an application can receive packets from and send packets to a mote.
    4 Examples of packet sources include serial ports, TCP sockets, and the SerialForwarder tool. Most TinyOS communication tools take an optional -comm parameter, which allows you to specify the packet source as a string. For example:
    5 
     3The receivers receive packets from senders and pass them on to the serial port. Tinyos provides two java tools  (Listen and MsgReader) to print the messages on the PC console.
    64{{{
    75
     
    108}}}
    119
    12 tells Listen tool to use the serial port /dev/ttyUSB0 at the correct speed for a telosb mote.
    13 
    14 Listen creates a packet source and just prints out every packet it sees. Output should look something like this:
     10The Listen tool receives the packets and prints the raw packets to the PC console. Output should look something like this:
    1511{{{
    1612 
     
    3531
    3632
    37 We use MsgReader to print out the messages.
     33MsgReader is a better alternative to Listen. The MsgReader class takes a java message class (provided by the user) as an argument. It prints receives the packets from the serial port and prints the packet structure defined by the java message class.
    3834
    3935{{{