mani
mani

Reputation: 1044

How to get Received Signal Strength Indicator (RSSI) of a bluetooth device?

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

Answers (2)

Mansor
Mansor

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

aioobe
aioobe

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

Related Questions