On Apr 8, 2006, at 5:14 PM, Tahir Azim wrote:

Hi,

I am a novice to TinyOS and was just trying out the sample apps provided with the tinyos code. Can somebody tell me how I can get RadioCountToLeds to receive packets? I'm using the code from the tinyos-2.x module (tinyos-2_0_devel-BRANCH branch) in CVS. My topology and driver.py is given below, but the nodes are only able to send packets but not receive them. Is there something wrong with the noise levels I am using or the values of gain?

driver.py
------------
from TOSSIM import *
import sys

t = Tossim([])
r = t.radio()
f = open("topo.txt", "r")

lines = f.readlines()
for line in lines:
  s = line.split()
  if (len(s) > 0):
    print " ", int(s[0]), " ", int(s[1]), " ", float(s[2]);
    r.add(int(s[0]), int(s[1]), float(s[2]))

t.addChannel("RadioCountToLedsC", sys.stdout)
t.addChannel("Boot", sys.stdout)


t.getNode(1).bootAtTime(100001);
t.getNode(2).bootAtTime(800008);
t.getNode(3).bootAtTime(1800009);

r.setNoise(1, -77.0, 3.0)
r.setNoise(2, -77.0, 3.0)
r.setNoise(3, -77.0, 3.0)

for i in range(0, 10000):
  t.runNextEvent()


topo.txt
-----------
1  2 -54.0
2  1 -54.0
1  3 -60.0
3  1 -60.0
2  3 -64.0
3  2 -64.0

Do the nodes get sendDone() events for their transmissions? One possibility is that the noise levels are too high; based on the recent topology generation software that USC contributed, I lowered CCA detection from -77 to -95. This means that if the noise is at -77, nodes will never think they have a clear channel.

I thought I had committed changes to the tutorial on this, but it looks like they're not there. I'll make them now.

Phil

_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to