Reputation: 1044
I want to recognize bluetooth device with in my bluetooth device range that means i want to get particular device received signal strength indicator (RSSI).
Is any Java API for getting RSSI of a particular device?
If such exist, please give information about that Java API.
Upvotes: 4
Views: 6188
Reputation: 11
I found this code but I don't know how to get the values , maybe there is a class 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; }
}
Upvotes: -1
Reputation: 421340
There's a list of Java BlueTooth APIs at the Wikipedia Article: Java APIs for BlueTooth.
I'm sure most of them have facilities to read RSSI.
I had a look at bluecove.org's API for instance and found this:
Upvotes: 5