noble / bleno

A Node.js module for implementing BLE (Bluetooth Low Energy) peripherals
MIT License
2.12k stars 447 forks source link

Update rssi fails/ rssi example #442

Open ElesGergo opened 4 years ago

ElesGergo commented 4 years ago

I am developing a ble software for rpi3 and I need to see the updated rssi on the pheripheral. What I want to achive is to only let devices connect (or let them connect and disconnect them if they are too far) under a cetain rssi(-50 can connect, -60 can't). I tried to implement the bleno.updateRssi((rssi,err)=>{ console.log(rssi) }); function and subscribe to the bleno.on("rssiUpdate",(rssi,err)=>{console.log(rssi)}) but it does not seemed to log anything work. Can you help me out with an example?