monitor icon indicating copy to clipboard operation
monitor copied to clipboard

mi band recognized but instantly dropped

Open dedepene opened this issue 5 years ago • 9 comments

monitor detects my xiaomi mi band upon launch and seconds later starts and keeps reporting 0% confidence for it. What's up with that?

[+] 0.2.197 05-12-2019 02:26:05 pm [CMD-MQTT]   monitor/moni/mi_band
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"100",
    "name":"Xiaomi Band 3",
    "manufacturer":"Anhui Huami Information Technology Co.",
    "type":"GENERIC_BEACON_PUBLIC",
    "report_delay":"0",
    "rssi":"-59",
    "observed_interval":"-1",
    "flags":"none",
    "movement":"stationary",
    "oem_data":"Anhui Huami Information Technology Co.",
    "hex_data":"380d0000",
    "resolvable":"PUBLIC",
    "retained":"false",
    "timestamp":"Thu Dec 05 2019 14:26:04 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 05-12-2019 02:26:06 pm [CMD-PUBL]   [passed filter] data: D0:29:9C:64:0E:EA pdu: SCAN_RSP rssi: -59 dBm flags: none man: Anhui Huami Information Technology Co. delay: 0
[+] 0.2.197 05-12-2019 02:26:06 pm [CMD-INFO]   **** started arrival scan [x1 max rep] ****
[+] 0.2.197 05-12-2019 02:26:07 pm [CMD-SCAN]   (No. 1) D0:29:9C:64:0E:EA arrival?
[+] 0.2.197 05-12-2019 02:26:09 pm [DEL-RAND]   RAND 6C:C2:C2:B6:8F:AB expired after 209 seconds
[+] 0.2.197 05-12-2019 02:26:12 pm [CMD-MQTT]   monitor/moni/mi_band
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"0",
    "name":"Xiaomi Band 3",
    "manufacturer":"Unknown",
    "type":"KNOWN_MAC",
    "retained":"false",
    "timestamp":"Thu Dec 05 2019 14:26:12 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 05-12-2019 02:26:13 pm [CMD-MQTT]   monitor/moni/mi_band/rssi
[+] 0.2.197 05-12-2019 02:26:13 pm [CMD-INFO]   **** completed arrival scan ****
[+] 0.2.197 05-12-2019 02:26:14 pm [CMD-NAME]   D0:29:9C:64:0E:EA Xiaomi Band 3  Unknown
[+] 0.2.197 05-12-2019 02:26:15 pm [CMD-RAND]   [passed filter] data: 6C:C2:C2:B6:8F:AB pdu: SCAN_RSP rssi: -70 dBm flags: none man: unknown delay: 0
[+] 0.2.197 05-12-2019 02:26:30 pm [DEL-RAND]   RAND 61:69:8D:24:47:77 expired after 155 seconds
[+] 0.2.197 05-12-2019 02:26:32 pm [CMD-RAND]   [passed filter] data: 53:29:14:E3:1E:59 pdu: SCAN_RSP rssi: -69 dBm flags: none man: Google delay: 0
[+] 0.2.197 05-12-2019 02:26:33 pm [CMD-INFO]   **** started arrival scan [x1 max rep] ****
[+] 0.2.197 05-12-2019 02:26:33 pm [CMD-SCAN]   (No. 1) D0:29:9C:64:0E:EA arrival?
[+] 0.2.197 05-12-2019 02:26:37 pm [CMD-NAME]   D0:29:9C:64:0E:EA Xiaomi Band 3  Unknown
[+] 0.2.197 05-12-2019 02:26:43 pm [CMD-MQTT]   monitor/moni/mi_band
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"0",
    "name":"Xiaomi Band 3",
    "manufacturer":"Unknown",
    "type":"KNOWN_MAC",
    "retained":"false",
    "timestamp":"Thu Dec 05 2019 14:26:34 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 05-12-2019 02:26:44 pm [CMD-MQTT]   monitor/moni/mi_band/rssi
[+] 0.2.197 05-12-2019 02:26:44 pm [CMD-INFO]   **** completed arrival scan ****
[+] 0.2.197 05-12-2019 02:26:44 pm [CMD-NAME]   D0:29:9C:64:0E:EA Xiaomi Band 3  Unknown
[+] 0.2.197 05-12-2019 02:26:59 pm [DEL-RAND]   RAND 49:04:22:EC:77:AA expired after 188 seconds
[+] 0.2.197 05-12-2019 02:27:08 pm [CMD-RAND]   [passed filter] data: 61:69:8D:24:47:77 pdu: ADV_SCAN_IND rssi: -71 dBm flags: none man: Google delay: 0
[+] 0.2.197 05-12-2019 02:27:08 pm [CMD-INFO]   **** started arrival scan [x1 max rep] ****
[+] 0.2.197 05-12-2019 02:27:09 pm [CMD-SCAN]   (No. 1) D0:29:9C:64:0E:EA arrival?
[+] 0.2.197 05-12-2019 02:27:11 pm [CMD-NAME]   D0:29:9C:64:0E:EA Xiaomi Band 3  Unknown
[+] 0.2.197 05-12-2019 02:27:20 pm [CMD-MQTT]   monitor/moni/mi_band
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"0",
    "name":"Xiaomi Band 3",
    "manufacturer":"Unknown",
    "type":"KNOWN_MAC",
    "retained":"false",
    "timestamp":"Thu Dec 05 2019 14:27:09 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 05-12-2019 02:27:20 pm [CMD-MQTT]   monitor/moni/mi_band/rssi
[+] 0.2.197 05-12-2019 02:27:23 pm [CMD-INFO]   **** completed arrival scan ****
[+] 0.2.197 05-12-2019 02:27:23 pm [CMD-NAME]   D0:29:9C:64:0E:EA Xiaomi Band 3  Unknown

dedepene avatar Dec 05 '19 14:12 dedepene

Looks like your band reports as a beacon and youre trying to use it as a known device. Remove it from the known device list and all should work fine.

andrewjfreyer avatar Jan 12 '20 18:01 andrewjfreyer

Thanks for chiming in! I did remove it from known static devices, rebooted, it worked for a while, but 5-6 mins later confience slowly dropped down to 0 even though the band was right next to the Pi all the time.

`root@raspberrypi:~/monitor# bash monitor.sh -Varb

===================================================

              *** BETA/DEV BRANCH ***

===================================================
> starting monitor.sh (v. 0.2.197)...
> removing web request caches
> warning: verbose logging is enabled. this setting is only for informational and debugging purposes
> report all scan results mode enabled
> warning: periodic scan mode may cause interference with 2.4GHz networks if run on a Raspberry Pi
> generic bluetooth beacon, ibeacon, and known beacon address reporting mode enabled
> preference: minimum time between the same type of scan = 15
> preference: regex filter for flags to accept = .*
> preference: regex filter for flags to reject = NONE
> preference: regex filter for manufacturers to accept = .*
> preference: regex filter for manufacturers to reject = NONE
> preference: maximum sequential arrive scan attempts = 1
> preference: maximum sequential depart scan attempts = 2
> preference: selected HCI device = hci0
> mqtt trigger: monitor/scan/ARRIVE
> mqtt trigger: monitor/scan/DEPART
mkfifo: cannot create fifo 'packet_pipe': File exists
> known beacon: C0:1F:DD:6B:DD:81 publishes to: monitor/moni/dd_beacon
> log listener pid = 32611
> btle scan pid = 32612
> btle text pid = 32617
> btle listener pid = 32619
> mqtt listener pid = 32623
> packet listener pid = 32626
> beacon database time trigger pid = 32631
[+] 0.2.197 13-01-2020 09:05:15 am [CMD-PUBL]   F0:25:31:CF:2F:9C RDL51822 Unknown -74 dBm
[+] 0.2.197 13-01-2020 09:05:16 am [CMD-MQTT]   monitor/moni/F0:25:31:CF:2F:9C
 {
    "id":"F0:25:31:CF:2F:9C",
    "confidence":"100",
    "name":"RDL51822",
    "manufacturer":"Unknown",
    "type":"GENERIC_BEACON_PUBLIC",
    "report_delay":"0",
    "rssi":"-74",
    "observed_interval":"-1",
    "flags":"none",
    "movement":"none",
    "oem_data":"not advertised",
    "hex_data":"00001803-494c-4f47-4943-544543480000",
    "resolvable":"PUBLIC",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:05:15 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:05:16 am [CMD-PUBL]   [passed filter] data: F0:25:31:CF:2F:9C pdu: SCAN_RSP rssi: -74 dBm flags: none man: Unknown delay: 0
[+] 0.2.197 13-01-2020 09:05:19 am [CMD-RAND]   [passed filter] data: FD:15:21:9D:99:A3 pdu: ADV_NONCONN_IND rssi: -66 dBm flags: none man: Apple, Inc. delay: 2
[+] 0.2.197 13-01-2020 09:05:24 am [CMD-PUBL]   FC:03:9F:F1:52:23 [TV] Samsung 7 Series (43) Samsung Electronics Co. Ltd. -94 dBm
[+] 0.2.197 13-01-2020 09:05:25 am [CMD-MQTT]   monitor/moni/FC:03:9F:F1:52:23
 {
    "id":"FC:03:9F:F1:52:23",
    "confidence":"100",
    "name":"[TV] Samsung 7 Series (43)",
    "manufacturer":"Samsung Electronics Co. Ltd.",
    "type":"GENERIC_BEACON_PUBLIC",
    "report_delay":"0",
    "rssi":"-94",
    "observed_interval":"-1",
    "flags":"none",
    "movement":"none",
    "oem_data":"not advertised",
    "hex_data":"4204018060fc039ff15223fe039ff1522201000000000000",
    "resolvable":"PUBLIC",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:05:24 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:05:25 am [CMD-PUBL]   [passed filter] data: FC:03:9F:F1:52:23 pdu: ADV_NONCONN_IND rssi: -94 dBm flags: none man: Samsung Electronics Co. Ltd. delay: 0
[+] 0.2.197 13-01-2020 09:06:09 am [CMD-BEAC]   F0:25:31:CF:2F:9C FDA50693-A4E2-4FB1-AFCF-C6EB07647825 5 6 RDL51822
[+] 0.2.197 13-01-2020 09:06:10 am [CMD-MQTT]   monitor/moni/FDA50693-A4E2-4FB1-AFCF-C6EB07647825-5-6
 {
    "id":"FDA50693-A4E2-4FB1-AFCF-C6EB07647825-5-6",
    "confidence":"100",
    "name":"RDL51822",
    "type":"APPLE_IBEACON",
    "rssi":"-85",
    "mac":"F0:25:31:CF:2F:9C",
    "report_delay":"0",
    "observed_interval":"60",
    "power":"-80",
    "movement":"slow movement depart",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:06:09 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:06:10 am [CMD-PUBL]   F0:25:31:CF:2F:9C RDL51822 unknown -85 dBm
[+] 0.2.197 13-01-2020 09:06:11 am [CMD-MQTT]   monitor/moni/F0:25:31:CF:2F:9C
 {
    "id":"F0:25:31:CF:2F:9C",
    "confidence":"100",
    "name":"RDL51822",
    "manufacturer":"unknown",
    "type":"GENERIC_BEACON_PUBLIC",
    "report_delay":"0",
    "observed_interval":"60",
    "rssi":"-85",
    "flags":"",
    "movement":"slow movement depart",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:06:10 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:06:19 am [CMD-RAND]   [passed filter] data: 5F:5A:B8:FA:0F:C0 pdu: ADV_SCAN_IND rssi: -59 dBm flags: none man: Google delay: 0
[+] 0.2.197 13-01-2020 09:06:19 am [CMD-RAND]   [passed filter] data: 5C:E4:98:38:41:74 pdu: ADV_SCAN_IND rssi: -70 dBm flags: none man: Google delay: 2
[+] 0.2.197 13-01-2020 09:07:24 am [CMD-RAND]   [passed filter] data: 4F:59:5A:E0:56:13 pdu: ADV_IND rssi: -68 dBm flags: 0x1a man: Apple, Inc. delay: 0
[+] 0.2.197 13-01-2020 09:07:52 am [CMD-MQTT]   monitor/moni/FC:03:9F:F1:52:23
 {
    "id":"FC:03:9F:F1:52:23",
    "confidence":"83",
    "last_seen":"1578906392",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:07:52 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:07:56 am [CMD-MQTT]   monitor/moni/FC:03:9F:F1:52:23
 {
    "id":"FC:03:9F:F1:52:23",
    "confidence":"80",
    "last_seen":"1578906392",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:07:56 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:08:11 am [DEL-PUBL]   PUBL FC:03:9F:F1:52:23 expired after 99 seconds
[+] 0.2.197 13-01-2020 09:08:12 am [CMD-MQTT]   monitor/moni/FC:03:9F:F1:52:23
 {
    "id":"FC:03:9F:F1:52:23",
    "confidence":"0",
    "last_seen":"1578906392",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:08:11 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:08:19 am [CMD-RSSI]   PUBL FC:03:9F:F1:52:23 RSSI: -90 dBm (initial reading | 110 dBm)
[+] 0.2.197 13-01-2020 09:08:19 am [CMD-PUBL]   FC:03:9F:F1:52:23 [TV] Samsung 7 Series (43) Samsung Electronics Co. Ltd. -90 dBm
[+] 0.2.197 13-01-2020 09:08:20 am [CMD-MQTT]   monitor/moni/FC:03:9F:F1:52:23
 {
    "id":"FC:03:9F:F1:52:23",
    "confidence":"100",
    "name":"[TV] Samsung 7 Series (43)",
    "manufacturer":"Samsung Electronics Co. Ltd.",
    "type":"GENERIC_BEACON_PUBLIC",
    "report_delay":"0",
    "rssi":"-90",
    "observed_interval":"-1",
    "flags":"none",
    "movement":"initial reading",
    "oem_data":"not advertised",
    "hex_data":"4204018060fc039ff15223fe039ff1522201000000000000",
    "resolvable":"PUBLIC",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:08:19 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:08:20 am [CMD-PUBL]   [passed filter] data: FC:03:9F:F1:52:23 pdu: ADV_NONCONN_IND rssi: -90 dBm flags: none man: Samsung Electronics Co. Ltd. delay: 0
[+] 0.2.197 13-01-2020 09:08:32 am [CMD-PUBL]   D0:29:9C:64:0E:EA Xiaomi Band 3 Anhui Huami Information Technology Co. -53 dBm
[+] 0.2.197 13-01-2020 09:08:33 am [CMD-MQTT]   monitor/moni/D0:29:9C:64:0E:EA
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"100",
    "name":"Xiaomi Band 3",
    "manufacturer":"Anhui Huami Information Technology Co.",
    "type":"GENERIC_BEACON_PUBLIC",
    "report_delay":"0",
    "rssi":"-53",
    "observed_interval":"-1",
    "flags":"none",
    "movement":"stationary",
    "oem_data":"Anhui Huami Information Technology Co.",
    "hex_data":"e9000000",
    "resolvable":"PUBLIC",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:08:32 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:08:33 am [CMD-PUBL]   [passed filter] data: D0:29:9C:64:0E:EA pdu: SCAN_RSP rssi: -53 dBm flags: none man: Anhui Huami Information Technology Co. delay: 0
[+] 0.2.197 13-01-2020 09:08:34 am [DEL-RAND]   RAND FD:15:21:9D:99:A3 expired after 131 seconds
[+] 0.2.197 13-01-2020 09:09:36 am [DEL-RAND]   RAND 5C:E4:98:38:41:74 expired after 197 seconds
[+] 0.2.197 13-01-2020 09:09:44 am [CMD-RAND]   [passed filter] data: FD:15:21:9D:99:A3 pdu: ADV_NONCONN_IND rssi: -57 dBm flags: none man: Apple, Inc. delay: 18
[+] 0.2.197 13-01-2020 09:11:34 am [CMD-RAND]   [passed filter] data: 5C:E4:98:38:41:74 pdu: SCAN_RSP rssi: -70 dBm flags: none man: Google delay: 1
[+] 0.2.197 13-01-2020 09:11:54 am [CMD-MQTT]   monitor/moni/D0:29:9C:64:0E:EA
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"49",
    "last_seen":"1578906581",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:11:52 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:11:57 am [CMD-MQTT]   monitor/moni/D0:29:9C:64:0E:EA
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"47",
    "last_seen":"1578906581",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:11:56 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:12:13 am [CMD-MQTT]   monitor/moni/FC:03:9F:F1:52:23
 {
    "id":"FC:03:9F:F1:52:23",
    "confidence":"64",
    "last_seen":"1578906588",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:12:12 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:12:13 am [CMD-MQTT]   monitor/moni/D0:29:9C:64:0E:EA
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"40",
    "last_seen":"1578906581",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:12:13 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:12:17 am [CMD-MQTT]   monitor/moni/FC:03:9F:F1:52:23
 {
    "id":"FC:03:9F:F1:52:23",
    "confidence":"62",
    "last_seen":"1578906588",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:12:16 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:12:18 am [CMD-MQTT]   monitor/moni/D0:29:9C:64:0E:EA
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"38",
    "last_seen":"1578906581",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:12:17 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:12:32 am [CMD-MQTT]   monitor/moni/FC:03:9F:F1:52:23
 {
    "id":"FC:03:9F:F1:52:23",
    "confidence":"52",
    "last_seen":"1578906588",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:12:32 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:12:32 am [CMD-MQTT]   monitor/moni/D0:29:9C:64:0E:EA
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"32",
    "last_seen":"1578906581",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:12:32 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:12:33 am [CMD-MQTT]   monitor/moni/FC:03:9F:F1:52:23
 {
    "id":"FC:03:9F:F1:52:23",
    "confidence":"50",
    "last_seen":"1578906588",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:12:33 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:12:34 am [CMD-MQTT]   monitor/moni/D0:29:9C:64:0E:EA
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"31",
    "last_seen":"1578906581",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:12:33 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:12:37 am [CMD-MQTT]   monitor/moni/FC:03:9F:F1:52:23
 {
    "id":"FC:03:9F:F1:52:23",
    "confidence":"48",
    "last_seen":"1578906588",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:12:36 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:12:39 am [CMD-MQTT]   monitor/moni/D0:29:9C:64:0E:EA
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"29",
    "last_seen":"1578906581",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:12:37 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:12:41 am [CMD-PUBL]   FC:03:9F:F1:52:23 [TV] Samsung 7 Series (43) Samsung Electronics Co. Ltd. -92 dBm
[+] 0.2.197 13-01-2020 09:12:42 am [CMD-MQTT]   monitor/moni/FC:03:9F:F1:52:23
 {
    "id":"FC:03:9F:F1:52:23",
    "confidence":"100",
    "name":"[TV] Samsung 7 Series (43)",
    "manufacturer":"Samsung Electronics Co. Ltd.",
    "type":"GENERIC_BEACON_PUBLIC",
    "report_delay":"0",
    "rssi":"-92",
    "observed_interval":"180",
    "flags":"none",
    "movement":"slow movement depart",
    "oem_data":"not advertised",
    "hex_data":"4204018060fc039ff15223fe039ff1522201000000000000",
    "resolvable":"PUBLIC",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:12:41 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:12:44 am [CMD-MQTT]   monitor/moni/D0:29:9C:64:0E:EA
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"26",
    "last_seen":"1578906581",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:12:43 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:12:52 am [CMD-RAND]   [passed filter] data: 7B:1B:5D:71:E2:2D pdu: ADV_IND rssi: -74 dBm flags: 0x02 man: Google delay: 1
[+] 0.2.197 13-01-2020 09:12:53 am [CMD-MQTT]   monitor/moni/D0:29:9C:64:0E:EA
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"22",
    "last_seen":"1578906581",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:12:52 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:12:57 am [CMD-MQTT]   monitor/moni/D0:29:9C:64:0E:EA
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"20",
    "last_seen":"1578906581",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:12:56 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:13:13 am [CMD-MQTT]   monitor/moni/D0:29:9C:64:0E:EA
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"13",
    "last_seen":"1578906581",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:13:12 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:13:17 am [CMD-MQTT]   monitor/moni/D0:29:9C:64:0E:EA
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"12",
    "last_seen":"1578906581",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:13:16 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:13:32 am [DEL-RAND]   RAND FD:15:21:9D:99:A3 expired after 136 seconds
[+] 0.2.197 13-01-2020 09:13:33 am [CMD-MQTT]   monitor/moni/D0:29:9C:64:0E:EA
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"0",
    "last_seen":"1578906581",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:13:32 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:13:37 am [CMD-MQTT]   monitor/moni/D0:29:9C:64:0E:EA
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"0",
    "last_seen":"1578906581",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:13:36 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:13:37 am [CMD-MQTT]   monitor/moni/D0:29:9C:64:0E:EA
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"0",
    "last_seen":"1578906581",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:13:37 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:13:50 am [DEL-PUBL]   PUBL D0:29:9C:64:0E:EA expired after 249 seconds
[+] 0.2.197 13-01-2020 09:13:50 am [CMD-MQTT]   monitor/moni/D0:29:9C:64:0E:EA
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"0",
    "last_seen":"1578906581",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:13:50 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:13:55 am [CMD-RAND]   [passed filter] data: 7B:B2:96:5B:EB:4D pdu: ADV_SCAN_IND rssi: -59 dBm flags: none man: Google delay: 0
[+] 0.2.197 13-01-2020 09:13:55 am [CMD-RAND]   [passed filter] data: 55:E3:98:B6:25:FD pdu: SCAN_RSP rssi: -70 dBm flags: none man: Google delay: 1
[+] 0.2.197 13-01-2020 09:13:57 am [CMD-PUBL]   D0:29:9C:64:0E:EA Xiaomi Band 3 Anhui Huami Information Technology Co., Ltd. -66 dBm
[+] 0.2.197 13-01-2020 09:13:58 am [CMD-MQTT]   monitor/moni/D0:29:9C:64:0E:EA
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"100",
    "name":"Xiaomi Band 3",
    "manufacturer":"Anhui Huami Information Technology Co., Ltd.",
    "type":"GENERIC_BEACON_PUBLIC",
    "report_delay":"2",
    "rssi":"-66",
    "observed_interval":"-1",
    "flags":"0x06",
    "movement":"stationary",
    "oem_data":"not advertised",
    "hex_data":"007b0f9770dd51e2bce1936b7cd8737a1903d0299c640eea",
    "resolvable":"PUBLIC",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:13:57 GMT+0000 (GMT)",
    "version":"0.2.197"

dedepene avatar Jan 13 '20 09:01 dedepene

and it keeps oscillating between 100 and 0 ....

[+] 0.2.197 13-01-2020 09:13:58 am [CMD-MQTT]   monitor/moni/D0:29:9C:64:0E:EA
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"100",
    "name":"Xiaomi Band 3",
    "manufacturer":"Anhui Huami Information Technology Co., Ltd.",
    "type":"GENERIC_BEACON_PUBLIC",
    "report_delay":"2",
    "rssi":"-66",
    "observed_interval":"-1",
    "flags":"0x06",
    "movement":"stationary",
    "oem_data":"not advertised",
    "hex_data":"007b0f9770dd51e2bce1936b7cd8737a1903d0299c640eea",
    "resolvable":"PUBLIC",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:13:57 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:13:58 am [CMD-PUBL]   [passed filter] data: D0:29:9C:64:0E:EA pdu: ADV_IND rssi: -66 dBm flags: 0x06 man: Anhui Huami Information Technology Co., Ltd. delay: 2
[+] 0.2.197 13-01-2020 09:14:36 am [DEL-RAND]   RAND 5C:E4:98:38:41:74 expired after 183 seconds
[+] 0.2.197 13-01-2020 09:14:36 am [DEL-RAND]   RAND 5F:5A:B8:FA:0F:C0 expired after 181 seconds
[+] 0.2.197 13-01-2020 09:15:00 am [CMD-RAND]   [passed filter] data: 62:46:F4:B1:17:2C pdu: ADV_SCAN_IND rssi: -53 dBm flags: none man: Google delay: 0
[+] 0.2.197 13-01-2020 09:15:53 am [DEL-RAND]   RAND 7B:1B:5D:71:E2:2D expired after 181 seconds
[+] 0.2.197 13-01-2020 09:16:33 am [CMD-MQTT]   monitor/moni/D0:29:9C:64:0E:EA
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"77",
    "last_seen":"1578906890",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:16:32 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:16:37 am [CMD-MQTT]   monitor/moni/D0:29:9C:64:0E:EA
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"75",
    "last_seen":"1578906890",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:16:36 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:16:52 am [DEL-RAND]   RAND 55:E3:98:B6:25:FD expired after 121 seconds
[+] 0.2.197 13-01-2020 09:16:52 am [DEL-RAND]   RAND 4F:59:5A:E0:56:13 expired after 187 seconds
[+] 0.2.197 13-01-2020 09:16:53 am [DEL-PUBL]   PUBL D0:29:9C:64:0E:EA expired after 122 seconds
[+] 0.2.197 13-01-2020 09:16:53 am [CMD-MQTT]   monitor/moni/D0:29:9C:64:0E:EA
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"0",
    "last_seen":"1578906890",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:16:53 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:16:57 am [DEL-RAND]   RAND 7B:B2:96:5B:EB:4D expired after 183 seconds
[+] 0.2.197 13-01-2020 09:17:12 am [CMD-RAND]   [passed filter] data: FD:15:21:9D:99:A3 pdu: ADV_NONCONN_IND rssi: -66 dBm flags: none man: Apple, Inc. delay: 0
[+] 0.2.197 13-01-2020 09:18:08 am [CMD-PUBL]   D0:29:9C:64:0E:EA Xiaomi Band 3 Anhui Huami Information Technology Co. -71 dBm
[+] 0.2.197 13-01-2020 09:18:10 am [CMD-MQTT]   monitor/moni/D0:29:9C:64:0E:EA
 {
    "id":"D0:29:9C:64:0E:EA",
    "confidence":"100",
    "name":"Xiaomi Band 3",
    "manufacturer":"Anhui Huami Information Technology Co.",
    "type":"GENERIC_BEACON_PUBLIC",
    "report_delay":"0",
    "rssi":"-71",
    "observed_interval":"-1",
    "flags":"none",
    "movement":"stationary",
    "oem_data":"Anhui Huami Information Technology Co.",
    "hex_data":"e9000000",
    "resolvable":"PUBLIC",
    "retained":"false",
    "timestamp":"Mon Jan 13 2020 09:18:08 GMT+0000 (GMT)",
    "version":"0.2.197"
 }
[+] 0.2.197 13-01-2020 09:18:10 am [CMD-PUBL]   [passed filter] data: D0:29:9C:64:0E:EA pdu: SCAN_RSP rssi: -71 dBm flags: none man: Anhui Huami Information Technology Co. delay: 0
[+] 0.2.197 13-01-2020 09:18:16 am [CMD-RAND]   [passed filter] data: 4F:59:5A:E0:56:13 pdu: ADV_IND rssi: -68 dBm flags: 0x1a man: Apple, Inc. delay: 0


dedepene avatar Jan 13 '20 09:01 dedepene

from HA perspective, where miband is the band, and keychain is an ibeacon, both sitting right next to the pi zero.

https://ibb.co/26JJw2F https://ibb.co/HDhCcY2

dedepene avatar Jan 13 '20 10:01 dedepene

Thanks. I'll see if I can find a source for this behavior.

andrewjfreyer avatar Jan 15 '20 17:01 andrewjfreyer

Here's what it looks like over a longer run. The white blobs are actual properly registered departures for my iBeacon. On top of that, it now just completely stopped registering departures :(

https://ibb.co/WKpG3nM

dedepene avatar Jan 15 '20 19:01 dedepene

I'm having same problem tracking two xiaomi mi band 3. I add the mac address of the band only in the known_beacon_addresses

At moments it work great but after a while intermittent information, this is how it looks in home assistant, using the mqtt message PREF_DEVICE_TRACKER_REPORT=true and the flag -b image

On mqtt explorer, i can see that after the AWAY state is send, after 3.66 seconds monitor again send HOME with 100% confidence. image

In this picture i was still in the same place (like 2 meters away from the raspberry W), and the AWAY state last for 62 seconds. image

If you need more information to check whats going on I will be glad to provide it.

Thanks! this script is awesome

nortuzar avatar Jan 15 '20 22:01 nortuzar

Thanks for the updated information. This is very helpful

andrewjfreyer avatar Jan 17 '20 18:01 andrewjfreyer

I'm seeing a similar behavior on the FitBit Charge 3. In addition to what has been previously reported, once monitor reports a confidence of zero (it is within two meters of the Pi Zero), I leave the room for a few minutes. When I come back, it reports the FitBit as being present with a confidence of 100. I'm not sure if the FitBit starts beaconing coincident with my arrival or if it's something else.

I have monitor running with the -b switch and empty known static and beacon files. The config files are from the initial install with the exception of the MQTT broker config.

Awesome tool! When I was looking around for something like this, there were lots of blogs and articles pointing me to your great piece of work!

georgeinva2004 avatar May 28 '20 21:05 georgeinva2004