Re: [Tinyos-help] 802.15.4 TinyOS Qs
Length = length of the header + payload of the packet, minus the size of the length byte itself (1). This is what allows for variable length packets. DSN = Data Sequence Number, a number incremented for each packet sent by a particular node. This is used in acknowledging that packet, and also filtering out duplicate packets. Type = TinyOS AM type. When you create a new AMSenderC(AM_WHATEVER), the AM_WHATEVER definition is the type of packet. TOSH_DATA_LENGTH defaults to 28, it represents the maximum size of the payload portion of the packet, and is specified in the tos/types/message.h file. All of these fields will be filled in automatically by the radio stack when you attempt to send a message. -David From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Fell Sent: Friday, September 05, 2008 8:45 AM To: tinyos-help@millennium.berkeley.edu Cc: Jim Fell Subject: [Tinyos-help] 802.15.4 TinyOS Qs Hello. On lines 45 through 59 of ./tinyos-2.x/tos/chips/cc2420/CC2420.h the CC2420 header is specified: typedef nx_struct cc2420_header_t { nxle_uint8_t length; nxle_uint16_t fcf; // Frame Control (Field) nxle_uint8_t dsn; nxle_uint16_t destpan; // Destination PAN ID nxle_uint16_t dest; // Destination address nxle_uint16_t src; // Source address /** I-Frame 6LowPAN interoperability byte */ #ifdef CC2420_IFRAME_TYPE nxle_uint8_t network; // I-frame (interoperability frame) byte #endif nxle_uint8_t type; // Packet type } cc2420_header_t; Can someone please clarify for me what the length and dsn fields are? Is dsn Device Sequence Number? How is length used? Can the type field be anything? For example, if I wanted to add additional RF commands to the stack, could I make my own definitions using this type field to specify each, or is it a static field? Where is the maximum payload size specified? Is it TOSH_DATA_LENGTH (line 96 of CC2420.h)? Thanks, -Jim ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] 802.15.4 TinyOS Qs
A suggestion: Can someone with write access to the tree add some comments to this effect to the source code? eric On Fri, Sep 5, 2008 at 8:55 AM, David Moss <[EMAIL PROTECTED]> wrote: > Length = length of the header + payload of the packet, minus the size of > the length byte itself (1). This is what allows for variable length > packets. > > > > DSN = Data Sequence Number, a number incremented for each packet sent by a > particular node. This is used in acknowledging that packet, and also > filtering out duplicate packets. > > > > Type = TinyOS AM type. When you create a new AMSenderC(AM_WHATEVER), the > AM_WHATEVER definition is the type of packet. > > > > TOSH_DATA_LENGTH defaults to 28, it represents the maximum size of the > payload portion of the packet, and is specified in the tos/types/message.h > file. > > > > All of these fields will be filled in automatically by the radio stack when > you attempt to send a message. > > > > -David > > > > > > > > > > *From:* [EMAIL PROTECTED] [mailto: > [EMAIL PROTECTED] *On Behalf Of *Jim Fell > *Sent:* Friday, September 05, 2008 8:45 AM > *To:* tinyos-help@millennium.berkeley.edu > *Cc:* Jim Fell > *Subject:* [Tinyos-help] 802.15.4 TinyOS Qs > > > > Hello. On lines 45 through 59 of …/tinyos-2.x/tos/chips/cc2420/CC2420.h > the CC2420 header is specified: > > > > typedef nx_struct cc2420_header_t { > > nxle_uint8_t length; > > nxle_uint16_t fcf; // Frame Control (Field) > > nxle_uint8_t dsn; > > nxle_uint16_t destpan; // Destination PAN ID > > nxle_uint16_t dest; // Destination address > > nxle_uint16_t src; // Source address > > > > /** I-Frame 6LowPAN interoperability byte */ > > #ifdef CC2420_IFRAME_TYPE > > nxle_uint8_t network; // I-frame (interoperability frame) byte > > #endif > > > > nxle_uint8_t type; // Packet type > > } cc2420_header_t; > > > > Can someone please clarify for me what the length and dsn fields are? Is > dsn Device Sequence Number? How is length used? > > > > Can the type field be anything? For example, if I wanted to add additional > RF commands to the stack, could I make my own definitions using this type > field to specify each, or is it a static field? > > > > Where is the maximum payload size specified? Is it TOSH_DATA_LENGTH (line > 96 of CC2420.h)? > > > > Thanks, > > > > -Jim > > > > ___ > Tinyos-help mailing list > Tinyos-help@millennium.berkeley.edu > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > -- Eric B. Decker Senior (over 50 :-) Researcher Autonomous Systems Lab Jack Baskin School of Engineering UCSC ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] 802.15.4 TinyOS Qs
On Sep 5, 2008, at 12:56 PM, Eric Decker wrote: > A suggestion: > > Can someone with write access to the tree add some comments to this > effect to the source code? > > eric > > > On Fri, Sep 5, 2008 at 8:55 AM, David Moss <[EMAIL PROTECTED]> wrote: > Length = length of the header + payload of the packet, minus the > size of the length byte itself (1). This is what allows for > variable length packets. > Well, this is the 802.15.4 specification, so... Phil ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help