As can be seen on its schematic, the TelosB mote is equipped with an FT232BM FTDI chip, converting low-level UART frames used by the MSP430 into something your computer can understand. When plugged into a USB port, your operating system sees your TelosB as a serial port.

Note: OpenWSN does not use the Java-based encapsulation tools typically used in TinyOS.

Different types of traffic transit over that serial link, in both directions:

Frame format

From the mote to the OpenLBR/computer:

^^^<command byte><payload bytes>$$$

The format is borrowed from regular expressions, where !!!^ and $$$ are used to indicate to beginning/end of a frame, resp. The first byte indicates the type of payload that is following:

The format of the payload depends on the type of message.

The status message format is:

The error message format is:

The request message format is:

From the OpenLBR/computer to the mote:

<command byte><argument byte><payload bytes>

The OpenLBR/computer sends bytes to the mote only after receiving a request (a R command byte). The first byte it sends is a command byte, indicating the type of command issued (in which case there is no payload), or the type of data payload that is following:

The meaning of the argument bytes depends on the type of message.

Buffering in OpenSerial

The OpenSerial component contains two circular buffers, output_buffer and input_buffer.

If everything works, go on to OpenOsTricks.