[Tinyos-commits] CVS: tinyos-1.x/tos/platform/mica2 CC1000RadioIntM.nc, 1.30, 1.31

Joe Polastre jpolastre at users.sourceforge.net
Fri Aug 13 11:42:29 PDT 2004


Update of /cvsroot/tinyos/tinyos-1.x/tos/platform/mica2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20102

Modified Files:
	CC1000RadioIntM.nc 
Log Message:
bug reported by thanos stathopoulos
  possible loss of packets on broadcast when acks are enabled
  the radio stack was waiting for an ack after any packet was sent, even
  broadcast.  this fix causes the radio to only wait for an ack if the
  message is unicast, otherwise it transitions to the TX_DONE state.
  problem arises in broadcast where it waits for the ACK, a receiver of
  the broadcast senses the channel is clear, and then sends a packet.
  since the transmitter is waiting for an ack, it misses the preamble of
  the new packet, does not achieve synchronization, and fails to receive
  packets sent within the ack timeout after a broadcast message.
  bug only occurred when acks were         re enabled.


Index: CC1000RadioIntM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/platform/mica2/CC1000RadioIntM.nc,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** CC1000RadioIntM.nc	10 Aug 2004 00:35:19 -0000	1.30
--- CC1000RadioIntM.nc	13 Aug 2004 18:42:27 -0000	1.31
***************
*** 559,562 ****
--- 559,563 ----
  	bTxBusy = TRUE;
  	txbufptr = pMsg;
+         txbufptr->ack = 0;
  	txlength = pMsg->length + (MSG_DATA_SIZE - DATA_LENGTH - 2); 
  
***************
*** 659,663 ****
  	case TXSTATE_FLUSH:
  	  if (TxByteCnt > 3) {
!             if (bAckEnable) {
    	      TxByteCnt = 0;
  	      RadioTxState = TXSTATE_WAIT_FOR_ACK;
--- 660,664 ----
  	case TXSTATE_FLUSH:
  	  if (TxByteCnt > 3) {
!             if ((bAckEnable) &&  (txbufptr->addr != TOS_BCAST_ADDR)) {
    	      TxByteCnt = 0;
  	      RadioTxState = TXSTATE_WAIT_FOR_ACK;



More information about the Tinyos-commits mailing list