I managed, through the Nordic library for Android `thingylib` ([github](github.com/.../thingylib)) , to connect to thingy52 and receive in the callback listener `ThingyListener` the information about the device (e.g. `onGravityVectorChangedEvent`, `onAccelerometerValueChangedEvent`, `onGyroscopeValueChangedEvent`, and so on...).
What I can't do (and I can't find how to do) is how I can get the information about the connection with the device, exactly the RSSI values.
Using the [BluetoothLeScannerCompat](github.com/.../Android-Scanner-Compat-Library), inside the `onBatchScanResults` scan callback, I detect the thingy52 bluetooth device, and their RSSI value, but if I set a high scan frequency, for example `.setReportDelay(10)`, it almost always does not detect devices.
How I made scan:
```java
private void startBLEScan() {
// set scan
ScanSettings scanSettings = new ScanSettings.Builder()
.setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY)
.setReportDelay(10) // set frequency
.setUseHardwareBatchingIfSupported(false)
.build();
// filter scan by uuid
List<no.nordicsemi.android.support.v18.scanner.ScanFilter> filters = new ArrayList<>();
filters.add(new ScanFilter.Builder().setServiceUuid(new ParcelUuid(ThingyUtils.THINGY_BASE_UUID)).build());
// start scan, this will trigger the scanCallback
BluetoothLeScannerCompat scanner = BluetoothLeScannerCompat.getScanner();
scanner.startScan(filters, scanSettings, scanCallback);
}
private final ScanCallback scanCallback = new ScanCallback() {
@Override
public void onBatchScanResults(@NonNull List<ScanResult> results) {
super.onBatchScanResults(results);
for(ScanResult result : results) {
result.getRssi(); // read RSSI values
}
}
};
```
My need is to get at a frequency of `10Hz`, or `100Hz` the RSSI value of the nordic thingy52, which I can't get from the `ThingyListener` events.
How can I do it?
Thank you in advance.
Example of my ThingyListener:
```java
private ThingyListener mThingyListener = new ThingyListener() {
@Override
public void onGravityVectorChangedEvent(BluetoothDevice bluetoothDevice, float x, float y, float z) {
// Here I got the data from device... but no RSSI value
};
```