views:

598

answers:

2

Hi,

I have a question about bluetooth RSSI functionality on the Android (either 2.0 or 2.1):

It's easy enough to get the RSSI value when a bluetooth connection is created, but how can you repeatedly get the RSSI value of a connection that is already active? It's really important to be able to do this, because this lets you determine if bluetooth devices are close to each other or far away, but I can't find any appropriate function calls in the Android API.

Could someone who understands Android RSSI please help me with this problem?

Thanks!

Alex

+3  A: 

At the HCI level, there is a command to read a Bluetooth link RSSI from the Bluetooth chipset (Read_RSSI_Command). However its implementation can vary from Bluetooth chipset to Bluetooth chipset. And the value returned is not always useful, for example if there are no packets transmitted in the last few minutes, the Bluetooth chipset has no way to know the current RSSI.

So we don't expose this in any Android Java API at this time.

Nick Pelly Android Bluetooth Team

Nick Pelly
Hi Nick,Thank you *very much* for your reply; I definitely appreciate you taking the time to explain this. Although you don't expose the Read_RSSI_Command function in the Android Java API, is there nevertheless some way to access it on the Android? I am more than happy to write a big case statement with all of the different Bluetooth chipsets as the different cases.If this is not possible, then are you planning on including it in the API any time in the near future? This is very important functionality, so is there any way for us to formally request its inclusion?Thanks,Alex
Alex Hertel
A: 

Hi Nick, I hope you are still monitoring this thread. My application also needs to know the RSSI value of an active Bluetooth connection. It is critical for our intended use cases. Without it, we really have no way to make our app work on the Android.

When I Google "Read_RSSI_Command" or "Android HCI level", I don't find any links that give me enough details to know whether there is some round-about way in which we can still retrieve this value. For example, if the value is not exposed to Java, is it exposed to native code, and is there some way that we can go through native code to get it? I would be happy to try anything to get the value. There is just very little documentation out there about this.

We know that Bluetooth RSSI values are notoriously approximate on all phones. Still, other platforms expose the RSSI value and leave it up to the developer to realize the limitations of the hardware. We have a really cool application that makes use of RSSI values, even though they are somewhat inaccurate, in a way that increases their accuracy to the point where we can do really novel, cool things. We would love to have the opportunity to do those things on the Android.

Philipp