| | 1 | == Mote-PC Serial Communication == |
| | 2 | |
| | 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 | |
| | 6 | {{{ |
| | 7 | |
| | 8 | node1-2:~# java net.tinyos.tools.Listen -comm serial@/dev/ttyUSB0:telosb |
| | 9 | |
| | 10 | }}} |
| | 11 | |
| | 12 | tells Listen tool to use the serial port /dev/ttyUSB0 at the correct speed for a telosb mote. |
| | 13 | |
| | 14 | |