Skip to content

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.

Sharper kind chips and detection categories

CIS-C09e1b4f3284b4
diff --git a/app/src/main/java/com/rfsentinel/app/detect/DeviceIntel.kt b/app/src/main/java/com/rfsentinel/app/detect/DeviceIntel.kt
index 9d00c50..b87f4e8 100644
--- a/app/src/main/java/com/rfsentinel/app/detect/DeviceIntel.kt
+++ b/app/src/main/java/com/rfsentinel/app/detect/DeviceIntel.kt
@@ -91,6 +91,18 @@ object DeviceIntel {
"^movistar_|^miwifi_" to "Home router - Movistar", "^tim-\\d|^telecomitalia" to "Home router - TIM", "^fastweb" to "Home router - Fastweb",
"^telstra[0-9a-f]{4}" to "Home router - Telstra", "^optus_" to "Home router - Optus", "^ziggo" to "Home router - Ziggo",
"^kpn ?[0-9a-z]{4}|^experiabox" to "Home router - KPN", "^upc\\d{6,7}$" to "Home router - UPC",
+ // Public WiFi of chains found in many countries, and plainly free networks.
+ "^(google )?starbucks|^mcdonalds|^mcdonald's|^mcd ?free|^tim ?hortons|^panera|^boingo|^wayport|^ikea ?wifi|^subway ?wifi|^costa ?wifi|^pret ?wifi|^kfc ?wifi|^burger ?king|^walmart ?wifi" to "Public WiFi hotspot",
+ "^_?free[ _-]?(public[ _-]?)?wi-?fi|^public[ _-]?wi-?fi$|^_?airport[ _-]?(free[ _-]?)?wi-?fi" to "Public WiFi hotspot",
+ // Routers' own default names (the maker, before anyone renamed it).
+ "^netgear\\d{2}(-5g)?$|^orbi\\d{2,3}$" to "Home router - NETGEAR", "^tp-?link_[0-9a-f]{4}(_5g)?$|^deco[_-]?[0-9a-f]{4}$" to "Home router - TP-Link",
+ "^asus(_[0-9a-f]{2})?(_5g)?$|^asus_rt" to "Home router - ASUS", "^linksys\\d{5}(_5ghz)?$" to "Home router - Linksys",
+ "^d-?link[-_][0-9a-f]{4}" to "Home router - D-Link", "^belkin[._-][0-9a-f]{3}" to "Home router - Belkin",
+ "^huawei-[0-9a-z]{4}(-5g)?$" to "Home router - Huawei", "^tenda_[0-9a-f]{6}" to "Home router - Tenda",
+ "^xiaomi_[0-9a-f]{4}|^redmi_[0-9a-f]{4}" to "Home router - Xiaomi", "^mercusys_[0-9a-f]{4}" to "Home router - Mercusys",
+ "^arris-[0-9a-f]{4}|^sbg\\d{4}" to "Home router - ARRIS", "^sagemcom[0-9a-f]{4}" to "Home router - Sagemcom",
+ "^technicolor|^tc8717t|^tg1672g" to "Home router - Technicolor", "^hitron-[0-9a-f]{4}" to "Home router - Hitron",
+ "^fritz!?box" to "Home router - FRITZ!Box", "^zyxel_[0-9a-f]{4}" to "Home router - Zyxel", "^ubee[0-9a-f]{4}" to "Home router - Ubee",
// Gadgets that make their own network.
"^70mai|^viofo|^blackvue|^thinkware|^nextbase|^vantrue|^rexing|^garmin ?dash|^dashcam|^dash ?cam|^roav|^redtiger|^azdome" to "Dashcam",
"^gopro|^gp[0-9]{8}$|^hero\\d+|^insta360|^osmo ?action|^akaso" to "Action camera",
@@ -102,12 +114,15 @@ object DeviceIntel {
"^nintendo|^switch_|^ps[45]-|^xbox" to "Game console"
).map { (re, type) -> Regex(re, RegexOption.IGNORE_CASE) to type }
- private val PHONE_TYPE = Regex("^(iphone|apple watch|phone hotspot|phone / computer|apple device \\(iphone|samsung device|google device)", RegexOption.IGNORE_CASE)
- private val PHONE_NAME = Regex("iphone|galaxy|pixel|'s phone|oneplus|redmi|moto g", RegexOption.IGNORE_CASE)
+ private val PHONE_TYPE = Regex("^(iphone|apple watch|phone hotspot|phone / computer|apple device \\(iphone|samsung device|google device|phone$|phone -)", RegexOption.IGNORE_CASE)
+ private val PHONE_NAME = Regex("iphone|galaxy|pixel|'s phone|oneplus|redmi|moto g|xperia|nothing phone", RegexOption.IGNORE_CASE)
+ /** A phone maker's other gear, named after the phone ("Galaxy Buds", "Pixel Watch", "Galaxy Tab"). */
+ private val NOT_PHONE_NAME = Regex("buds|watch|\\btab\\b|book|\\bfit\\b|band|\\bring\\b|smarttag|\\btag\\b|\\btv\\b|tablet|\\bear", RegexOption.IGNORE_CASE)
/** True when a device's type (from [identify]) or broadcast name says it's a phone (or a phone's hotspot). */
fun isPhone(type: String?, name: String?): Boolean =
- type?.let { PHONE_TYPE.containsMatchIn(it) } == true || name?.let { PHONE_NAME.containsMatchIn(it) } == true
+ type?.let { PHONE_TYPE.containsMatchIn(it) } == true ||
+ name?.let { PHONE_NAME.containsMatchIn(it) && !NOT_PHONE_NAME.containsMatchIn(it) } == true
/** What a network's name says it is ([SSID_TYPES]), or null. */
fun ssidType(ssid: String): String? = SSID_TYPES.firstOrNull { it.first.containsMatchIn(ssid.trim()) }?.second
@@ -127,10 +142,15 @@ object DeviceIntel {
Regex("airpods|beats|buds|earbud|headphone|headset|jbl|bose|sony w[hf]-|soundcore|jabra|sennheiser|skullcandy", RegexOption.IGNORE_CASE) to "Headphones / earbuds",
Regex("watch|fitbit|garmin|amazfit|mi band|galaxy fit|whoop|polar|suunto|oura", RegexOption.IGNORE_CASE) to "Wearable",
Regex("\\b(tv|bravia|roku|chromecast|fire ?tv|shield)\\b|\\[tv\\]", RegexOption.IGNORE_CASE) to "TV / streaming device",
- Regex("tesla|model [3sxy]\\b|bmw|mercedes|audi|volkswagen|\\bvw\\b|toyota|honda|hyundai|\\bkia\\b|ford|chevrolet|nissan|subaru|volvo|polestar|rivian|mazda|jeep|carplay", RegexOption.IGNORE_CASE) to "Vehicle",
+ // Car makers and their infotainment systems' Bluetooth names (whole words: "audi" is in "audio").
+ Regex("tesla|model [3sxy]\\b|\\bbmw\\b|mercedes|\\baudi\\b|volkswagen|\\bvw\\b|toyota|lexus|honda|acura|hyundai|genesis|\\bkia\\b|\\bford\\b|lincoln|" +
+ "chevrolet|\\bchevy\\b|cadillac|\\bgmc\\b|buick|nissan|infiniti|subaru|volvo|polestar|rivian|mazda|jeep|dodge|chrysler|porsche|land rover|" +
+ "jaguar|mini cooper|peugeot|renault|citro[eë]n|skoda|\\bopel\\b|vauxhall|\\bfiat\\b|carplay|uconnect|\\bmy ?car\\b|^sync$|mbux|\\bmmi\\b|" +
+ "idrive|onstar|mylink|entune", RegexOption.IGNORE_CASE) to "Vehicle",
Regex("printer|deskjet|officejet|laserjet|epson|canon|brother", RegexOption.IGNORE_CASE) to "Printer",
Regex("airtag|\\btile\\b|smarttag|chipolo|pebblebee", RegexOption.IGNORE_CASE) to "Item tracker",
Regex("keyboard|mouse|\\bmx \\w+|trackpad|controller|xbox|dualsense|dualshock|joy-con", RegexOption.IGNORE_CASE) to "Peripheral / controller",
+ Regex("gopro|insta360|osmo|dash ?cam|doorbell|\\bcam\\b|camera|arlo|wyze ?cam|eufy ?cam|blink", RegexOption.IGNORE_CASE) to "Camera",
Regex("\\bnest\\b|\\bring\\b|echo|alexa|google home|\\bhue\\b|govee|wiz|kasa|tapo|switchbot|\\block\\b|august|yale", RegexOption.IGNORE_CASE) to "Smart-home device",
Regex("iphone|ipad|macbook|imac|galaxy|pixel|oneplus|xiaomi|redmi|motorola|moto g", RegexOption.IGNORE_CASE) to "Phone / computer",
Regex("speaker|soundbar|sonos|boom|flip \\d|charge \\d", RegexOption.IGNORE_CASE) to "Speaker"
@@ -221,7 +241,8 @@ object DeviceIntel {
Regex("sonos|bose|harman|jbl|sennheiser|jabra|gn audio", RegexOption.IGNORE_CASE) to "Audio device",
Regex(AUTOMOTIVE.joinToString("|") { "(?:${it.first.pattern})" }, RegexOption.IGNORE_CASE) to "Vehicle system",
Regex("dji|parrot|skydio|autel", RegexOption.IGNORE_CASE) to "Drone / controller",
- Regex("ring llc|amazon technologies|google|nest labs|arlo|wyze", RegexOption.IGNORE_CASE) to "Smart-home / camera device"
+ Regex("ring llc|arlo|wyze|eufy|reolink|hikvision|dahua|ezviz|axis communications|hanwha", RegexOption.IGNORE_CASE) to "Security camera / doorbell",
+ Regex("amazon technologies|google|nest labs", RegexOption.IGNORE_CASE) to "Smart-home / camera device"
)
/**
@@ -380,7 +401,8 @@ object DeviceIntel {
private val WIFI_VENDOR_KINDS = setOf(
"Vehicle / cellular router", "IoT / smart-home module", "Two-way radio / public-safety gear",
- "Axon body cam / TASER", "Vehicle system", "Drone / controller", "Smart-home / camera device", "Rugged scanner / printer"
+ "Axon body cam / TASER", "Vehicle system", "Drone / controller", "Smart-home / camera device", "Rugged scanner / printer",
+ "Security camera / doorbell"
)
private fun identifyWifi(a: Advert, macVendor: String?): Identity {
@@ -404,7 +426,7 @@ object DeviceIntel {
ssidType(ssid) != null -> ssidType(ssid)!!
Regex("iphone|androidap|galaxy|pixel|hotspot|'s phone", RegexOption.IGNORE_CASE).containsMatchIn(ssid) -> "Phone hotspot"
Regex("direct-|printer|hp-print|epson|canon", RegexOption.IGNORE_CASE).containsMatchIn(ssid) -> "WiFi Direct / printer"
- Regex("tesla|carplay|android auto|\\bcar\\b|bmw|mercedes|audi|toyota", RegexOption.IGNORE_CASE).containsMatchIn(ssid) -> "Vehicle WiFi"
+ Regex("tesla|carplay|android auto|\\bcar\\b|\\bbmw\\b|mercedes|\\baudi\\b|toyota|uconnect|onstar|\\bmy ?car\\b|\\bvw\\b|volkswagen|hyundai|\\bkia\\b|porsche|volvo|rivian|polestar", RegexOption.IGNORE_CASE).containsMatchIn(ssid) -> "Vehicle WiFi"
else -> "WiFi access point"
}
// Make / model from the beacon itself (works for hidden networks too).
diff --git a/app/src/main/java/com/rfsentinel/app/detect/SignatureEngine.kt b/app/src/main/java/com/rfsentinel/app/detect/SignatureEngine.kt
index ecb7dce..aebee0a 100644
--- a/app/src/main/java/com/rfsentinel/app/detect/SignatureEngine.kt
+++ b/app/src/main/java/com/rfsentinel/app/detect/SignatureEngine.kt
@@ -95,10 +95,14 @@ object SignatureEngine {
* counts (Hikvision alone has 100+), not just a hand-picked few.
*/
private val CAMERA_MAKER_NAME = Regex(
- "hikvision|zhejiang dahua|ezviz|lorex|amcrest|swann communications|wyze labs|^ring llc|arlo technologies|reolink|" +
+ "hikvision|zhejiang dahua|ezviz|lorex technology|amcrest|swann communications|wyze labs|^ring llc|arlo technologies|reolink|" +
"vivint|simplisafe|uniview|vivotek|avigilon|verkada|geovision|mobotix|sunell|march networks|" +
"ava security|hanwha vision|hanwha techwin|samsung techwin|axis communications|" +
- "fantasia trading|shenzhen phaten|tp-link.*tapo",
+ "fantasia trading|shenzhen phaten|tp-link.*tapo|" +
+ // More camera / recorder makers, registrants as the IEEE lists them.
+ "tiandy technologies|^rhombus (systems|europe)|eagle eye networks|zmodo|^night owl|skybell|wuuk labs|canary connect|" +
+ "^blink by amazon|^flir systems|bosch security systems|^idis (co|nederland)|^tvt co|honeywell video|costar video|" +
+ "digital watchdog|speco technologies|jovision",
RegexOption.IGNORE_CASE
)
private const val UUID_REMOTE_ID = 0xFFFA // ASTM Remote ID (SIG SDO UUID)
@@ -134,7 +138,9 @@ object SignatureEngine {
"8C1F64B07" to "AeroVironment", "34B5F32" to "Inspired Flight", "AC86D17" to "Quantum Systems",
"8C1F640F1" to "ideaForge", "8C1F64A2D" to "ACSL", "74B80F" to "Zipline",
"24A10D7" to "Cyon Drones", "B44D43A" to "UAV Navigation", "14DD48" to "Shield AI",
- "E8B470C" to "Anduril Industries"
+ "E8B470C" to "Anduril Industries", "98AAFC7" to "Hubsan", "6CDFFBE" to "FIMI (Xiaomi drones)",
+ // uAvionix makes the add-on Remote ID and ADS-B modules many drones carry.
+ "04714B1" to "uAvionix (drone Remote ID module)", "546F71" to "uAvionix (drone Remote ID module)"
)
)
@@ -178,6 +184,12 @@ object SignatureEngine {
/** Zebra's default Bluetooth name is the serial: 2-char plant, 3-letter model code, YYWW + 5 digits. */
private val ZEBRA_SERIAL = Regex("^[A-Z0-9]{2}[A-Z]{3}\\d{9}$")
+ /** Brother's mobile printers by their default model names (RJ-4250WB, PJ-763MFi...). */
+ private val BROTHER_MOBILE = Regex("^(rj|pj)-?\\d{3,4}", RegexOption.IGNORE_CASE)
+
+ /** Meta's VR headsets, which share Meta's company ID and services with the glasses. */
+ private val META_HEADSET = Regex("quest|oculus", RegexOption.IGNORE_CASE)
+
/** IDO / VeryFit smartwatch model names: IDW26, ID205, ID207... */
private val IDO_WATCH = Regex("^ID[A-Z]?\\d{2,4}[A-Z]?$")
private const val UUID_IDO = 0x0AF0
@@ -255,7 +267,11 @@ object SignatureEngine {
"store scanners and handhelds", SIG)
}
if (CID_BROTHER in a.manufacturerData) {
- hits += Hit(Category.PUBLIC_SAFETY, "Brother printer", 20,
+ // RuggedJet (RJ-) and PocketJet (PJ-) are the mobile models, named after the model by default.
+ hits += if (BROTHER_MOBILE.containsMatchIn(name)) Hit(Category.PUBLIC_SAFETY, "Brother mobile printer (RuggedJet / PocketJet)", 35,
+ "Brother Industries company ID 0x0755 and a mobile-printer model name \"$name\" - in-car printers for " +
+ "tickets and reports, but also utility, delivery and field-service vans", SIG)
+ else Hit(Category.PUBLIC_SAFETY, "Brother printer", 20,
"Brother Industries company ID 0x0755 - RuggedJet / PocketJet in-car printers, but mostly " +
"home and office printers", SIG)
}
@@ -401,7 +417,8 @@ object SignatureEngine {
"Meta manufacturer data carries the META_RB_GLASS token", ACAB)
}
}
- if (CID_META in a.manufacturerData || META_UUIDS.any { it in allShorts }) {
+ // A Quest headset names itself; it has no camera pointed at people.
+ if ((CID_META in a.manufacturerData || META_UUIDS.any { it in allShorts }) && !META_HEADSET.containsMatchIn(name)) {
hits += Hit(Category.GLASSES, "Meta hardware - possibly Ray-Ban Meta glasses", 45,
"Meta Platforms company ID 0x01AB or UUID 0xFEB7/0xFEB8 (also used by Quest headsets)",
"$SIG; $ACAB field capture 2026-07-31")
@@ -583,8 +600,8 @@ object SignatureEngine {
return hits
}
- /** DJI's handheld cameras and gimbals share its address blocks; they aren't drones. */
- private val DJI_HANDHELD = Regex("^(dji ?)?osmo|^om ?\\d", RegexOption.IGNORE_CASE)
+ /** DJI's handheld cameras, gimbals and microphones share its address blocks; they aren't drones. */
+ private val DJI_HANDHELD = Regex("^(dji ?)?(osmo|om ?\\d|rs ?\\d|ronin|mic\\b|mic ?(mini|\\d))", RegexOption.IGNORE_CASE)
private fun droneByPrefix(a: Advert): Hit? {
if (isLocallyAdministered(a.mac)) return null
@@ -605,7 +622,11 @@ object SignatureEngine {
"avigilon" to "Avigilon", "verkada" to "Verkada", "geovision" to "GeoVision", "mobotix" to "Mobotix",
"sunell" to "Sunell", "march networks" to "March Networks", "ava security" to "Ava Security",
"hanwha" to "Hanwha Vision", "samsung techwin" to "Hanwha Vision", "axis" to "Axis", "blink" to "Blink (Amazon)",
- "fantasia trading" to "Eufy (Anker)", "phaten" to "Phaten (camera OEM)", "tapo" to "TP-Link Tapo"
+ "fantasia trading" to "Eufy (Anker)", "phaten" to "Phaten (camera OEM)", "tapo" to "TP-Link Tapo",
+ "tiandy" to "Tiandy", "rhombus" to "Rhombus", "eagle eye" to "Eagle Eye Networks", "zmodo" to "Zmodo",
+ "night owl" to "Night Owl", "skybell" to "SkyBell", "wuuk" to "WUUK", "canary" to "Canary", "flir" to "FLIR",
+ "bosch security" to "Bosch Security", "idis" to "IDIS", "tvt" to "TVT", "honeywell video" to "Honeywell",
+ "costar" to "Costar", "digital watchdog" to "Digital Watchdog", "speco" to "Speco", "jovision" to "Jovision"
).firstOrNull { it.first in o }?.second ?: owner
}
diff --git a/app/src/main/java/com/rfsentinel/app/ui/DeviceFilter.kt b/app/src/main/java/com/rfsentinel/app/ui/DeviceFilter.kt
index 9364981..1a71167 100644
--- a/app/src/main/java/com/rfsentinel/app/ui/DeviceFilter.kt
+++ b/app/src/main/java/com/rfsentinel/app/ui/DeviceFilter.kt
@@ -76,7 +76,7 @@ enum class DeviceFilter(val label: String, val liveOnly: Boolean = false) {
ALL -> true
FLAGGED -> s.flagged
TRACKERS -> !(excludeAirTags && isAppleFindMy(s)) && (s.hits.any { it.category == Category.TRACKER } ||
- s.type.contains("tracker", true) || s.type.contains("Find My", true))
+ TRACKER_TYPE.containsMatchIn(s.type))
DRONES -> s.hits.any { it.category == Category.DRONE } || s.remoteId || s.type.startsWith("Drone")
NEW -> s.isNew
CELLS, WAZE, RADIO, AIRCRAFT -> false
@@ -85,14 +85,16 @@ enum class DeviceFilter(val label: String, val liveOnly: Boolean = false) {
FAVORITES -> Favorites.contains(s.mac)
BLE -> Advert.Source.BLE in s.sources
WIFI -> Advert.Source.WIFI in s.sources
- VEHICLES -> s.type.startsWith("Vehicle")
- PHONES -> DeviceIntel.isPhone(s.type, s.name)
- AUDIO -> AUDIO_TYPE.containsMatchIn(s.type) || s.facts.contains("Identified by" to "Fast Pair model ID")
- CAMERAS -> CAMERA_TYPE.containsMatchIn(s.type)
- ROUTERS -> s.type.startsWith("Home router")
+ VEHICLES -> VEHICLE_TYPE.containsMatchIn(s.type) || s.hits.any { it.category == Category.V2X }
+ // A watch counts as its owner's phone for tracker checks, not on this chip.
+ PHONES -> DeviceIntel.isPhone(s.type, s.name) && !s.type.startsWith("Apple Watch")
+ AUDIO -> (AUDIO_TYPE.containsMatchIn(s.type) || s.facts.contains("Identified by" to "Fast Pair model ID")) &&
+ s.hits.none { it.category == Category.AUDIO_SENSOR }
+ CAMERAS -> CAMERA_TYPE.containsMatchIn(s.type) || s.hits.any { it.category in CAMERA_CATEGORIES }
+ ROUTERS -> ROUTER_TYPE.containsMatchIn(s.type)
HOTSPOTS -> HOTSPOT_TYPE.containsMatchIn(s.type)
TVS -> TV_TYPE.containsMatchIn(s.type)
- SMART_HOME -> SMART_HOME_TYPE.containsMatchIn(s.type)
+ SMART_HOME -> SMART_HOME_TYPE.containsMatchIn(s.type) && !VEHICLE_TYPE.containsMatchIn(s.type)
}
companion object {
@@ -102,11 +104,22 @@ enum class DeviceFilter(val label: String, val liveOnly: Boolean = false) {
/** The device-kind filters (from the device's type), after the main ones. */
val KINDS = listOf(VEHICLES, PHONES, AUDIO, CAMERAS, ROUTERS, HOTSPOTS, TVS, SMART_HOME)
- private val AUDIO_TYPE = Regex("headphone|earbud|airpods|beats|speaker|soundbar|\\bbuds\\b|audio|bose|jbl|jabra|sennheiser|soundcore|skullcandy|sonos", RegexOption.IGNORE_CASE)
- private val CAMERA_TYPE = Regex("^(dashcam|action camera|security camera|smart-home / camera)", RegexOption.IGNORE_CASE)
- private val HOTSPOT_TYPE = Regex("^(public wifi hotspot|mobile hotspot box|phone hotspot)", RegexOption.IGNORE_CASE)
- private val TV_TYPE = Regex("^(smart tv|tv / streaming|game console|apple tv)", RegexOption.IGNORE_CASE)
- private val SMART_HOME_TYPE = Regex("^(iot board|iot / smart-home|smart plug|smart-home device)", RegexOption.IGNORE_CASE)
+ // Each kind from the types DeviceIntel gives (its own names, the Bluetooth appearance names and
+ // older versions' names, so saved snapshots and traces sort the same way).
+ private fun kind(re: String) = Regex(re, RegexOption.IGNORE_CASE)
+ private val TRACKER_TYPE = kind("tracker|find my|airtag|key finder|^tag$|^keyring")
+ private val VEHICLE_TYPE = kind("^vehicle|^motorized vehicle|^train wifi|tire pressure")
+ private val AUDIO_TYPE = kind("headphone|earbud|airpods|beats|speaker|soundbar|\\bbuds\\b|audio|headset|hearing aid|" +
+ "bose|jbl|jabra|sennheiser|soundcore|skullcandy|sonos")
+ private val CAMERA_TYPE = kind("^(dashcam|action camera|security camera|camera)|body cam|\\bcam(era)?\\b")
+ /** Detection categories that are cameras (police, home security, action / hidden, recording glasses). */
+ private val CAMERA_CATEGORIES = setOf(Category.BODY_CAM, Category.ALPR, Category.NETWORK_CAMERA, Category.OTHER_CAMERA, Category.GLASSES)
+ private val ROUTER_TYPE = kind("^(home router|wifi access point|vehicle / cellular router|mesh router)|access point$")
+ private val HOTSPOT_TYPE = kind("^(public wifi hotspot|mobile hotspot box|phone hotspot|train wifi)")
+ private val TV_TYPE = kind("^(smart tv|tv / streaming|game console|apple tv)|television|set-top|media player|^gaming")
+ private val SMART_HOME_TYPE = kind("smart-home|smart home|^iot|smart plug|bthome|^sensor|environmental sensor|light|" +
+ "thermostat|^hvac|^heating|air conditioning|humidifier|^fan\\b|access control|door lock|power device|domestic appliance|" +
+ "window covering|motorized device")
private fun isAppleFindMy(s: Seen) =
s.type.contains("Find My", true) || s.type.contains("AirTag", true) ||
diff --git a/app/src/test/java/com/rfsentinel/app/detect/IdentifyMoreTest.kt b/app/src/test/java/com/rfsentinel/app/detect/IdentifyMoreTest.kt
index d4ecf17..bda7472 100644
--- a/app/src/test/java/com/rfsentinel/app/detect/IdentifyMoreTest.kt
+++ b/app/src/test/java/com/rfsentinel/app/detect/IdentifyMoreTest.kt
@@ -155,6 +155,54 @@ class IdentifyMoreTest {
assertTrue(all.none { DeviceFilter.NEW.matches(it) })
}
+ @Test
+ fun kindChipsSortTheCommonCases() {
+ fun seen(type: String, name: String? = null, vararg cats: Category) = DeviceFilter.Seen("02:00:00:00:00:31", type, name,
+ cats.map { Hit(it, "x", 60, "e", "s") }, setOf(Advert.Source.BLE), cats.isNotEmpty())
+ fun kinds(s: DeviceFilter.Seen) = DeviceFilter.KINDS.filter { it.matches(s) }
+ assertEquals(listOf(DeviceFilter.AUDIO), kinds(seen("Wearable Audio Device - Earbud")))
+ assertEquals(listOf(DeviceFilter.AUDIO), kinds(seen("Hearing aid")))
+ assertEquals(listOf(DeviceFilter.TVS), kinds(seen("Display Equipment - Television")))
+ assertEquals(listOf(DeviceFilter.VEHICLES), kinds(seen("Motorized Vehicle - Car")))
+ assertEquals(listOf(DeviceFilter.VEHICLES), kinds(seen("Sensor - Vehicle Tire Pressure Sensor")))
+ assertEquals(listOf(DeviceFilter.SMART_HOME), kinds(seen("HVAC - Thermostat")))
+ assertEquals(listOf(DeviceFilter.ROUTERS), kinds(seen("WiFi access point - NETGEAR")))
+ assertEquals(listOf(DeviceFilter.CAMERAS), kinds(seen("Body cam", null, Category.BODY_CAM)))
+ assertEquals(listOf(DeviceFilter.PHONES), kinds(seen("Phone")))
+ assertTrue(DeviceFilter.TRACKERS.matches(seen("Tag")))
+ // A watch rides with its owner (tracker checks) but isn't on the Phones chip; Galaxy Buds aren't a phone.
+ assertTrue(DeviceIntel.isPhone("Apple Watch", null) && !DeviceFilter.PHONES.matches(seen("Apple Watch")))
+ assertTrue(!DeviceIntel.isPhone("Bluetooth device", "Galaxy Buds2 Pro") && DeviceIntel.isPhone("Bluetooth device", "Galaxy S24"))
+ // A gunshot sensor isn't headphones.
+ assertTrue(!DeviceFilter.AUDIO.matches(seen("Audio / gunshot sensor", null, Category.AUDIO_SENSOR)))
+ // Names: "Audio" isn't an Audi; a doorbell is a camera.
+ assertEquals("Speaker", DeviceIntel.identify(Advert("C1:22:33:44:55:32", Advert.Source.BLE, -60, "Audio Pro speaker")).type)
+ assertEquals("Camera", DeviceIntel.identify(Advert("C1:22:33:44:55:33", Advert.Source.BLE, -60, "Ring Doorbell")).type)
+ assertEquals("Vehicle", DeviceIntel.identify(Advert("C1:22:33:44:55:34", Advert.Source.BLE, -60, "Uconnect 4C")).type)
+ mapOf("NETGEAR47" to "Home router - NETGEAR", "TP-Link_3F2A" to "Home router - TP-Link", "Starbucks WiFi" to "Public WiFi hotspot",
+ "_Free_WiFi" to "Public WiFi hotspot", "FRITZ!Box 7590 XY" to "Home router - FRITZ!Box"
+ ).forEach { (ssid, type) -> assertEquals(ssid, type, DeviceIntel.identify(wifi(ssid)).type) }
+ }
+
+ @Test
+ fun detectionMakersAndLookalikes() {
+ fun hits(mac: String, name: String? = null, source: Advert.Source = Advert.Source.WIFI, mfg: Map<Int, ByteArray> = emptyMap()) =
+ SignatureEngine.classify(Advert(mac, source, -60, name, mfg,
+ wifi = if (source == Advert.Source.WIFI) Advert.WifiInfo(2437, "[WPA2-PSK-CCMP]", null, emptyList()) else null))
+ // More drone makers' blocks; DJI gimbals and mics aren't drones.
+ assertTrue(hits("98:AA:FC:71:22:33", "x", Advert.Source.BLE).any { it.category == Category.DRONE && it.label.startsWith("Hubsan") })
+ assertTrue(hits("60:60:1F:11:22:33", "RS 4 Pro-1A2B", Advert.Source.BLE).none { it.category == Category.DRONE })
+ assertTrue(hits("60:60:1F:11:22:33", "DJI MIC 2", Advert.Source.BLE).none { it.category == Category.DRONE })
+ assertTrue(hits("60:60:1F:11:22:33", "Mavic 3", Advert.Source.BLE).any { it.category == Category.DRONE })
+ // Any block of a camera maker, by its registrant.
+ assertEquals("Tiandy camera, hub or recorder", hits("3C:DA:6D:11:22:33", "cam").first { it.category == Category.NETWORK_CAMERA }.label)
+ // A Quest headset isn't camera glasses; Brother's mobile printers say so.
+ assertTrue(hits("C1:22:33:44:55:41", "Quest 3", Advert.Source.BLE, mapOf(0x01AB to bytes(1, 2))).none { it.category == Category.GLASSES })
+ assertTrue(hits("C1:22:33:44:55:42", null, Advert.Source.BLE, mapOf(0x01AB to bytes(1, 2))).any { it.category == Category.GLASSES })
+ assertEquals(35, hits("C1:22:33:44:55:43", "RJ-4250WB_1234", Advert.Source.BLE, mapOf(0x0755 to bytes(1, 2)))
+ .first { it.label.startsWith("Brother") }.confidence)
+ }
+
@Test
fun advertHashIsStable() {
assertEquals(AdvertFingerprint.hash("n=Buds|u=|d=|m=|t=|c="), AdvertFingerprint.hash("n=Buds|u=|d=|m=|t=|c="))
diff --git a/docs/SIGNATURES.md b/docs/SIGNATURES.md
index b823714..08f06d7 100644
--- a/docs/SIGNATURES.md
+++ b/docs/SIGNATURES.md
@@ -54,7 +54,7 @@ Before shipping, the identifiers were checked against these registries:
| Audio sensor | 128-bit service UUIDs with short IDs `0x3100` to `0x3500` (Flock Raven) | 80 | ACAB field capture |
| Drone | Service data `0xFFFA` with ASTM F3411 app code `0x0D`; decoded | 95 | ASTM F3411 / opendroneid |
| Drone | WiFi vendor IE with OUI `FA:0B:BC`, type `0x0D` | 95 | ASTM F3411 |
-| Drone | Drone makers' own IEEE blocks (DJI, Parrot, Skydio, Autel /28, Yuneec /28, and others) | 60 | IEEE / ACAB |
+| Drone | Drone makers' own IEEE blocks (DJI, Parrot, Skydio, Autel /28, Yuneec /28, Hubsan, FIMI, uAvionix Remote ID modules and others); DJI handhelds named Osmo, OM, RS / Ronin or Mic are left out | 60 | IEEE / ACAB |
| Tracker | Apple company ID `0x004C`, type `0x12`, length `0x19` (separated from owner only) | 70 | ACAB; arXiv 2501.17452 |
| Tracker | Google `0xFEAA` service data, frame `0x41` (separated; frame `0x40` = near owner, ignored) | 70 | Find Hub Network spec |
| Tracker | Samsung `0xFD5A` / Tile `0xFEED` or `0xFEEC` service data | 55 | SIG |
@@ -65,6 +65,7 @@ Before shipping, the identifiers were checked against these registries:
| Glasses | HeyCyan SDK UUID `7905FFF0-B5CE-4E99-A40F-4B1E122D00D0`, full 16-byte match only | 68 | ACAB |
| Network camera (off by default) | SSID starting with `ARLO_VMB_` or `NTGR_VMB_` | 88 | ACAB |
| Network camera (off by default) | Arlo, Blink, Ezviz, Uniview, Amcrest, Wyze, Swann, Night Owl, SkyBell or WUUK blocks (WiFi only) | 65 | IEEE / ACAB |
+| Network camera (off by default) | Any other block whose IEEE registrant is a camera / recorder maker (Hikvision, Dahua, Tiandy, Rhombus, Eagle Eye Networks, FLIR, Bosch Security, IDIS, TVT, Digital Watchdog, Speco, Jovision, Zmodo, Canary...) (WiFi only) | 60 | IEEE |
A WiFi network named after a passenger rail operator (Amtrak, Brightline, Eurostar, SNCF `_WIFI_INOUI`,
VIA Rail, Deutsche Bahn `WIFIonICE`; Wardrive Go's rail list) is shown as **Train WiFi** and its