<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://andromeda.df.lu.lv/wiki/index.php?action=history&amp;feed=atom&amp;title=Leo%3ATinyOS-development</id>
	<title>Leo:TinyOS-development - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://andromeda.df.lu.lv/wiki/index.php?action=history&amp;feed=atom&amp;title=Leo%3ATinyOS-development"/>
	<link rel="alternate" type="text/html" href="http://andromeda.df.lu.lv/wiki/index.php?title=Leo:TinyOS-development&amp;action=history"/>
	<updated>2026-04-23T10:52:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>http://andromeda.df.lu.lv/wiki/index.php?title=Leo:TinyOS-development&amp;diff=307&amp;oldid=prev</id>
		<title>Leo: /* Extra tools */</title>
		<link rel="alternate" type="text/html" href="http://andromeda.df.lu.lv/wiki/index.php?title=Leo:TinyOS-development&amp;diff=307&amp;oldid=prev"/>
		<updated>2008-11-12T15:56:47Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Extra tools&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 15:56, 12 November 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 82:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 82:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;== Extra tools ==&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;== Extra tools ==&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;I have written some extra tools (in perl) to make tinyos development life easier. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;These tools are available in svn:/tos/tools/&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;I have written some extra tools (in perl) to make tinyos development life easier. &lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;  * &#039;&#039;&#039;pretty-gcc.pl&#039;&#039;&#039; - Pretty compilation errors - colorizes the output of gcc and hides uninteresting output. Piping the compilation error output to this tool I find the errors much faster, because they stand out. You may want to alias the bellow to something shorter.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;  * &#039;&#039;&#039;pretty-gcc.pl&#039;&#039;&#039; - Pretty compilation errors - colorizes the output of gcc and hides uninteresting output. Piping the compilation error output to this tool I find the errors much faster, because they stand out. You may want to alias the bellow to something shorter.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Leo</name></author>
		
	</entry>
	<entry>
		<id>http://andromeda.df.lu.lv/wiki/index.php?title=Leo:TinyOS-development&amp;diff=306&amp;oldid=prev</id>
		<title>Leo: New page: = Working with motes and the Testbed =  These notes are by Leo Selavo. Follow them at your own risk.  == Programming a TelosB mote ==  To program a TelosB mote you need to compile your pro...</title>
		<link rel="alternate" type="text/html" href="http://andromeda.df.lu.lv/wiki/index.php?title=Leo:TinyOS-development&amp;diff=306&amp;oldid=prev"/>
		<updated>2008-11-12T15:55:58Z</updated>

		<summary type="html">&lt;p&gt;New page: = Working with motes and the Testbed =  These notes are by Leo Selavo. Follow them at your own risk.  == Programming a TelosB mote ==  To program a TelosB mote you need to compile your pro...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Working with motes and the Testbed =&lt;br /&gt;
&lt;br /&gt;
These notes are by Leo Selavo. Follow them at your own risk.&lt;br /&gt;
&lt;br /&gt;
== Programming a TelosB mote ==&lt;br /&gt;
&lt;br /&gt;
To program a TelosB mote you need to compile your program for telosb and then install it.&lt;br /&gt;
&lt;br /&gt;
 make telosb&lt;br /&gt;
 make reinstall telosb&lt;br /&gt;
&lt;br /&gt;
== Programming a mote on a specific USB port ==&lt;br /&gt;
&lt;br /&gt;
If you have a testbed with many motes attached to a computer by USB hub, &lt;br /&gt;
you may want to select a specific mote for reprogramming. &lt;br /&gt;
Then you need to specify the port using &amp;quot;bsl,&amp;lt;port&amp;gt;&amp;quot; argument on the make telosb reinstall line, &lt;br /&gt;
as in the examples below.&lt;br /&gt;
&lt;br /&gt;
In order to see which ports are assigned to the motes, run motelist.&lt;br /&gt;
&lt;br /&gt;
=== In Windows - Cygwin ===&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; motelist&lt;br /&gt;
 &lt;br /&gt;
 Reference  CommPort   Description&lt;br /&gt;
 ---------- ---------- ----------------------------------------&lt;br /&gt;
 XBQDTMW2   COM35      Crossbow Telos Rev.B&lt;br /&gt;
 XBQ8OQ47   COM36      Crossbow Telos Rev.B&lt;br /&gt;
 XBQF0342   COM37      Crossbow Telos Rev.B&lt;br /&gt;
 XBQF033F   COM38      Crossbow Telos Rev.B &lt;br /&gt;
 &lt;br /&gt;
 $&amp;gt; make telosb reinstall bsl,36&lt;br /&gt;
&lt;br /&gt;
The above example will program the mote on COM37 (notice the COM number is higher by one).&lt;br /&gt;
&lt;br /&gt;
=== In Linux - Ubuntu ===&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; motelist&lt;br /&gt;
 &lt;br /&gt;
 Reference  Device           Description&lt;br /&gt;
 ---------- ---------------- ---------------------------------------------&lt;br /&gt;
 XBQDTMXJ   /dev/ttyUSB0     XBOW Crossbow Telos Rev.B&lt;br /&gt;
 XBQDTMWO   /dev/ttyUSB1     XBOW Crossbow Telos Rev.B&lt;br /&gt;
 XBQDTN1D   /dev/ttyUSB2     XBOW Crossbow Telos Rev.B&lt;br /&gt;
 XBQDTN9C   /dev/ttyUSB3     XBOW Crossbow Telos Rev.B&lt;br /&gt;
 &lt;br /&gt;
 $&amp;gt; make telosb reinstall bsl,/dev/ttyUSB2&lt;br /&gt;
&lt;br /&gt;
The above example will program the mote on USB2.&lt;br /&gt;
&lt;br /&gt;
== Programming a mote with a specific address ==&lt;br /&gt;
&lt;br /&gt;
Sometimes you want to give the mote a specific address, that will be used by the mote software,&lt;br /&gt;
for example, to identify which mote is sending what packets. This address is accessible&lt;br /&gt;
in TinyOS program as &amp;#039;&amp;#039;&amp;#039;TOS_NODE_ID&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
To specify the address when uploading the program you include the address &lt;br /&gt;
as an integer after reinstall, like this (note the comma inbetween):&lt;br /&gt;
&lt;br /&gt;
 make telosb reinstall,17 bsl,/dev/ttyUSB5&lt;br /&gt;
&lt;br /&gt;
The above command will install the software to the mote attached as USB5, with the address 17.&lt;br /&gt;
&lt;br /&gt;
== Listening to packets ==&lt;br /&gt;
&lt;br /&gt;
To see the communication coming from the sensor network you can use Serial Forwarder and Listen tools that come with TinyOS.&lt;br /&gt;
For this one mote must be programmed using TOSBase (in TinyOS-1.x) or BaseStation (in TinyOS-2.x, $TOSROOT/apps/Basestation) application and attached &lt;br /&gt;
to the computer&amp;#039;s or Tmote Connect devices USB port.&lt;br /&gt;
&lt;br /&gt;
Serial forwarder will act as a gateway between the serial (or USB) port and the TCP port, usually port 900x.&lt;br /&gt;
&lt;br /&gt;
=== Using Tmote Connect ===&lt;br /&gt;
&lt;br /&gt;
When motes are attached to Tmote Connect, you can check the web interface to the Tmote Connect for the&lt;br /&gt;
port numbers assigned to the connected motes. You may need to export MOTECOM variable specifying the port as in the example below and then you can use the java Listener tool to see raw packets coming in.&lt;br /&gt;
&lt;br /&gt;
 export MOTECOM=&amp;quot;sf@10.176.254.16:9002&amp;quot;&lt;br /&gt;
 java net.tinyos.tools.Listen&lt;br /&gt;
&lt;br /&gt;
The example above assumes that the Tmote Connect is on the IP address 10.176.254.16 and the mote is accessible via port 9002 which usually is the second USB port. To speed things up I alias the above commands for your working environment.&lt;br /&gt;
&lt;br /&gt;
== Extra tools ==&lt;br /&gt;
&lt;br /&gt;
I have written some extra tools (in perl) to make tinyos development life easier. These tools are available in svn:/tos/tools/&lt;br /&gt;
&lt;br /&gt;
  * &amp;#039;&amp;#039;&amp;#039;pretty-gcc.pl&amp;#039;&amp;#039;&amp;#039; - Pretty compilation errors - colorizes the output of gcc and hides uninteresting output. Piping the compilation error output to this tool I find the errors much faster, because they stand out. You may want to alias the bellow to something shorter.&lt;br /&gt;
&lt;br /&gt;
 make telosb 2&amp;gt;&amp;amp;1 | perl /home/elo/bin/pretty-gcc.pl&lt;br /&gt;
&lt;br /&gt;
  * &amp;#039;&amp;#039;&amp;#039;relisten.pl&amp;#039;&amp;#039;&amp;#039; - pipe the &amp;quot;java net.tinyos.tools.Listen&amp;quot; to this tool to reformat the hex-dump to a few decimal numbers that can  be imported to a spreadsheet later. Specify the single and double byte fields in the perl file in your local copy, see the comments in the file. You can pipe the result further in a log file as needed (just do not cancel it before the log file is flushed).&lt;br /&gt;
&lt;br /&gt;
 java net.tinyos.tools.Listen | perl relisten.pl&lt;/div&gt;</summary>
		<author><name>Leo</name></author>
		
	</entry>
</feed>