# Self-Configuring IoT Service QoS Guarantee Using QBAIoT
## 2 State of the Art
### IEEE 802.15.4
#### 2.2.1 IEEE 802.15.4 Specification  
IEEE 802.15.4 is a low-rate wireless personal area network (LR-WPAN) standard defining the physical PHY and MAC layers. PHY and MAC layers specify essential parameters such as data rate, control functions, data management format, and usage of slotted CSMA/CA access method. It provides also other management features like access to medium, synchronization, etc. [14]. Standards and technologies based on IEEE 802.15.4 use its PHY and MAC layers and add their specificities through higher layers. IEEE 802.15.4 specifies six different access methods in its last version [14]: the unslotted CSMA/CA in non-beacon enabled PAN, the slotted CSMA/CA in beacon enabled PAN, time slotted channel hopping clear channel assessment (TSCH CCA) in non-shared slots, time slotted channel hopping CSMA/CA (TSCH CSMA/CA) in shared slots, CSMA/CA with priority channel access (PCA) and low-energy critical infrastructure monitoring (LECIM) ALOHA with PCA. In what follows, we briefly describe these different access methods except the slotted CSMA/CA beacon-enabled mode that is described meticulously, as it is the basis of our contribution. In the unslotted CSMA/CA in non-beacon enabled PAN, the access method corresponds to the CSMA/CA traditional method. The device tests the availability of the channel before trying to send the data. Whereas, in the slotted CSMA/CA beacon-enabled mode, a specific virtual frame structure (called'superframe') is used. The superframe consists of an active part known as the superframe duration (SD) divided into 16 time-periods known as slots and an optional inactive period. The slots form a contention access period (CAP) and an optional contention free period (CFP). During the CAP, nodes should compete to gain access to the shared channel, whereas, during the CFP, objects are allocated guaranteed time slots (GTS). At each beacon interval (BI) corresponding to the end of a superframe, the coordinator sends a beacon frame to all its corresponding nodes in the WPAN. The beacon allows the coordinator to identify its WPAN nodes, to synchronize the nodes and to communicate different superframe configuration values like the beacon order (BO) and the superframe order (SO). BO and SO are used to compute the BI and the SD according to Equations (1) and (2) respectively. Base superframe duration (BSFD) is the minimum duration of a superframe, corresponding to a SO value of 0. It is fixed to 960 symbols of 4 bits each. Furthermore, BO and SO should respect the inequality \(0\leq\text{SO}\leq\text{BO}\leq 14\)[14]. \[\text{BI}=\text{BSFD}\times 2^{\text{BO}}, \tag{1}\]  
\[\text{SD}=\text{BSFD}\times 2^{\text{SO}}. \tag{2}\]  
The TSCH CCA mode uses enhanced beacon frames that contains the TSCH synchronization information, the channel hopping information, the TSCH timeslot information, the TSCH slotframe and the link information. Collision avoidance using CCA is ineffective in TSCH PAN. In fact, the devices operating in TSCH mode use channel hopping, which eliminates the usage of backoff periods. When a TSCH device has a packet to transmit, it shall wait for a link to the destination device. If TSCH CCA was set to ON, the MAC layer requests the PHY layer to perform a CCA at the designated time in the timeslot without back off delays in order to send the data. As for the TSCH CSMA/CA mode, it is used in case of shared links. The shared links are assigned to multiple devices that can lead to collisions and retransmissions. To reduce the probability of multiple retransmissions for the same packet, a retransmission backoff algorithm is used in this mode. Furthermore, the CSMA/CA with PCA mode is used before transmitting the critical event message during the CAP. In this mode, the MAC sublayer ensures that the remaining CSMA/CA operations can be undertaken and the transmission can beachieved before the end of the CAP. The PCA corresponds to the back off algorithm to be in use in this case. Finally, the last mode known as the LECIM ALOHA PCA is used when the CCA mode is set to four.