weliem / blessed-bluez

BLE library using Java and Bluez
MIT License
76 stars 23 forks source link

Rssi Filter #4

Closed engineearemotetechnologiessl closed 2 years ago

engineearemotetechnologiessl commented 3 years ago

It seems that the library does not detect beacons with rssi lower than -80. Is there any way to change this configuration?

weliem commented 3 years ago

I did this because I got a lot of connection errors when connecting to peripherals with a very low rssi. But for scanning beacons that is indeed less relevant.

I will look into making this value configurable.

engineearemotetechnologiessl commented 3 years ago

Hello, I see that this issue has a pull request, but it hasn't had any change in a while, do you have any plan to resolve it?

weliem commented 3 years ago

The person submitting the PR doesn't seem to be responding to my comments. I think I will fix this myself then.

dobestler commented 2 years ago

Is there any progress on this issue?

weliem commented 2 years ago

Fixed in the latest release (0.40)

dobestler commented 2 years ago

Thanks.

I see a problem when setting rssi values smaller than a certain value around -130: central.setRssiThreshold((short) -120); -- THIS WORKS central.setRssiThreshold((short) -130); -- THIS DOES NOT WORK

17:48:15.017 [Central-queue] ERROR BluetoothCentralManager - command exception for central 17:48:15.018 [Central-queue] ERROR BluetoothCentralManager - Invalid arguments in method call

And no scan results are coming in either.

I have tried to set the min Value for the RSSI Filter. I think it would be better to give the option to setting the scan filters so that one could e.g. remove the RSSI Filter altogether.

weliem commented 2 years ago

Hmmm, sounds like Bluez is imposing some limits...have to dig into the Bluez source code I guess...

weliem commented 2 years ago

Ok, looked at the Bluez source code and the minimum you can set is -127.

Fixed in release 0.51