Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux Bluetooth l2ping with signal strength (without connecting?)

For any Linux BlueZ/BT experts here:

I'm looking for a way to "ping" known BT devices (known BDADDR) and if they are in range I'd like to know the approximate signal strength.

I know that I could first run l2ping, then establish a connection to the device and finally check the rssi or link quality if the connection worked without pairing first.

However what I'm looking for is a way of getting the signal strength without connecting to the device first. Perfect would be a signal strength measurement from the l2ping reply packet, but I don't know if that info is available at all and passed along the stack.

like image 799
Tom Avatar asked Oct 02 '11 19:10

Tom


1 Answers

You can obtain RSSI during inquiry scan, without connecting to devices. Here's an example using pybluez. You could also do the same thing directly from C using Bluez on linux.

inquiry-with-rssi.py

like image 105
TJD Avatar answered Nov 15 '22 05:11

TJD