# Artificial Intelligence in Cybersecurity: A Review and a Case Study
## 6 Enhancing Security in Low-Rate Wireless Networks
### IEEE 802.15.4: A Protocol for Low-Rate Wireless Communication  
The IEEE 802.15.4 protocol, standardized by the IEEE 802.15 Working Group in 2003, are commonly employed in low-rate wireless personal area networks (WPANs). This protocol defines the PHY-MAC layer functionalities, enabling short-range and low-power wireless communication between devices.  
The PHY layer of IEEE 802.15.4 operates in various frequency bands. The 2450 MHz band is a popular choice in these network operations. In this band, the protocol offers a data rate of 2 Mbps using Offset Quadrature Phase-Shift Keying (O-QPSK) modulation. This band provides 16 communication channels. These channels are 5 MHz wide.  
An IEEE 802.15.4 packet structure within the 2450 MHz band typically begins with a preamble sequence (PRE) for channel identification, followed by a synchronization header (SYN) for frame delimitation, and a PHY header containing essential information about the packet. These control fields are succeeded by a variable-length payload carrying the actual data, limited to a maximum of 127 octets. Due to this limitation and the minimum size requirement of 1280 octets for an IPv6 packet, an adaptation layer called 6 LoWPAN is often used with IEEE 802.15.4 to enable communication within the IPv6 internet protocol suite.  
IEEE 802.15.4 networks can operate in two modes: beacon-enabled and beaconless (usually as unslotted). In beacon-enabled mode, a designated coordinator device is responsible for network synchronization. Devices within the network can be categorized as full-function devices (FFDs) or reduced function devices (RFDs). FFDs can act as either coordinators or network clients, while RFDs are limited to client functionality. The coordinator in a beacon-enabled mode transmits special frames called beacons to allocate time slots to client devices for data transmission. These beacons also contain network configuration information and facilitate time synchronization for channel access.  
In unslotted mode, devices are not required to adhere to a time-slotted approach. Instead, they rely on the Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) algorithm for channel access. The flowchart of unslotted CSMA/CA operation can be found in [29]. It begins with a transmission attempt, where initial values are set for parameters like the number of back-off attempts (NB) and the back-off exponent (BE). The device then waits for a random back-off period before checking the channel for idle state. If the channel is idle for a specific duration, the packet transmission proceeds. Upon successful reception, the destination device transmits an acknowledgment (ACK) message. However, noise in the channel can corrupt the transmitted data (packet or ACK). In such scenarios, the source device retransmits the packet up to a predefined maximum number of attempts. If the channel remains busy after multiple attempts, the access failure is reported to higher layers. A successful transmission is acknowledged within a specific time window (MacAckWait-Duration), after which the process is considered complete. The upper layers in the network protocol stack typically consist of a network layer for routing and a higher-level application layer specific to the device's function [29; 30].  
The IEEE 802.15.4 standard uses a matching technique to transmit data in wireless networks. Instead of standard data bits, it uses short sequences of pseudo-random noise (PN) codes (given in Table 2). These PN codes act like unique identifiers for each 4-bit chunk of data. By referencing this table that assigns a specific 32-chip PN code to each 4-bit symbol, the receiver can decipher the original data even with some interference. To achieve a balance between data rate and power consumption, the IEEE 802.15.4 protocol transmits these PN codes at 2 million chips per second (Mchip/s). Since each 32-chip sequence represents a 4-bit symbol, this translates to a data rate of 250 kilobits per second (kbps).