Hey Everyone,

I am using TOSSIM for simulating tinyos-2.x code. I write a python file and
compile it. I simulating multiple nodes sending and receiving packets at
different times. My problem is

1. There is packet loss in the TOSSIM simulations. Somehow some packets dont
get delivered to the nodes. For example if there are 7 nodes and 1 node
sends a broadcast, that broadcast on some occasions cannot be heard by all 6
other nodes (Maybe only 3 nodes hear it). This means packet loss in TOSSIM
simulations isnt it? How to overcome it?

I use "topo.txt" and "meyer-heavy.txt" to create a network model. My python
code is

from TOSSIM import *
import sys

t = Tossim([])

t.addChannel("Boot", sys.stdout);
t.addChannel("ekf",sys.stdout);
t.addChannel("print",sys.stdout);
t.addChannel("radio",sys.stdout);




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]))


noise = open("meyer-heavy.txt", "r")
lines = noise.readlines()
for line in lines:
  str = line.strip()
  if (str != ""):
    val = int(str)
    for i in range(1, 8):
      t.getNode(i).addNoiseTraceReading(val)

for i in range(1, 8):
  print "Creating noise model for ",i;
  t.getNode(i).createNoiseModel()

t.getNode(1).bootAtTime(100001);
t.getNode(2).bootAtTime(800008);
t.getNode(3).bootAtTime(1800009);
t.getNode(4).bootAtTime(1900009);
t.getNode(5).bootAtTime(1900020);
t.getNode(6).bootAtTime(1900030);
t.getNode(7).bootAtTime(1900040);

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



2. I see that the tossim tutorial on tinyos.net has changed form about 3
months back. The new tutorial says to use "mirage-1.txt". I cannot find "
mirage-1.txt" on tinyos.net and its not on my tossim root directory because
I installed tossim some time back. Any kind soul willing to show where I can
get the text file.


Thanks.

prashan
_______________________________________________
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to