RF Sentinel (RFSentinel): free, open-source police detector app for Android. Spots police body cams, Flock ALPR cameras, AirTag trackers, Remote ID drones, smart glasses and fake cell towers from Bluetooth LE and WiFi. No root.
Kotlin airtagalprandroidandroid-autoanti-surveillancebluetooth-low-energybody-cameracounter-surveillancedrone-detectionflock-safetyimsi-catcher-detectorpolice-detectorpolice-scannerprivacyremote-idrtl-sdrsdrsurveillance-detectiontracker-detectionwifi
OUI-SPY: explain phone-side pairing that breaks the link; log connection steps
CIS-C073e8c9cd677f
diff --git a/app/src/main/java/com/rfsentinel/app/esp/OuiSpyBle.kt b/app/src/main/java/com/rfsentinel/app/esp/OuiSpyBle.ktindex b5d81ef..eea694b 100644--- a/app/src/main/java/com/rfsentinel/app/esp/OuiSpyBle.kt+++ b/app/src/main/java/com/rfsentinel/app/esp/OuiSpyBle.kt@@ -83,7 +83,15 @@ object OuiSpyBle {val adapter = ctx.getSystemService(BluetoothManager::class.java)?.adapter ?: returnif (!adapter.isEnabled) { setStatus("OUI-SPY: Bluetooth is off"); retry(); return }val device = runCatching { adapter.getRemoteDevice(addr) }.getOrNull() ?: return+ // The board keeps no pairing keys, so a phone-side pairing breaks every connection+ // (encryption fails with "key missing"). It must not be paired in Android settings.+ if (device.bondState == BluetoothDevice.BOND_BONDED) {+ setStatus("OUI-SPY: tap \"Forget\" on ${device.name ?: "the board"} in Android Bluetooth settings - it must not be paired there")+ retry()+ return+ }setStatus("OUI-SPY: connecting…")+ Log.i(TAG, "connecting")gatt = device.connectGatt(ctx, false, callback, BluetoothDevice.TRANSPORT_LE)}@@ -130,6 +138,7 @@ object OuiSpyBle {private val callback = object : BluetoothGattCallback() {@SuppressLint("MissingPermission")override fun onConnectionStateChange(g: BluetoothGatt, st: Int, newState: Int) {+ Log.i(TAG, "connection state $newState (status $st)")main.post {if (g !== gatt) return@postif (newState == BluetoothProfile.STATE_CONNECTED) {@@ -185,6 +194,7 @@ object OuiSpyBle {main.post {if (g !== gatt) return@postif (st != BluetoothGatt.GATT_SUCCESS) Log.w(TAG, "engine write failed: $st")+ else Log.i(TAG, "engine command sent")writeNext(g)}}