How to get RSSI with BlueZ?

I am currently creating a small utility to search for my phone via Bluetooth and my computer. For this, I'm trying to get RSSI to estimate the distance between two devices. How can I get RSSI with Bluez in C / C ++?

Is there an hci command for this, and if so, is there a list of HCI commands?

Thanks.

+4
source share
3 answers

Is there any utility that may be useful to you. Try with bluetoothctl if you are not trying to install the entire bluez library.

You only need to run a scan, and it will give you rssi from all devices.

If you need to view the code. You also search in git code https://git.kernel.org/cgit/bluetooth/bluez.git/tree/

+1
source
0
source

You can make hcitool rssi, but you need to connect for this device. And if you are bluez, it provides the property of a changed signal for the rssi value, for this you can check the docs / device-api.txt file

0
source

All Articles