cc2420/receive/CC2420ReceiveP.nc:
/*
* The destination address check here is not completely optimized. If you
* are seeing issues with dropped acknowledgements, try removing
* the address check and decreasing SACK_HEADER_LENGTH to 2.
* The length byte and the FCF byte are the only two bytes required
* to know that the packet is valid and requested an ack. The destination
* address is useful when we want to sniff packets from other transmitters
* while acknowledging packets that were destined for our local address.
*/
//--if(call CC2420Config.isAutoAckEnabled() && !call CC2420Config.isHwAutoAckDefault()) {
if( !call CC2420Config.isHwAutoAckDefault()) {
//--if (1) {
//--if (((( header->fcf >> IEEE154_FCF_ACK_REQ ) & 0x01) == 1)
if ( 1
&& ((header->dest == call CC2420Config.getShortAddr())
|| (header->dest == AM_BROADCAST_ADDR))
&& ((( header->fcf >> IEEE154_FCF_FRAME_TYPE ) & 7) == IEEE154_TYPE_DATA)) {
// CSn flippage cuts off our FIFO; SACK and begin reading again
// We may have received an ack that should be processed by Transmit
// buf[rxFrameLength] >> 7 checks the CRC
//--if ( ( buf[ rxFrameLength ] >> 7 ) && rx_buf ) {
if ( rx_buf ) {
cc2420/transmit/CC2420TransmitP.nc:
case S_EFD:
sfdHigh = FALSE;
call CaptureSFD.captureRisingEdge();
//--if ( (call CC2420PacketBody.getHeader( m_msg ))->fcf & ( 1 << IEEE154_FCF_ACK_REQ ) ) {
if ( 1 ) {
Showing posts with label CC2420. Show all posts
Showing posts with label CC2420. Show all posts
Monday, March 4, 2013
Wednesday, January 9, 2013
How to clear IEEE154_FCF_ACK_REQ to remove the ACK requirement
../cc2420/csma/CC2420CsmaP.nc :
Change line143: header->fcf &= ( (1 << IEEE154_FCF_ACK_REQ) |
to header->fcf &= ( (0 << IEEE154_FCF_ACK_REQ) |
Change line 151: metadata->ack = FALSE;
to metadata->ack = TRUE;
Change line143: header->fcf &= ( (1 << IEEE154_FCF_ACK_REQ) |
to header->fcf &= ( (0 << IEEE154_FCF_ACK_REQ) |
Change line 151: metadata->ack = FALSE;
to metadata->ack = TRUE;
Sunday, January 6, 2013
CC2420 Layer Diagram
- +--------------------------------------------------+
- | Application Layer |
- | |
- +-----------------------+--------------------------+
- +----------------------+-------------------------+
- | Active Message Layer |
- +----------------------+-------------------------+
- +----------------------+-------------------------+
- | Unique Send Layer |
- +----------------------+-------------------------+
- +----------------------+-------------------------+
- | Optional Packet Link Layer |
- +----------------------+-------------------------+
- +----------------------+-------------------------+
- | Optional Low Power Listening Implementations |
- +----------------------+-------------------------+
- +----------------------+-------------------------+
- | Unique Receive Filtering Layer |
- +----------------------+-------------------------+
- +----------------------+-------------------------+
- | Optional 6LowPAN TinyOS Network Layer |
- +----------------------+-------------------------+
- +----------------------+-------------------------+
- | Carrier Sense Multiple Access (CSMA) |
- +----------------------+-------------------------+
- +----------+----------+ +----------+----------+
- | ReceiveP | | TransmitP |
- +----------+----------+ +----------+----------+
- +-----------------------+-------------------------+
- | SPI bus, GPIO, Interrupts, Timer Capture |
- +-------------------------------------------------+
Subscribe to:
Posts (Atom)