# Opportunistic Sensor Data Collection with Bluetooth Low Energy
## 4 Modeling the Performance of Bluetooth Low Energy for Opportunistic Sensor Data Collection
### Advertisement-Based Approach  
#### 4.1.1 Sensor Node Current Consumption and Lifetime  
Our first goal is modeling the average current consumption of a sensor node in the advertisement-based approach, denoted \(I_{avg\_adv}\). Computing the average current consumption of a device requires knowledge of the different states it traverses, and the duration and the current consumed in each state. With the aim to capture a realistic behavior in our model, and without loss of generality, we derive the model from measurements on a real BLE platform. The measurement setup is shown in Figure 3. Since we aim at exploring the capability limits of OSDC for BLE, we select the BLE121 LR platform from Bluegiga [28] as our reference platform for the model. This platform implements BLE as per the Bluetooth 4.0 specification, and provides a range of around half kilometer, which is longer than that of typical BLE modules. Note that performance of the selected platform in terms of current consumption is very similar to that of other BLE platforms [31; 32; 33; 34], although BLE121 LR exhibits a greater current consumption for transmit and receive states to achieve significantly longer range than typical BLE platforms. In this regard, using BLE121 LR for the study in this paper allows us to provide an upper bound in terms of maximum amount of collected data per contact interval, and a lower bound on the sensor node lifetime that can theoretically be achieved. Because the behavior of the BLE sensor node in the advertisement-based approach is periodic, we model its current consumption during one such period. Each period comprises one advertising event, and otherwise the device is in sleep mode. Time and current consumption measurement  
Figure 3: Experimental setup for current measurements of the BLE121 LR modules using an Agilent N333 power analyzer. The module at the left works as a slave that connects to the module at the right, which operates as a master. results provided in this section are obtained from 10 measurements for a period. We found negligible differences within each set of 10 measurements, and results are well aligned with the ones also provided by the manufacturer [28]. Figure 4 illustrates the current consumption profile of an advertising event corresponding to a BLE121 LR platform for the advertisement-based approach, that is, as a non-connectable advertiser. The different states, their description, and the variables used to define their duration and current consumption, are shown in Table 1. The sensor node is initially in sleep mode, typically consuming a current in the microampere order. When the advertising event starts, the device wakes up (State 1), the radio interface is prepared for activity (State 2), and then the device transmits an advertising packet with a total size of 47 bytes (State 3). If the device sends more than one advertising packet in the advertising event, then it changes the physical channel frequency (State 4), and performs the remaining advertising packet transmissions following the same approach as for the first advertising packet, with the exception that after the last transmission, the radio of the device is turned off (State 5) and finally a postprocessing interval (State 6) takes place before the device returns to sleep mode, in which the device will remain until the start of the subsequent advertising event. Note that in the advertising-based approach, the radio of the sensor node is never in receive mode. Let \(T_{act}\) and \(I_{act}\) be the duration and current consumption, respectively, of the active part (i.e., where the device is not in sleep mode) of the advertising interval (see Figure 5). Since the average duration of a period is equal to \(\mathit{advInterval}+E\{\mathit{advDelay}\}\), \(I_{\mathit{avg\_adv}}\) can be calculated as shown in Equation (1):  
\[I_{\mathit{avg\_adv}}=\frac{T_{act}\cdot I_{act}+T_{sleep}\cdot I_{sleep}}{ \mathit{advInterval}+E\{\mathit{advDelay}\}} \tag{1}\]