Figure 8.1 shows the protocol stack for IEEE 802.15.4 1, also known as Low-Rate Wireless Personal Area Networks (LR-WPAN), and IEEE 802.2 LLC. Upper Layers 802.2 LLC SSCS MAC PHY Physical Medium Figure 8.1: Protocol stack 802.15.4 Figure 8.2 depicts the frame structure for data in 802.15.4. Figure 8.2: 802.15.4 Data Frame The PHY shown in Fig. 8.3 provides an interface between the MAC sublayer and the physical radio channel, via the RF firmware and RF hardware. The PHY conceptually includes a management entity called the PLME. This entity provides the layer management service interfaces through which layer management functions may be invoked. The PLME is also responsible for maintaining a database of managed objects pertaining to the PHY. This database is referred to as the PHY PAN information base (PIB). The PHY provides two services, accessed through two SAPs: the PHY data service, accessed through the PHY data SAP (PD-SAP), and the PHY management service, accessed through the PLME s SAP (PLME-SAP). 1 The according standard is available at http://standards.ieee.org/getieee802/download/802.15.4-2003.pdf. Prof. Dr. C. Görg et al. Tutorial Communication Networks I WS 2012/13 1
The service primitives in 802.15.4 follow the ISO/OSI reference model s service primitives as shown in Fig. 8.4. The PD-SAP supports the transport of MPDUs between peer MAC sublayer entities. The primitives supported by the PD-SAP are: PD-DATA.request PD-DATA.confirm PD-DATA.indication The semantics of the PD-DATA.request primitive is as follows: PD-DATA.request(psduLength, psdu) The MAC sublayer of 802.15.4 is depicted in Fig. 8.5. The semantics of the MCPS-DATA.request primitive is as follows: MCPS-DATA.request(SrcAddrMode, SrcPANId, SrcAddr, DstAddrMode, DstPANId, DstAddr, msdulength, msdu, msduhandle, TxOptions) The semantics of the MA-UNITDATA.request primitive in the SSCS is as follows: MA-UNITDATA.request(SrcAddr, DstAddr, RoutingInformation, data, priority, ServiceClass) The primitives associated with unacknowledged connectionless-mode data transfer in 802.2 LLC are as follows: DL-UNITDATA request DL-UNITDATA indication The DL-UNITDATA request primitive is passed to the LLC sublayer to request that an LSDU be sent using unacknowledged connectionless-mode procedures. The DL-UNITDATA indication primitive is passed from the LLC sublayer to indicate the arrival of an LSDU. The primitives associated with connection establishment are as follows: DL-CONNECT request DL-CONNECT indication DL-CONNECT response DL-CONNECT confirm The DL-CONNECT request primitive is passed to the LLC sublayer to request that a data link connection be established between a local LSAP and a remote LSAP. The DL- CONNECT indication primitive is passed from the LLC sublayer to indicate the request by a remote entity to establish a connection to a local LSAP. The DL-CONNECT response Prof. Dr. C. Görg et al. Tutorial Communication Networks I WS 2012/13 2
Figure 8.3: 802.15.4 PHY Figure 8.4: Service Primitives Figure 8.5: 802.15.4 MAC Prof. Dr. C. Görg et al. Tutorial Communication Networks I WS 2012/13 3
primitive is passed to the LLC sublayer to signal acceptance of a connection. The DL- CONNECT confirm primitive is passed from the LLC sublayer to convey the results of the previous associated DL-CONNECT request primitive. The primitive associated with connection-mode data transfer are as follows: DL-DATA request DL-DATA indication The DL-DATA request primitive is passed to the LLC sublayer to request that an LSDU be sent using connection-mode procedures. The DL-DATA indication primitive is passed from the LLC sublayer to indicate the arrival of an LSDU. The semantics of the DL-DATA.request primitive is as follows: DL-DATA.request (source_address, destination_address, data) The primitives associated with connection termination are as follows: DL-DISCONNECT request DL-DISCONNECT indication The DL-DISCONNECT request primitive is passed to the LLC sublayer to request the immediate termination of a data link connection. The DL-DISCONNECT indication primitive is passed from the LLC sublayer to indicate to the network that a connection has been terminated. 1. Name the protocols that are in use when browsing the web over 802.15.4! 2. Under which circumstances could a WLAN (802.11b/g) user communicate with another user on 802.15.4? Name the respective network-related protocols! 3. Draw a Message Sequence Chart (MSC) for connection-oriented data transfer. 4. The payload length n needs to be less or equal to amaxmacframesize. amax- MACFrameSize is defined in the standard as amaxphypacketsize amaxframeoverhead. Look up amaxphypacketsize and amaxframeoverhead up in the standard. What is the minimum and maximum percentage of overhead introduced by 802.15.4 MAC and PHY? For more insight on how protocols can be implemented, we attached a code example that provides the MCPS DATA interface in the NesC language, which is a C derivative for event-based programming in TinyOS. Figure 8.6 depicts the signal definition in the Specification and Description Language (SDL), which will be covered in the next exercise. The figure is part of the specification of 802.15.4 and can be found in Appendix D.4.3. interface MCPS_DATA { /** * Request a data transfer. * See page 57 of the IEEE 802.15.4 specification. * * @param SrcAddrMode The source addressing mode for this primitive and * subsequent MPDU * @param SrcPANId The 16 bit PAN identifier of the source * @param SrcAddr Individual device address of the source as per Prof. Dr. C. Görg et al. Tutorial Communication Networks I WS 2012/13 4
* the SrcAddrMode * @param DstAddrMode The destination addressing mode for this primitive * and subsequent MPDU * @param DstPANId The 16 bit PAN identifier of the destination * @param DstAddr Individual device address of the destination as per * the DstAddrMode * @param msdulength Number of octets contained in the msdu * @param msdu Set of octets forming the msdu * @param msduhandle Handle associated with the MSDU to be transmitted * @param TxOptions Bitwised OR transmission options */ command void request ( uint8_t SrcAddrMode, uint16_t SrcPANId, uint8_t* SrcAddr, uint8_t DstAddrMode, uint16_t DstPANId, uint8_t* DstAddr, uint8_t msdulength, uint8_t* msdu, uint8_t msduhandle, uint8_t TxOptions ); /** * Confirm reports the results of a request to transfer a data MSDU. * See page 59 of the IEEE 802.15.4 specification. * * @param msduhandle The handle associated with the MSDU * @param status That status of the last MSDU transmission */ event void confirm ( uint8_t msduhandle, IEEE_status status ); /** * Indicates the transfer of a data unit from the MAC sublayer. * See page 60 of the IEEE 802.15.4 specification. * * @param SrcAddrMode The source addressing mode for this primitive and * subsequent MPDU * @param SrcPANId The 16 bit PAN identifier of the source * @param SrcAddr Individual device address of the source as per * the SrcAddrMode * @param DstAddrMode The destination addressing mode for this primitive * and subsequent MPDU * @param DstPANId The 16 bit PAN identifier of the destination * @param DstAddr Individual device address of the destination as per * the DstAddrMode Prof. Dr. C. Görg et al. Tutorial Communication Networks I WS 2012/13 5
} * @param msdulength Number of octets contained in the msdu * @param msdu Set of octets forming the msdu * @param mpdulinkquality LQ value measured during reception * @param SecurityUse An indication whether the received data frame is * using security * @param ACLEntry The macsecuritymode parameter value from the ACL entry * associated with the sender of the data frame. This value * is set to 0x08 if the sender of the data frame was not * found in the ACL. */ event void indication ( uint8_t SrcAddrMode, uint16_t SrcPANId, uint8_t* SrcAddr, uint8_t DstAddrMode, uint16_t DstPANId, uint8_t* DstAddr, uint8_t msdulength, uint8_t* msdu, uint8_t mpdulinkquality, bool SecurityUse, uint8_t ACLEntry ); Prof. Dr. C. Görg et al. Tutorial Communication Networks I WS 2012/13 6
Figure 8.6: SDL implementation example Prof. Dr. C. Görg et al. Tutorial Communication Networks I WS 2012/13 7