# Opportunistic Sensor Data Collection with Bluetooth Low Energy
## 4 Modeling the Performance of Bluetooth Low Energy for Opportunistic Sensor Data Collection
### Connection-Based Approach  
#### 4.2.1 Sensor Node Current Consumption  
We next model the average current consumption of a sensor node in the connection-based approach, on the basis of the current consumption profile of the BLE121 LR platform. In this approach, the BLE sensor node operates by default as an advertiser that announces its connectability. Therefore, the sensor node has to stay for a while in receive mode, after the transmission of each advertising packet, for possible incoming Connection Request messages. Figure 6 illustrates the current consumption profile of an advertising event corresponding to a BLE121 LR platform for the connection-based approach, that is, as a connectable advertiser. The size of the advertisement packets for the connection-based approach is 23 bytes. The additional states of the connectable advertiser, their description, and the variables used to define their duration and current consumption, are shown in Table 2. The difference with the profile of the non-connectable advertiser shown in Figure 5 lies in States 8 and 9, where after the transmission of an advertisement, the device switches to reception during a short interval (State 8) and stays in reception mode (State 9) before transitioning into the radio off state (State 5) or before the next advertisement transmission (State 3). When the sensor node and the mobile entity are within range, a connection is established. We assume that the data exchange during the connection takes place until the end of the contact interval, with _comslaveLatency_ = 0, which provides an upper bound on both the current consumption of the sensor node, and the maximum amount of data that may be collected. Once the link between the sensor node and the mobile entity fails, the sensor node returns to advertising upon expiration of the connection supervision timeout. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**State Number**} & \multirow{2}{*}{**Description**} & \multicolumn{2}{c}{**Duration**} & \multicolumn{2}{c}{**Current Consumption**} \\ \cline{3-6}  & & **Variable** & **Value (ms)** & **Variable** & **Value (mA)** \\ \hline
3 & transmission & \(T_{tx}\) & 0.229 & \(I_{tx}\) & 41.046 \\
8 & transmit to receive & \(T_{tx,rx}\) & 0.106 & \(I_{tx,rx}\) & 24.952 \\
9 & reception & \(T_{rx}\) & 0.134 & \(I_{rx}\) & 29.106 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Definition of additional states and relevant variables for the advertiser in the connection-based approach. As the advertisement packet size is different from the one in the advertisement-based approach, details regarding advertisement transmission in the connection-based approach are provided in the table. In the measurements, the slow clock function offered by the BLE121 LR platform was disabled. Figure 6: Current consumption profile of an advertising event for the BLE121 LR platform, operating as a connectable advertiser. Single-advertisement (**Left**) and three-advertisement (**Right**) advertising events are shown. The average current consumption in the connection-based approach can be computed as follows:  
\[I_{avg\_conn}=\ \frac{(T_{intercontact}-T_{conn})\cdot I_{adv\_conn}+T_{conn} \cdot I_{conn}}{T_{intercontact}} \tag{7}\]  
where \(T_{conn}\) and \(I_{conn}\) denote the duration and average current consumption of the connection-related phase, respectively, \(I_{adv\_conn}\) is the average current consumption while the sensor node is advertising, and \(T_{intercontact}\) is the time between two consecutive contact events. Figure 7 shows an overview of the main variables and intervals involved in Equation (7). Among the variables in Equation (7), \(I_{adv\_conn}\) can be computed by using Equation (1), but replacing \(T_{act}\) and \(I_{act}\) by \(T_{act\_comadv}\) and \(I_{act\_comadv}\), respectively, which denote the duration and the current consumption of the active part of the advertising period.