tinyb icon indicating copy to clipboard operation
tinyb copied to clipboard

DeviceManager.getDevices returns not only BLE devices

Open vkolotov opened this issue 7 years ago • 2 comments

Hi there, you have been doing a great job guys, keep up!

Just noticed that TinyB actually discovers all devices, including those that do not support BLE (or just do not have any services), e.g. BluetoothManager.getBluetoothManager().getDevices() returns ALL devices in range.

How do I filter out devices that do not support BLE?

The reason why is that when I call "connect" method on a device instance that does not support BLE, it fails with an error (depends on device type).

Thanks, Vlad

vkolotov avatar Dec 30 '16 10:12 vkolotov

Just noticed that BluetoothDevice.getBluetoothClass returns "0" for BLE enabled devices, and non "0" value for other devices. Is this a right way to identify BLE devices? Thanks.

vkolotov avatar Dec 30 '16 10:12 vkolotov

Hi, I have the same question... @vkolotov Did you find an answer on your question?

Thanks in advance

Be1thaz0r avatar Mar 31 '17 14:03 Be1thaz0r