I think you may also be able to use BlueZ's DBus RSSI property of the 1 interface : int16 RSSI (You have the code for that command at ). $ sudo btmgmt conn-info -t 2 E4:0C:E6:59:B6:FCĬonnection Information for E4:0C:E6:59:B6:FC (LE Random) Note that when using btmon you do not have to connect to get the rssi of a BLE device.įor connected devices you can use btmgmt conn-infoĮ.g. The results displayed on the monitor should be similar to this: > HCI Event: LE Meta Event (0x3e) plen 12Įvent type: Scan response - SCAN_RSP (0x04) Run btmon in the background then scan for Bluetooth Low Energy devices: #./btmon & static void cmd_rssi(int dev_id, int argc, char **argv)įor Bluetooth Low Energy, I only know one way to do this, and that is using the #btmon command. If you want to see the actual C code to achieve this, take a look at the bluez tools/hcitool.c file, under the cmd_rssi function. If you want to achieve this from the command line, try: #hcitool rssi AA:BB:CC:DD:EE:FF However, you have to be connected to get the rssi of a device. On Linux, the way to do this is with the hcitool command.
0 Comments
Leave a Reply. |