This same thing is used in BAMC with LPL_CHECKS of 400 which is merely around 12-15msec, but this time is just to avoid congestion in the channel. I think if this time is enhanced, it can also be used for what I mentioned. shouldn't it be?
On Fri, Jan 7, 2011 at 12:43 PM, wasif masood <[email protected]> wrote: > > I dont know whether its a technical issue with PacketIndicator / > EnergyIndicator interfaces or is there something I am doing wrong. I am > trying the following code to sense the channel before sending my packet. I > want to make sure that each sender reserve the time window before sending > something so as to avoid simultaneous transmissions of frames from 2 > different senders ( this is unlike BMAC in which 2 transmitters can send > simultaneously as long as the transmissions dont collide and for that it > uses backoff timer). But unfortunately even after sensing the channel for > 100 msec I am still having interventions between different transmissions > even though difference between each back-to-back sending within one > transmission window is from 8-20msec. > > here is the my piece of code: > > atomic { > for( ccaChecks = 0; ccaChecks < 12000; ccaChecks++) { > if(call PacketIndicator.isReceiving()) { > return FALSE; > } > if(call EnergyIndicator.isReceiving()) { > detects++; > if(detects > MIN_SAMPLES_BEFORE_DETECT) { > return FALSE; > } > } > } > } > > > > 12000 equals to 100msec sensing the channel for any potential sender. Can > someone please help me in making the right use of this thing, if there is > any. > > BR > Wasif Masood > > > > > -- Wasif Masood
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
