Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[kura-dev] Bluetooth API - scanning for devices with EIR data

Hi,
   I was playing around with BLE and kura recently as a main part of my Open IoT Challenge.
One of the devices I'm using is SensorPuck by Silicon Labs. It contains set of sensors and Bluetooth low energy chip. Sensor data are published in advertisement packed (EXTENDED INQUIRY RESPONSE DATA). This approach is similar to iBeacons.
Advertisement packed format is manufacture specific.

Pull request 92 [1] by Lee Marshall introduces startBeaconScan method, BluetoothBeaconScanListener and BluetoothBeaconData. 
Unfortunately it is very "iBeacon" specific.

I've extended this functionality for my purpose (SensorPuck advertisement data) which is on my forked repository [2] (It is work in progress just for prototype).

I'd like to initiate discussion about scanning for bluetooth devices API in kura.

In my opinion, the best approach will be to have startLeScan method with attribute that will specify behavior of the scan proces. Whether it is plain scanning for devices or  with gathering advertisement data. "onScanResults" method in BluetoothLeScanListener will contain additional attribute with advertisement data. Either byte array or some specific object structure (according to Bluetooth EIR spec).

IMHO processing/parsing of this data should be in separate module. 

In my prototype work I've added new method startAdvertisingScan(BluetoothLeAdvertisingScanListener listener)  and advertisement data are provided in BluetoothLeAdvertisingScanData class. This is other approach.

What do you think? How should scan for bluetooth devices API in kura should look like?

I'm wiling to work on this topic and contribute my work.

Best Regards,
Tobiasz Dworak

[1] https://github.com/eclipse/kura/pull/92
[2] https://github.com/tobidi/kura/commit/24686f48718914ad0c855dca0184a75477ad4b17



Back to the top