Hi All, I am currently using TOSSIM 2.0 on TinyOS 2.0.1. I wanted to understand the packet losses that are taking place in my simulation. The problem is as follows:
The topology I have is a simple 3 node linear topology (I have tried the same with 4 and 5 nodes as well). 1<----2<----3 The gain file I am using is: 1 2 0 1 3 0 2 1 0 2 3 0 3 1 0 3 2 0 Basically everyone can hear everyone else and all bi-directional links have 0 db gain. I am using the default radio model in TinyOS 2.0.1. I use a short trace file , the first 100 lines from the meyers-heavy.txt file to generate the noise model for each of the 3 nodes as per the tutorial. In my simulation, 2 and 3 are sending packets to sink 1. 2 is transmitting the packets directly to 1 and 3 is transmitting the packets to 1 through 2. During simulation I saw that the success rate of packets from 2 to 1 is 99% while the success rate of packets from 3 to 1 is just 82 %. This implied that packets from 3 are getting lost. In order to ascertain the cause of these losses I turned on debug statements in the forwarding queue of 2 and the radio channel model. The packet that I count as sent are the ones that are counted at the successful "sendDone " call at node 3 (hence these packets are definetly put on the air).
From the debug statements at 2 I could see that the average queue size is 1
and there are no packet drops (I was printing out debug statements in case of queue drops). From the debug statements of channel model I could see there were loses due to collision but the number of packets lost at the channel model was much less then that indicated by the loss rate of 82 % at node 3 (e.g, if node 3 sent a total of 30000 pkts, only ~24000 were reach however the channel model indicated a drop of hardly 500 packets). I detected the total numbers of packet lost in the channel by doing a grep on the word "Lost" from the debug statements from the channel model, since this is printed out whenever is a packet is dropped by the channel model. I have two questions: a> The packet loss detected at the channel model does not match up to the loss rate I am detecting for node 3. Is my method of calculating the lost packets correct ? Is there some other component other then the channel model where these losses could have occured or is there a better way to figure out the lost packets ? b> Given that it is a fully connected network and the number of nodes in question is relatively small the collision rate at the MAC should be really low ~95% (the CSMA should normally be able to resolve the contention). However it seems from the above simulation this not so ? Is there a setting at the MAC or the radio that I might be missing ? Thanks and regards, Avinash -- Phd Dept. of Electrical Engineering University of Southern California http://www-scf.usc.edu/~asridhar
_______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
