I need to scan a number of BLE enabled devices continuously and look for their RSSI.
So what I’ve so far tried is:
- Get the device RSSI by using the “FoundDeviceRSSI index” - But for this I need to manually choose the device from the list.
- Use the “when BluetoothLE1.RSSIChanged” function, but I can’t figure out a way to select which device’s RSSI is shown from the list.
I can read the RSSI of the connected device and work with it very well, however I just can’t understand how to read the RSSI of a specific device without connecting to it.
Anybody got any idea?
Edit: Here’s a part of the blocks I am using. Once the ClockStopScan timer runs, it stops scanning for devices and I want it to give me the advertising data for the specified device [given by the address and UUID], however, it throws the following error,
Attempt to invoke virtual method 'android.bluetooth.le.ScanRecord android.bluetooth.le.ScanResult.getScanRecord()' on a null object reference
I also tried to change the UUID to one of the GATT characteristics addresses, but it gives the same error. Any sort of help would be much appreciated!