Hi to all,
I would like to ask if anybody is able to confirm my understanding about the 
cc2420 steps on transmission and its power consumption. 
Moreover, after this first question I think to have found a bug in the TOSSIM 
simulator.




When I have to send a packet of length x, this is how the cc2420 should behave 
(in the current svn version of TinyOS 2.x):
1) Turn on the Voltage regulator (1.22 ms ----> 20 jiffies ----> 20* 0.305 ms). 
Here the average current drain is quite low..it average is 0.020 mA, right?

2) Go into backoff (Collision Avoidance) (from 0.1525 to 9.76 ms --> random 
number between 10 and 4*10 symbols ---> 5*(0.305ms) and 20*(0.305ms) 
respectively. Remark that in 1 jiffy I can transmit 2 symbols). What is the 
energy consumption of the backoff period? I think that in this phase the radio 
is listening to the channel..isn't it? In this case the (average) current drain 
would be about 20-21 mA (listen).

3) If Channel is free (CCA) then start transmit immediately.

4) At this point the radio start transmitting. If the payload has X bytes then, 
since from TinyOS 2.x CC2420 support variable payload lengths, we will have:
    12 symbols (preamble, sfd, phy header i.e., 6bytes) +
     4 symbols (CRC i.e. 2 bytes)       +
   X*2 symbols (payload i.e., X bytes)  =
-----------> (12 + 4 + 2X)/2*0.305ms = 10.98 ms for a payload of 28 bytes


5) Wait for an ACK reply:
--------> min: 12 symbols + 11bytes -> 34symbols = 0.5185 ms
--------> max: 256 jiffies ->256 * 0.305 ms = 78.8 ms
Also here, the radio is in listening state, right?

6) If no ack is received, repeat from point 3 but this time, if channel is free 
(CCA), wait CC2420_TIME_ACK_TURNAROUND jiffies just to be sure to not being 
waiting for an ACK. Thus wait others 7*0.305ms--->0.2135 ms. The radio here is 
always listening..right?

7) Continue repeating steps from 3 to 6 for all the duration of the receiver's 
sleep interval + 20 ms. Althought the documentation says "The transmitters 
perform a message delivery by transmitting the full packet over and over again 
for twice the duration of the receiver’s duty cycle period", in the code 
(/opt/tinyos-2.x/tos/chips/cc2420/lpl/DefaultLplP.nc) what happens is

     call SendDoneTimer.startOneShot(
                call LowPowerListening.getRxSleepInterval(currentSendMsg) + 20);

as I said.

8) If during this process an ACK is received (only for unicast TX), then stop 
and go back to sleep only AFTER LISTENING to the channel for others 
DELAY_AFTER_RECEIVE/1024 seconds (in favour of burst receptions/transmissions).

Is all this process right??




Regard the bugs I found in the TOSSIM simulator here they are:

1) in $(TOS_ROOT)/tinyos-2.x/tos/lib/tossim/TossimPacketModelC.nc (line 248) we 
found that the bit lenght of the payload is calculated as:
     duration = 8 * (sendingLength + sim_packet_header_length());

However, the header length is already considered into sendingLength! Indeed,
the lenght of the payload gets modified in 
$(TOS_ROOT)/tinyos-2.x/tos/lib/tossim/TossimActiveMessageC.n 
at line 75:
     err = call Model.send((int)addr, amsg, len + sizeof(tossim_header_t));

I don't know which of the two must be corrected, but as it is now the simulator 
performs uncorrectly.

2) This is a more simpler error..
At line 189 of (TOS_ROOT)/tinyos-2.x/tos/lib/tossim/TossimPacketModelC.nc 
there's written:
       dbg("TossimPacketModelC", "Starting CMSA with %lli.\n", backoff);
I think it should be "CSMA" and not "CMSA"...

Best regards,
FP


      Posta, news, sport, oroscopo: tutto in una sola pagina. 
Crea l'home page che piace a te!
www.yahoo.it/latuapagina

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to