Bluetooth LE Signal Strength Linux

前端 未结 7 1845
谎友^
谎友^ 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:52

    i found several solutions, but most were too slow for my needs to use as a tracking function.

    check out https://github.com/abandonware/noble containing some examples.

    my standalone scanner is also based on abandonware's module and can be found here: https://github.com/efeuentertainment/BLE-continuous-RSSI-scan

    node index.js BLEMAC
    

    continuously lists the RSSI with an update frequency of about 2 per second / depending on BLE device.

    also fast updates based on bash is:

    sudo hcitool lescan --duplicates &
    

    combined with one of the following lines: continuous updates

    sudo hcidump | grep "E6:4E:57:09:74:E4" -A 4
    sudo btmon | grep "E6:4E:57:09:74:E4" -A 7
    

    only the next received update

    sudo hcidump | grep -m 1 "E6:4E:57:09:74:E4" -A 4 | grep "RSSI"
    sudo btmon | grep -m 1 "E6:4E:57:09:74:E4" -A 7 | grep "RSSI"
    

    hope that helps. it's an old thread but my search engine lead me here anyway.

提交回复
热议问题