In CC2420ReceiveP you will find the following comment and code: // pass packet up if crc is good if ( ( buf[ length ] >> 7 ) && rx_buf ) { uint8_t type = ( header->fcf >> IEEE154_FCF_FRAME_TYPE ) & 7; signal CC2420Receive.receive( type, m_p_rx_buf ); if ( type == IEEE154_TYPE_DATA ) { post receiveDone_task(); return; } } waitForNextPacket();
(buf[length] >> 7) is the 1 or 0 from the CRC test. If the value is 0 then it just waits for the next packet overwriting the original once it arrives. If it is a 1 and the data type is of the format IEEE154_TYPE_DATA then it posts a receiveDone_task which signals upper layers: m_p_rx_buf = signal Receive.receive( m_p_rx_buf, m_p_rx_buf->data, length ); The code "signal CC2420Receive.receive( type, m_p_rx_buf );" is for acknowledgements and the event for this is defined in CC2420TransmitP. Regards, Damien. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paolo Sent: 07 May 2008 11:37 To: tinyos-help@millennium.berkeley.edu Subject: [Tinyos-help] CC2420 behaviour regarding CRC error when the cc2420 radio receives a packet, it checks whether the CRC bytes in the packet are correct or not (via HW). and then it replaces the two CRC bytes at the end of the packet with RSSI information and some correlation values, and only one bit to tell whether the recieved packet had valid CRC or not. At this point my question is: if the bit of CRC is 0 (CRC-Error) which is the behaviour of the radio stack ? is launched an event ? which module launch/catch the event ? the message is deleted from RX queue immediatly ? thanks Paolo. _______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help _______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help