[Tinyos-help] Precise contents and length of the 802.15.4 frames (and most especially with the TestNetwork App)

Pedro Almeida pedralm at gmail.com
Sat Jun 30 08:34:39 PDT 2007


Hi, Erwing;

I've taken a good look at the data sheet. I've looked at it before but I
totally forgot the details from seeing just the TEP and the header files.

according to the sheet, total PPDU frame is:

PPDU = SHR (5 bytes) + PHR (length: 1 byte) + MPDU

now the MPDU starts with the rest of the struct (apart from the length):

typedef nx_struct cc2420_header_t {
nxle_uint8_t length;
nxle_uint16_t fcf;
nxle_uint8_t dsn;
nxle_uint16_t destpan;
nxle_uint16_t dest;
nxle_uint16_t src;
nxle_uint8_t type;
} cc2420_header_t;

MPDU = FCF + DSN + DestPAN + DestAdd + SRC + FCS = 11 bytes

Total so far : 11 + 6 = 17

The "type" I don't know where it belongs, maybe the start of the data
payload? It does say in here:

The TinyOS 802.15.4 T-frame format is as follows:
+-------------------+---------+------------------------------+--------------+

| 802.15.4 Header | AM type | data | 802.15.4 CRC |
+-------------------+---------+------------------------------+--------------+

so should be "somewhere" between the Header and the data.

Anyway, the "data" field i still dont know if its size is the exact size of
the struct i'm using, if there's some more bytes added or if it is always
defined by the MAX setting, regardless of being filled or not.

Finally, the CRC in the scheme above, i dont know if its the same as the FCS
(as the FCS is only from the MPDU) or if after the FCS, 2 CRC bytes actually
are inserted (extending actual size to another 2 bytes).

Thanks for the help!

Pedro


On 6/30/07, Erwing Sánchez <erwing.sanchez at gmail.com> wrote:
>
> Hi Pedro,
> you may want to take look to the cc2420 datasheet. I found a lot of
> useful information regarding IEEE 802.15.4 there!
> www.chipcon.com/files/CC2420_Data_Sheet_1_3.pdf
> Or you may want to try the IEEE 802.15.4 standard, where you can
> certainly find all this information.
> Take into consideration that, for instance, the length of the frame
> Header varies according to the value of the fcf field (I think most of
> the time it is not changed in TinyOS applications). Besides, the frame
> length changes in accordance to the application because the payload
> changes.
> However, If you're looking for maximum values, the maximum frame
> length is 128 bytes in 802.15.4.
> Regards,
> Erwing
>
> On 6/30/07, Pedro Almeida <pedralm at gmail.com> wrote:
> > Hello all;
> >
> > I would like to know the exact length of the 802.15.4 frame. The reason
> that
> > i'd like to know the exact length is because i need to do some duty
> cycles
> > numbers and one of the inputs is the frame length. It would seem to
> equal
> > the payload, but given it makes no sense to me the payload on the serial
> > frame, i might as well doubt i can figure the length on the 802.15.4's.
> >
> > So according to TEP 125:
> >
> > The TinyOS 802.15.4 T-frame format is as follows:
> >
> +-------------------+---------+------------------------------+--------------+
> > | 802.15.4 Header | AM type | data | 802.15.4 CRC |
> >
> +-------------------+---------+------------------------------+--------------+
> >
> > I presume the 802.15.4 Header, as according to CC2420.h, to be 10 bytes:
> >
> > typedef nx_struct cc2420_header_t {
> >  nxle_uint8_t length;
> >  nxle_uint16_t fcf;
> >  nxle_uint8_t dsn;
> >  nxle_uint16_t destpan;
> >  nxle_uint16_t dest;
> >  nxle_uint16_t src;
> >
> >  /** I-Frame 6LowPAN interoperability byte */
> > #ifdef CC2420_IFRAME_TYPE
> >  nxle_uint8_t network;
> > #endif
> >
> >  nxle_uint8_t type;
> > } cc2420_header_t;
> >
> > AM Type, according to previous struct, another byte before "data".
> Total:
> > 11.
> >
> > I suppose CRC to be 2 extra bytes added in the end. Total: 13
> >
> > The "data" field intrigues me.
> >
> > I see this being defined in CC2420.h
> >
> > #ifndef TOSH_DATA_LENGTH
> > #define TOSH_DATA_LENGTH 28
> > #endif
> >
> > Does this mean it's a fixed length that gets 'populated' according to
> each
> > different situation (making a fixed total of 42 bytes), or is 28 a max,
> or
> > am i understanding this all wrong?
> > The struct in TestNetwork is 15 bytes. Would that means the total frame
> size
> > is 13+15=28 bytes? Or is there anything extra added?
> >
> > Any help greatly appreciated!
> > Thanks,
> >
> > Pedro
> >
> >
> > _______________________________________________
> > Tinyos-help mailing list
> > Tinyos-help at Millennium.Berkeley.EDU
> >
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20070630/2b7d71ff/attachment.html


More information about the Tinyos-help mailing list