Bluetooth LE Signal Strength Linux
On Linux, the way to do this is with the hcitool command. However, you have to be connected to get the rssi of a device. If you want to achieve this from the command line, try:
#hcitool rssi AA:BB:CC:DD:EE:FF
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.
static void cmd_rssi(int dev_id, int argc, char **argv)
{
...
}
For Bluetooth Low Energy, I only know one way to do this, and that is using the #btmon command. Run btmon in the background then scan for Bluetooth Low Energy devices:
#./btmon &
# hcitool lescan
The results displayed on the monitor should be similar to this:
> HCI Event: LE Meta Event (0x3e) plen 12
LE Advertising Report (0x02)
Num reports: 1
Event type: Scan response - SCAN_RSP (0x04)
Address type: Public (0x00)
Address: AA:BB:CC:DD:EE:FF (<Vendor Name>)
Data length: 0
***RSSI: -34 dBm (0xde)***
AA:BB:CC:DD:EE:FF <Device Name>
Note that when using btmon you do not have to connect to get the rssi of a BLE device.
Linux Bluetooth l2ping with signal strength (without connecting?)
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
Related Topics
How Would One Disable Nagle's Algorithm in Linux
Error on Execution -Version 'Qt_5' Not Found Required By
Ioctl VS Netlink VS Memmap to Communicate Between Kernel Space and User Space
How to Read Single Character Input from Keyboard Using Nasm (Assembly) Under Ubuntu
Memory Limit to a 32-Bit Process Running on a 64-Bit Linux Os
Limiting Memory Usage in R Under Linux
Number of Executed Instructions Different for Hello World Program Nasm Assembly and C
How to Export the Variable Through Script File
How to Copy the Output of a Command Directly into My Clipboard
How to Search Contents of Multiple PDF Files
What Is the Linux Equivalent to Dos Pause
How to Create a Link to a Directory
How to Check If Smtp Is Working from Commandline (Linux)
Compare Integer in Bash, Unary Operator Expected
Linux: Compute a Single Hash for a Given Folder & Contents
Unix: How to Delete Files Listed in a File
How to Count Lines of Code Including Sub-Directories
Does Gcc Have Any Options to Add Version Info in Elf Binary File