# Optimization of the AODV-Based Packet Forwarding Mechanism for BLE Mesh Networks
## 2 BLE Mesh Architecture and Message Routing Protocols
### BLE Mesh Architecture  
To describe various words and concepts used throughout the paper, a quick introduction to the BLE mesh layers is presented and shown in Figure 1:  
* Model layer: Models define operations based on use cases in the model layer. The Bluetooth mesh model specification or vendors specify these models. The models are identifiable by Bluetooth SIG and vendor-defined unique identifiers of 16 and 32 bit;
* Foundation layer: The states, messages, and models are defined in this layer that are needed to setup and maintain mesh networks in different contexts. The configuration client and server model and the health client and server model are the two types of models specified in the Bluetooth SIG specification;
* Access layer: The access layer specifies how the upper transport layer can be used by the upper layers. It is also responsible for defining the app's data structure and implementing encryption/decryption operations. Finally, before passing data to the upper layers, it ensures that the network and application keys in the incoming data are correct;
* Upper transport layer: This layer is in charge of application data encryption, decryption, and authentication, as well as keeping the secrecy of access messages. It also specifies the control messages that are used to coordinate the transport layer functions between nodes;
* Lower transport layer: This layer specifies how messages in the top layers are segmented and reassembled in the lower-layer protocol into units of data. It is also in charge of controlling segmentation and reassembly;
* Network layer: Data transfer addressing, formatting, encryption, and authentication are all handled by the network layer. This layer is also in charge of handling message forwarding and dropping decisions. The BLE mesh network layer, on the other hand, lacks a routing mechanism and relies on a flooding-based approach;
* Bearer layer: The message transmission mechanism is defined by the bearer layer. In the newest BLE 5 mesh requirements, there are two types of bearers available: advertising bearer and GATT bearer;
* Bluetooth core specifications: The Bluetooth core specifications' network stack supports the physical data transfer between the nodes/devices with the help of a layering architecture. The host, controller, and physical/radio layers are the three fundamental layers of the BLE network stack. The host layer, which sits just beneath the application layer, has many nonreal-time network and transport protocols that allow apps on different devices to communicate with one another. The Generic Access Profile (GAP), Generic Attribute Profile (GATT), Security Manager (SM), Attribute Protocol (ATT), and Logical Link Control and Adaptation Protocol (L2 CAP) are among the modules found in this layer. The BLE Link Layer (LL) protocols (low-level and real-time) are implemented by the controller layer. It performs packet reception, schedules transmissions, and ensures data delivery to the destination, in addition to handling control operations and physical layer interfaces via the Host Control Interface (HCI); The physical layer is in charge of wireless signal transmission. BLE uses the 2.4 GHz Industrial, Scientific, and Medical (ISM) frequency spectrum, with 40 narrowband channels (2 MHz bandwidth) divided into three Advertising Channels (AC) (Ch. 37-39) and 37 Data Channels (DC) (Ch. 0-36). Device detection, connection establishment, and the transmission of broadcast messages are all handled by the ACs. DCs, on the other hand, allow two-way data flow between linked devices and rely on Adaptive