Hi Chad, Thanks for quick response!
That's what I've been doing too, but I still have weird inconsistencies. My grid network initializes and builds routing tree perfectly about 9 out of 10 times, but that one time some node somewhere never gets the message sent to it. I am thinking it must be because of collisions. What is the default MAC protocol used in Tinyos 2? I thought it was B-mac, is that true? Is there some carrier sensing going on by default? Or is it only possible to prevent collisions by randomizing transmission times? Thanks, Lilia On 3/21/07, Chad Metcalf <[EMAIL PROTECTED]> wrote:
I imagine the best way is in the link specification. Tutorial 11 talks a little about this. The method you're looking for is: * add(src, dest, gain)*: Add a link from *src* to *dest* with *gain*. When * src* transmits, *dest* will receive a packet attenuated by the *gain*value. From the tutorial: Because the radio connectivity graph can be scripted, you can easily store topologies in files and then load the file. Alternatively, you can store a topology as a script. For example, this script will load a file which specifies each link in the graph as a line with three values, the source, the destination, and the gain, e.g.: 1 2 -54.0 means that when 1 transmits 2 hears it at -54 dBm. Create a file topo.txtthat looks like this: 1 2 -54.0 2 1 -55.0 1 3 -60.0 3 1 -60.0 2 3 -64.0 3 2 -64.0 This script will read such a file: >>> 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])) The default sensitivity seems to be 3.0 so an incoming packet must be 3dBm greater than the sum of noise and concurrent transmissions for it to be received. The default threshold seems to be -95 dBm. Specify a 0 gain and that should mean the packet is heard at the same strength it was sent (I think...). Of course Phil or someone else might have a better answer. Cheers, Chad On 3/21/07, Lilia Paradis < [EMAIL PROTECTED]> wrote: > Hi all, > > I can't seem to figure out how to model lossless environment in Tossim, > i.e. 100% packet delivery rate and error-free. I've searched the > archives and found a few messages on this subject, but they all refer to > Tinyos-1.x. I am using Tinyos-2 > > Thanks, > > -- > Lilia Paradis > _______________________________________________ > Tinyos-help mailing list > Tinyos-help@Millennium.Berkeley.EDU > https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > > -- Chad @ Home
-- Lilia Paradis -- Lilia Paradis
_______________________________________________ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help