Bluetooth LE Signal Strength Linux

前端 未结 7 1899
谎友^
谎友^ 2020-12-05 00:50

Hello is there any way to get the signal strength of near by bluetooth le devises in linux? Or any good libraries for nodejs, php or mono (I do know some c++ or python but w

7条回答
  •  青春惊慌失措
    2020-12-05 01:39

    No need to connect when using btmgmt

    $ sudo btmgmt find
    
    Discovery started
    hci0 type 7 discovering on
    hci0 dev_found: 50:8C:FD:99:0A:EC type LE Random rssi -80 flags 0x0000 
    AD flags 0x06 
    eir_len 23
    …
    

    The relative signal strength indicator is rssi -80, but the list is much longer containing more information about this and other devices.

    To spy on your Bluetooth neighbourhood showing only unique MAC addresses with their strongest RSSI, run the following command:

    $ sudo btmgmt find |grep rssi |sort -n |uniq -w 33
    
    hci0 dev_found: 40:43:42:B3:71:11 type LE Random rssi -53 flags 0x0000 
    hci0 dev_found: 44:DA:5F:EA:C6:CF type LE Random rssi -78 flags 0x0000 
    hci0 dev_found: 7F:7D:08:6B:E0:37 type LE Random rssi -74 flags 0x0000 
    hci0 dev_found: A4:58:0F:21:A1:8C type BR/EDR rssi -79 flags 0x0000
    

提交回复
热议问题