In the section that follows, I will be focusing on the core principals of BLE technology. This segment also explains the main function of each layer in the protocol stack.
BLE’s protocol stack has many layers which defines the network and each of them plays a significant role in making a device function properly. These layers are classified under the BLE protocol stack’s two main components, the host and the controller.The controller consists of the physical layer, the link layer and the host controller interface.
The physical layer contains analog communications circuitry used for converting analog signals into digital signals. BLE operates in the 2.4 GHz Industrial Scientific Medical (ISM) band and can communicate with a wide spectrum of 40 Radio Frequency (from here on out, “RF”) channels and each channel’s bandwidth is 2MHz. Three of these channels are advertising channels and 37 of the channels are data channels. The advertising channels are used when the device wants to broadcast its existence and availability for pairing while the data channels are used for transmitting data between the device with another device. To minimalize the possibility of any radio interference, BLE adopts a technique called frequency hopping spread spectrum. This technique allows selection of any one of the 37 available data channels at a specific time interval where the value of the hop is communicated with the connection is established, this ensures that the data channel is different for every newly established connection.1
The link layer directly interfaces with the physical layer. It contains five states which are standby state for devices which are on an idle, advertising state which a device is sending advertising packets, scanning state where a device is scanning for advertising packets, initiating state for devices that are looking for another device to connect and hence, are listening for advertising packets and connection state which includes two sub-states, the master and the slave. In BLE, information is exchanged via packets. There are two kinds of packets the advertising packet and the data packets. The advertising packets which devices use to locate and pair with other BLE devices or broadcast its signal to neighbouring BLE devices. As BLE contains 40 channels, the channels 37, 38 and 39 are used for advertising packets while channels between 0 and 36 are used for data packets. Both of these packets have a similar packet structure split into 6 blocks, the preamble, access address, header, length, data and Cyclic Redundancy Check (CRC). The preamble is an eight-bit value used for synchronization and timing estimation at the receiver. It will always be 0xAA for broadcasted packets. The access address which is a 32-bit value, is also fixed for broadcasting packets, set to 0x8E89BED6
1 Bluetooth Low Energy – Part 1: Introduction To BLE. (n.d.). Retrieved January 25, 2018, from https://www.mikroe.com/blog/bluetooth-low-energy-part-1-introduction-ble