Bluetooth LE Signal Strength Linux

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

    You can use a combination of:

    sudo hcitool lescan --duplicates & ;
    sudo hcidump --raw 
    

    that will provide you the raw dump of all the bluetooth packets which contain all relevant information you must be interested in such as : UUID, Major, Minor, RSSI, TxPower. You will have to run some kind of script to parse and filter LE packets and make them into readable form.

    One of the scripts written with Bash and S editor was provided by jjnebaker here with the problem and solution discussed here

    The Other option is to use PyBluez using the example code here But you might find the solution provided by Switchdoc labs useful according to your needs as well. here

提交回复
热议问题