# Cross-Layer MAC/Routing Protocol for Reliability Improvement of the Internet of Things
## 2 Background  
### Overview of the IEEE 802.15.4 Standard  
The superframe structure of the IEEE 802.15.4 standard is shown in Figure 2. Superframes are divided into active and inactive sections. In addition, the active section consists of 16 slots, of which the beacon, which serves to synchronize nodes, is transmitted in the first time slot. It has a structure that can adjust the active and inactive parts by adjusting the beacon interval (BI) and the superframe duration (SD).  
IEEE 802.15.4 MAC defines two access control methods--that is, competition-based unslotted CSMA/CA methods and hybrid-based beacon-enabled modes, which include slotted CSMA/CA and guaranteed time slot (GTS) allocation methods. When attempting to transmit a packet using the slotted CSMA/CA method, each node initializes four parameters--that is, the number of backoffs (NB) in the MAC layer, competing window length (CW), backoff exposure (BE), and retransmission number (RT).  
The MAC layer generates a random number between units [0, 2B-1], and waits until the generated backoff time ends. When the backoff time is over, the node monitors the channel state through clear channel assessment (CCA). If the CCA is idle, the node starts sending packets, and if the channel state becomes busy and the CCA fails, the MAC increases the NB and BE by one to the maximum values of _macMaxCSMABackoffs_ and _macMaxBE_. If the BE value reaches _macMaxBE_, the maximum value is maintained until reset. If the NB value is greater than _macMaxCSMABackoffs_, the packet is discarded as a channel access failure. If not, the CSMA/CA algorithm uses a random number related to the backoff and repeats the process. If a node's channel access is successful, it waits to transmit a  
Figure 2: The superframe structure of the IEEE 802.15.4 standard.  
packet and receives an ACK message. When the ACK corresponding to the transmitted packet is received, it can be considered that the packet has been successfully transmitted. If a packet is not received during a packet collision or ACK timeout, the RT variable increases one by one to the maximum value of _macMaxFrameRetries_. If the RT value is less than _macMaxFrameRetries_, the MAC initializes BE = _macMinBE_ and repeats the CSMA/CA for channel reaccess.  
IEEE 802.15.4 can use either 16-bit or 64-bit MAC addresses, mainly using a 16-bit short address system with low overhead, for identifying nodes within a wireless sensor network. The 64-bit extended unique identifier (EUI) provides a unique address system for sensor nodes. The advantage of the 16-bit short address is that it has less overhead when compressing the header. However, because it is not an address uniquely assigned to the sensor node, address duplication may occur, and the address may change due to link changes or network movement of the node. That is, network management is difficult by making individual discrimination and access of sensor nodes impossible in a wireless sensor network. The 64-bit EUI address allocation has a unique ID, and the address of the sensor node is maintained even when the link changes and moves, but the 64-bit address is used for header compression even in simple communication between sensors, so the overhead is larger than that of short address. In addition, EUI-based address generation does not provide a hierarchical concept address that can be used for hierarchical tree routing, which can be performed with low power-low memory resources. Therefore, it is necessary for the reliable and stable operation of wireless sensor networks to save limited resources of wireless sensor networks by reducing header size while maintaining existing addresses even when changing or moving links.