Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » How to get advertisement data via new "BluetoothLeAdapter"(can not find any api like "startAdvertisementScan")
How to get advertisement data via new "BluetoothLeAdapter" [message #1782822] Fri, 02 March 2018 06:48 Go to next message
z b is currently offline z bFriend
Messages: 2
Registered: March 2018
Junior Member
I am using "org.eclipse.kura.bluetooth.le.BluetoothLeAdapter", not "org.eclipse.kura.bluetooth.BluetoothAdapter".

because "org.eclipse.kura.bluetooth.BluetoothAdapter" may not work in future.

I use "this.bluetoothLeAdapter.findDevices(10)", but how to get boradcast data???
Re: How to get advertisement data via new "BluetoothLeAdapter" [message #1783407 is a reply to message #1782822] Mon, 12 March 2018 16:49 Go to previous messageGo to next message
Pierantonio Merlino is currently offline Pierantonio MerlinoFriend
Messages: 38
Registered: March 2016

please take a look here [1] for an example using the new BLE APIs.

In few words, the bluetoothLeAdapter.findDevices(timeout) performs a discovery for near devices returns a Future object. The future.get() method will return a List of BluetoothLeDeviceS. Here is a snippet:

Future<List<BluetoothLeDevice>> future = this.bluetoothLeAdapter.findDevices(this.options.getScantime());
try {
} catch (InterruptedException | ExecutionException e) {
logger.error("Scan for devices failed", e);

You can also pass a Consumer class to the find method to be notified when a devices is detected. Please take a look on the APIs [2] and their implementation [3].




Re: How to get advertisement data via new "BluetoothLeAdapter" [message #1797469 is a reply to message #1783407] Wed, 31 October 2018 10:28 Go to previous message
jonny jain is currently offline jonny jainFriend
Messages: 2
Registered: October 2018
Junior Member
Thanks for giving this useful article about Bluetooth smart technology. I have also used my Dell laptop to connect with Different Bluetooth devices it can be a nice laptop but after update driver, I got a Bluetooth error message and I am unable to connect my Dell printer with my laptop for best technical I can visit Dell Bluetooth Driver for the instant help.
Previous Topic:Can this portable Java Device I/O library be of any assistance?
Next Topic:Remote deployment of dp file
Goto Forum:

Current Time: Thu Apr 25 05:52:41 GMT 2019

Powered by FUDForum. Page generated in 0.02784 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top