Android: Get Bluetooth RSSI value from specific BluetoothDevice

4.1k views Asked by At

I'm making an Android application in which I need to be able to know the RSSI value of a specific device continuously. I have no problem getting the RSSI while scanning for devices however this is too slow for what I need.

I was thinking it might be possible to get the RSSI of a specific instance of a BluetoothDevice but I really have no idea where to start, so I'm asking here.

Is this possible? And if it is, do you know how to do it?

Or if you know another way to get the proximity value from another specific devices then please tell me! :)

Thanks!!

1

There are 1 answers

3
Doug Koellmer On

If your use case allows you to connect to a device then it should be possible to get RSSI at a higher frequency than scanning. Once you connect to a device and get a BluetoothGatt object you can call BluetoothGatt#readRemoteRssi(). This results in a callback to BluetoothGattCallback#onReadRemoteRssi().