On Jun 16, 2007, at 7:33 PM, Tal Rusak wrote:
I have read the TOSSIM tutorial at
http://www.tinyos.net/tinyos-2.x/doc/html/tutorial/lesson11.html
As I followed the tutorial, I encountered the following issues
when
using TinyOS 2.0.1:
1) For some reason, the result of the command dir(t) appears to be
quoted incorrectly at the end of the "Running TOSSIM with Python"
section.
When I run this command, I get a command ticksPerSecond in addition
to the
ones listed in the tutorial.
I think that this command was added after the first version of the
tutorial was written. I'll update the tutorial shortly.
2) The "setThreshold" command, cited at the start of the tutorial
section "Configuring a Network", does not appear to exist in this
release.
Also, it is not listed in the dir(r) response cited above or in the
one
that I run myself. How, then do I complete the following step of the
tutorial?
"If you set node's clear channel assessment to be at -110dBm, then
nodes
will never transmit, as noise and interference never drop this low."
I believe this inconsistency is due to the fact that the command was
removed after the tutorial was first written. I removed it because
some radio chips let you set the sensitivity, so its presence would
raise issues when there are conflicts between was the script and the
TinyOS code specify.
3) The tutorial cites the first ten lines of the meyer-heavy.txt
noise
trace. However, these are not the first ten lines of the actual
file in
the distribution that I downloaded (from the Toilers). The first
ten lines
of the file I have are:
-39
-98
-98
-98
-99
-98
-94
-98
-98
-98
This appears to be the same as the current CVS version of the
file.
If this seems incorrect, where can I find the full, correct
meyer-heavy.txt noise trace?
Those are the correct values. The tutorial ones are incorrect.
4) The tutorial refers to the file packets.py. This file contains
the
following line of code:
print "Delivering " + msg.__str__() + " to 0 at " + str(t.time() + 3);
This line does not run correctly for me. This is the error
message:
Traceback (most recent call last):
File "packets.py", line 46, in ?
print "Delivering ", msg, " to 0 at ", str(t.time() + 3);
TypeError: 'str' object is not callable
However, when I change it as follows, then the code does run:
print "Delivering " + msg.__str__() + " to 0 at " + (t.time() + 3);
Line 46 of the latest CVS version
(/tinyos-2.x/tos/lib/tossim/examples/packets.py) still seems to have
this problem.
What version of Python are you using? Works for me.
5) The "Configuring a Network" section of the tutorial has the
following
statement near the end:
"TOSSIM has two sample configuration files generated from the tool in
tos/lib/tossim/topologies. The first is grid.txt . . . The second
file is
scatter.txt"
Again, this looks like the tutorial became out of sync with its
underlying code base. There is no scatter.txt, and there are several
grids.
However, I cannot find these files in the cited directory.
Phil
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help