The SACK_HEADER_LENGTH constant in the receive branch refers to the position
in the data frame (non-ack packet) at which we can safely issue an
acknowledgment. This position is in the header of a normal packet:
typedef nx_struct cc2420_header_t {
nxle_uint8_t length;
nxle_uint16_t fcf; <- 2
nxle_uint8_t dsn; <- 1
nxle_uint16_t destpan; <-2
nxle_uint16_t dest; <-2
...
2 + 1 + 2 + 2 = 7.
When we have this much information downloaded, we can safely issue a SACK.
-David
_____
From: Paolo [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 15, 2008 10:54 AM
To: David Moss
Cc: [email protected]
Subject: Re: [Tinyos-help] how to determine SACK packet
Thanks David
another question: the SACK_HEADER_LENGTH variables is set to 7 byte, Why ?
FCF (2B) + DSN(1B) + FCS (2B) = 5B ???????
David Moss wrote:
The FCF word contains a few bits that indicate the type of frame is an
acknowledgment frame. It is possible to receive a 5-byte packet that is not
an ack frame but simply noise, where the CRC passes. If the FCF word of a
packet is an acknowledgment type, and the length is 5 bytes, then you
probably have yourself a real acknowledgment frame. Refer to the CC2420
datasheet for more details.
-David
_____
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paolo
Sent: Thursday, May 15, 2008 1:32 AM
To: [email protected]
Subject: [Tinyos-help] how to determine SACK packet
Hello,
How i can determine if a packet in RX fifo is a SACK packet ?
If the cc2420_header_t->length is 5 bytes (2B FCF + 1B DSN + 2B FCS) i can
say that is a SACK packet ?
Thanks.
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help