[Tinyos-help] Random Backoff Delays in TinyOS 2.x Channel Access
Anton
ageev at disi.unitn.it
Thu Jun 12 12:29:34 PDT 2008
Hello!
There is probable bug in the
/tinyos-2.x/tos/chips/cc2420/csma/CC2420CsmaP.nc (lines 218 and 225)
Communicating wireless modules should wait some random delay before
performing Clear Channel Assess.
According to the IEEE 802.15.4 standard, that delay should be
random(2^BE-1) backoff periods, where BE can vary from 3 to 5 (the
default values macMinBE and macMaxBE, IEEE 802.15.4-2006, pages
163-164). This means that for CC2420 the maximum backoff delay is 31*320
= 9920 microseconds (when BE=5), and the maximum initial backoff delay
is 7*320 = 2240 microseconds (since initially BE=3).
But according to CC2420CsmaP.nc file the maximum initial backoff delay
can be around 9765 microseconds (line 218) and maximum congestion
backoff delay can be around 2441 microseconds (line 225).
It seems that the ranges of these random delays are swapped. Even in
TinyOS 1.x the range of the initial delay is smaller than that of
congestion backoff delay
(/tinyos-1.x/tos/lib/CC2420Radio/CC2420RadioM.nc, lines 745 and 752). In
TinyOS 2.x this is conversely.
Also, according to the standard the range of the random delay should
expand (by default BE should change from 3 to 5) each time the channel
is sensed busy (CSMA/CA algorithm - page 172 of the standard). But the
range of all random delays is constant both in TinyOS 1.x and TinyOS 2.x.
Please, tell whether it is bug or not.
Kind regards,
Anton.
More information about the Tinyos-help
mailing list