# Performance Evaluation of Bluetooth Low Energy: A Systematic Review
## 2 BLE Functioning
### BLE Packet  
As described in Section 2.2, BLE allows two types of communication (i.e., _broadcasting_ and _connection_), which implies two different packet typologies, which share a common structure, as shown in Figure 9. This structure is divided into four mandatory subsections, defined in the LL BLE Specification [54; 58], and described as follows:  
* The _Preamble (PRE)_ length depends on the radio data rate, and it is equal to one or two bytes, respectively, if the connection works on LE 1M PHY or on LE 2M PHY, described in Section 2.1.1. It is a very simple sequence of bits used by the receiver to set its automatic gain control and determine the frequency corresponding to the radio data rate itself. Figure 8: Example of a _round-trip_ data communication in a _connection_ with the transmission of data packets and ACKs. In this figure are described all the _connection_ parameters. * The _Access Address (AA)_ is the group that includes the four following bytes and identifies the communication on a physical link, and it is used to exclude packets directed to different receivers. * The _Protocol Data Unit (PDU)_ range is from two to 257 bytes, and its length is strictly dependent on the type of communication used; it is described more in detail below. * The _CRC_ is a subsection of three bytes, which checks the presence of errors, analyzing the _PDU_ only, which could have been generated during packet transmission. A detailed analysis of error correction techniques, with a specific focus on BLE CRC, has been proposed in [60]. The _broadcasting_ channel PDU (shown in Figure 10) has a 16-bit header and a variable size payload, from zero to 255 bytes. The header contains four bits that indicate the PDU type, because there are several types of _broadcasting_ packets. The following bit is Reserved for Future Use (RFU), while the next three bits are referred to Channel Selection (ChSeI), Transmitter Address (TxAdd) and Receiver Address (RxAdd), and they are exploited depending on the PDU type used, described in detail in [58]. Finally, the last eight bits in the header indicate the length of the payload. Except for some specific task, the _broadcasting_ data packet is sent by the _advertiser_, and the payload is composed of six bytes of the _Advertiser_'s device Address (AdvA), which contains the _advertiser_'s public or random device address (depending on if TxAdd is equal to zero or one), and a maximum of 31 bytes of Advertising Data (AdvData), i.e., the effective payload. In case this payload is not sufficient for the specific application, the _scanner_ can request for another packet of 31 bytes maximum; this procedure is called active scanning [48; 54], and if used, it is declared in the PDU type. A detailed description and analysis of passive and active scanning and their performance is proposed in [61]. On the other side, a _connection_ packet (Figure 11) is composed of a two-byte header, which contains several parameters, described in detail in [58]: the Logical Link Identifier (LLID) (2 bits), the Next Expected Sequence Number (NESN) (1 bit), the Sequence Number (SN) (1 bit), More Data (MD) (1 bit), the RFU (3 bits) and the the payload Length (8 bits). In particular, the LLID value indicates if the PDU contains data or control messages. The maximum effective payload for data packets (ConnData) is 20 bytes, set by the BLE specification [52]. The limit of 20 bytes is not dependent on the LL, but it is a GATT layer specification, where it is defined that the Maximum Transmission Unit (MTU), for a packet sent between a _master_ and a _slave_, shall be lower than 23 bytes; then, excluding the two-byte header, the effective payload may be 20 bytes maximum [62]. Moreover, there is an optional Message Integrity Check (MIC) value of four bytes, which is used to authenticate the data PDU in an LL encrypted connection. Figure 10: PDU structure of an advertising packet. In (**a**) the first two bytes represent the Header, while the other bytes are the effective payload of the packet.