Programming TelosB with TinyOS apps

Connecting

Connect TelosB to USB port. Verify that it is correctly detected by the system:

$ motelist
Reference  Device           Description
---------- ---------------- ---------------------------------------------
XBQZU03R   /dev/ttyUSB0     XBOW Crossbow Telos Rev.B

Building an app

Go to the app directory (e.g. cd ./apps/Blink) and execute:

$ make telosb

Programming TelosB

In the app directory:

$ make telosb reinstall bsl,/dev/ttyUSB0

To set TOS_NODE_ID provide it, when you program your mote:

$ make telosb reinstall,X bsl,/dev/ttyUSB0

replacing X with id number from the mote’s label “IWANICKI X”.

How to receive printf’s?

Add SerialStartC component to configuration of the app.

Use Java PrintfClient on the computer:

$ java -cp <tinyos>/support/sdk/java/tinyos.jar net.tinyos.tools.PrintfClient -comm serial@/dev/ttyUSB0:telosb