Original Question: Packet format for 6LoWPAN/AD6LoWPAN? by NagarjunaG
What is the standard packet format for AD6LoWPAN?
Verified Answer: RE: Packet format for 6LoWPAN/AD6LoWPAN? by NagarjunaG
AD6LoWPAN stack comprises of IPv6 and UDP modules at Network and Transport layers respectively and uses IEEE 802.15.4 MAC for carrying IPv6 packets.
When the application desires to transmit any UDP data, the payload is forwarded to the AD6LoWPAN stack. The stack then encapsulates the payload with a UDP header.
The UDP Header contains the following information:
Source Port (2 bytes)
This is an optional field, when meaningful; it indicates the port of the sending process.
Destination Port (2 bytes)
This field indicates the port the data is destined to.
Length (2 bytes)
Length in octets of this user datagram including this header and the data. (This means the minimum value of the length is eight.)
Checksum (2 bytes)
Check sum of the total packet including the data and the header.
The entire UDP packet is encapsulated by the IPv6 header, which will have the following information (refer RFC2460).
4-bit Internet Protocol version number = 6.
8-bit traffic class field.
20-bit flow label.
6-bit unsigned integer. Length of the IPv6 this IPv6 header, in octets
8-bit selector. Identifies the type of header immediately following the IPv6 header. Uses the same values as the IPv4 Protocol field.
8-bit unsigned integer. Decremented by 1 by each node that forwards the packet. The packet is discarded if Hop Limit is decremented to zero.
128-bit address of the originator of the packet.
128-bit address of the intended recipient of the packet (possibly not the ultimate recipient, if a Routing header is present)
Now the packet is sent to the 6LoWPAN layer where it will add its own header before passing it down to MAC layer. Refer RFC 4944 for information on 6LoWPAN header.
The MAC layer will add its header (MHR), which will contain the following fields:
Contains the information about the frame being transmitted
Sequence number of the outgoing packet. If the Frame control field indicates that the ACK is required for this packet, the receiver will transmit an ACK packet with the same sequence number as the received frame.
The PANId of the device to which the packet is destined to.
This field contains the address of MAC destination, the packet is destined for. AD6LoWPAN supports only extended addressing. But if the frame is a broadcast frame, this value is set to 0xFFFF.
The PANId of the device where the packet originated.
This field contains the MAC address of the source device. AD6LoWPAN supports only extended addressing.
Before handing the packet down to PHY to initiate the transmission, the MAC will add its MFR (MAC footer) which will have the checksum (CRC) of the packet.
Now the PHY will include its header (PHR) with the following fields and begin the date transmission.
The mode switch mechanism enables a device using the MR-FSK PHY to change its symbol rate and/or modulation scheme on a packet-by-packet basis. For AD6LoWPAN this bit is set to 0.
Indicates the size of FCS (CRC). A value 1 indicates that the frame will contain a 2 byte CRC. 0 indicates the frame will contain a 4-byte CRC.
Indicates whether the PN9 data whitening is applied on the outgoing frame.
Length (11 bits)
Total length of the PHY frame.
Question: RE: Packet format for 6LoWPAN/AD6LoWPAN? by ezadminThis question has been closed by the EZ team and is assumed answered.