# Opportunistic Sensor Data Collection with Bluetooth Low Energy
## 3 Using Bluetooth Low Energy for Opportunistic Sensor Data Collection
### Approaches for Opportunistic Sensor Data Collection with Bluetooth Low Energy  
In this paper we consider OSDC, where a mobile entity falls in the coverage range of the BLE-enabled sensor node (and vice versa) during a certain contact time. We assume that the sensor node has accumulated data from sensor readings taken over a certain period, and when a contact takes place, the mobile entity collects (a subset of) the accumulated data from the sensor node. Figure 1 illustrates two examples of the described OSDC paradigm, where a bus or a pedestrian carrying a BLE device (e.g., a smartphone) play the mobile entity role. Considering the functionality offered by BLE, we identify two main approaches for OSDC with BLE: advertisement-based and connection-based. The first one relies on the use of the sensor node as an advertiser. In this case, the advertisements sent by the sensor node are used as a channel for transporting information. If the size of the data object to be transmitted exceeds the payload of an advertising packet, we assume that the object is fragmented in units that fit the maximum advertising packet payload size. The sensor node sequentially transmits the different fragments, and after the last one, it starts transmitting again the same sequence of fragments. The specific details of how such a mechanism would work are out of the scope of this paper, since our aim is to determine the capacity and limits of OSDC with BLE. If the data object to be transmitted by the sensor node fits a single advertising packet, the sensor node continuously transmits that object in its advertising packets. The mobile entity listens for the advertising packets sent by the sensor node. The former will be able to receive the advertising packets sent during the contact time. The sensor node may send from one to three advertising packets in each advertising event (Figure 2a,b, respectively). In the second  
Figure 1: Illustration of OSDC concept examples, where the mobile entity is a bus (**Left**) or a pedestrian (**Right**). The mobile entity is equipped with a BLE device and collects data from the sensor node during the contact time. case, the same advertising packet is sent via the three advertising channels in each advertising event. While this option provides greater frequency diversity, it leads to greater energy consumption by the sensor node. Further details on the procedures and modeling of the advertisement-based approach can be found in Section 4.1. The second approach for opportunistic sensor node data collection is based on the establishment of a connection between the sensor node and the mobile entity, as soon as the contact between both takes place (Figure 2c,d). In this approach, the sensor node by default transmits advertising packets to announce that it is a connectable device. Advertising packets in this approach do not carry user data, and thus have a shorter size than the ones used in the advertisement-based approach, as illustrated in Figure 2. As in the advertisement-based approach, between one and three advertising packets can be sent in each advertising event (Figure 2c,d, respectively), and the sensor node consumes a greater amount of energy with the last option. When the mobile entity receives one of the advertising packets, it initiates connection establishment by sending a Connection Request to the sensor node. Once the connection is established, the sensor node transmits the accumulated data to the mobile entity. Once the two endpoints fall out of each other's range, and after the supervision timer of the sensor node triggers connection failure detection, the sensor node returns to sending advertising packets to announce its connectability. Further details on the procedures and modeling of the connection-based approach can be found in Section 4.2. Figure 2: Illustration of the two main OSDC approaches with BLE, for the two different advertisement settings in each one.