Skip to main content

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

Hi,
  thank you for your contribution to Kura.

We accepted the pull request 92 by Lee Marshall about Beacon scanning. Moreover, there is a beacon_scanner example under /examples folder that searches for iBeacons and extracts information from the advertising packet (minor, major, uuid, txPower and rssi).

Of course, this is a scanner specific for iBeacons and doesn’t search for custom advertising packet.
But this functionality can be very interesting.

IMHO, we can use three scan procedures: one for plain scanning for devices, one for iBeacons and one for custom advertising packets, as you did in your application.
With the first two procedures, we have a listener specific for plain scanning and iBeacons (BluetoothLeScanListener and BluetoothBeaconScanListener), while for custom scanning we have a “generic” listener that parse in some way the packet.

I agree with you that the data parsing should be implemented in a separate module.

Best,
Pier

Begin forwarded message:

From: "Maiero, Matteo" <matteo.maiero@xxxxxxxxxxxx>
Subject: Fwd: [kura-dev] Bluetooth API - scanning for devices with EIR data
Date: 23 Feb 2016 13:40:08 CET
To: "Merlino, Pierantonio" <Pierantonio.Merlino@xxxxxxxxxxxx>



Inizio messaggio inoltrato:

Da: Tobiasz Dworak <tobiasz.dworak@xxxxxxxxx>
Oggetto: [kura-dev] Bluetooth API - scanning for devices with EIR data
Data: 23 febbraio 2016 10:58:07 CET
Rispondi a: Kura Developers mailing list <kura-dev@xxxxxxxxxxx>

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



_______________________________________________
kura-dev mailing list
kura-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/kura-dev



Back to the top