Hi all, i'm studying communication between micaz motes using the example RadioCountToLeds. I compiled the application for simulation using make micaz sim. Then I write a python script to simulate the functionalities using TOSSIM. The output that appears is the following: --- [EMAIL PROTECTED]:/opt/tinyos-2.x/apps/RadioCountToLeds$ python test.py 1 2 -54.0 2 1 -55.0 1 3 -60.0 3 1 -60.0 2 3 -64.0 3 2 -64.0 DEBUG (1): RadioCountToLedsC: timer fired, counter is 1. DEBUG (1): RadioCountToLedsC: packet sent. DEBUG (2): RadioCountToLedsC: timer fired, counter is 1. DEBUG (2): RadioCountToLedsC: packet sent. DEBUG (3): RadioCountToLedsC: timer fired, counter is 1. DEBUG (3): RadioCountToLedsC: packet sent. ---
As can you see, the packets are sent but no packet is received!! I think this problem is caused by noone sendDone event. In fact there isn't communication after one packet is sent by each mote because the sendDone event doesn't occur. How can i solve this problem? The python script is the following (I copy it from http://www.tinyos.net/dist-2.0.0/tinyos-2.0.0beta2/doc/html/tutorial/lesson11.html using only 2 motes): 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 " ", s[0], " ", s[1], " ", 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); r.setNoise(1,-100.0,5.0) r.setNoise(2,-100.0,5.0) for i in range(0, 500000): t.runNextEvent() -- Thanks in advance RG _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
