Datasheet
Wireless Gateway Appliance Software
Moteiv Corporation  Tmote Connect : Datasheet (12/12/2006)  Page 6 of 14 
Programming Motes 
The programming code depends on the nc (netcat) utility that’s widely available on UNIX 
system. Precompiled versions of netcat 1.10 for Linux and Cygwin systems can be 
downloaded from the Moteiv support page at http://www.moteiv.com/support.php
. Mote 
programming using Tmote Connect has been fully integrated into the TinyOS build system as of 
early May 2005. Users running release of TinyOS 1.1.12 or earlier should download the 
programming rules that allow for programming using Tmote Connect from the above support 
page. TinyOS 1.1.13 includes native support for Tmote Connect. 
Users working with the TinyOS CVS repository 
from SourceForge, simply run 
cvs update 
in your ${TOSDIR}/../tools/make directory 
to download the new programming rules. 
Once the programming rules have been 
installed within the TinyOS distribution, Tmote 
Connect is ready to be used. To compile and install an application onto a particular mote, run: 
make tmote reinstall,2 netbsl,192.168.4.104:10002 
The above command will install the program configured for mote id 2 at Tmote Connect module 
at address 192.168.4.104 on USB port 2. The arguments to netbsl can take a form of the 
standard IP:PORT or can be shorthanded to XX.1 and XX.2. The value XX will be prefixed 
with the value of NETBSL_HOSTPORT_PREFIX, which defaults to "192.168.1.” for a full ip 
address of 192.168.1.XX; the shorthand port numbers “1” and “2” map to ports 10001 and 
10002 used to program each Tmote Connect USB port. 
Accessing Mote Data 
The data connection to motes is provided using 
the Serial Forwarder protocol used extensively 
throughout the TinyOS distribution. All TinyOS 
java applications retrieve the connection 
information from an environment variable called 
MOTECOM. In our example, to connect listen 
to packets generated by the Oscilloscope 
application, run 
MOTECOM=sf@192.168.4.104:9002 java net.tinyos.tools.Listen 
With this syntax we can quickly switch between different Serial Forwarder servers. MOTECOM 
variable can be made persistent for a shell session (e.g. when all connections are made to the 
same Serial Forwarder server) by executing: 
 export MOTECOM=sf@192.168.4.104:9002 










