4

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.

Cœur
  • 37,241
  • 25
  • 195
  • 267
mani
  • 1,012
  • 7
  • 26
  • 47

2 Answers2

5

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:

aioobe
  • 413,195
  • 112
  • 811
  • 826
-1

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;   }      
 }
Verbeia
  • 4,400
  • 2
  • 23
  • 44
Mansor
  • 11
  • 1
  • 3
  • 1
    This method takes the rssi is an argument, and thus does not answer how to *get hold of it*. – aioobe Sep 13 '11 at 11:51