Skip to content

Commit

Permalink
[bluetooth] consider other BluetoothScanNotification than RSSI as Thi…
Browse files Browse the repository at this point in the history
…ngStatus.ONLINE

Signed-off-by: Peter Rosenberg <[email protected]>
  • Loading branch information
PRosenb committed Aug 21, 2022
1 parent 17dd131 commit f2bc419
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,11 @@ public void onScanRecordReceived(BluetoothScanNotification scanNotification) {
int rssi = scanNotification.getRssi();
if (rssi != Integer.MIN_VALUE) {
updateRSSI(rssi);
} else {
// we received a scan notification from this device so it is online
// TODO how can we detect if the underlying bluez stack is still receiving advertising packets when there
// are no changes?
updateStatus(ThingStatus.ONLINE);
}
}

Expand Down

0 comments on commit f2bc419

Please sign in to comment.