How to get the signal strength indicator (RSSI) of a Bluetooth device?

I want to recognize a Bluetooth device in my range of Bluetooth devices, which means that I want to receive a specific received signal strength indicator (RSSI).

Is there any Java API for receiving RSSI of a specific device?

If such exist, provide information on this Java API.

+4
source share
2 answers

Here is a list of the BlueTooth Java APIs on Wikipedia article: Java API for BlueTooth .

I am sure that most of them have the ability to read RSSI.


I looked at the bluecove.org API and found this:

+5
source

I found this code, but I don’t know how to get the values, maybe there is a class that needs to be imported: please check and let me know.

 public static int calculateSignalLevel(int rssi, int numLevels) { if (rssi <= MIN_RSSI) {return 0;} else if (rssi >= MAX_RSSI) { return numLevels - 1; } else { int partitionSize = (MAX_RSSI - MIN_RSSI) / (numLevels - 1); return (rssi - MIN_RSSI) / partitionSize; } } 
-1
source

All Articles