fix: update MiniMateClient to use browse=False for 1F in download mode to ensure correct token handling for 5A

This commit is contained in:
2026-04-06 13:39:11 -04:00
parent d0d5a18d5c
commit 33de4239f4
2 changed files with 15 additions and 12 deletions
+7 -2
View File
@@ -326,11 +326,16 @@ class MiniMateClient:
)
# SUB 1F — advance BEFORE 5A (matches BW sequence from 4-2-26 capture).
# MUST use browse=False (token=0xFE) — BW always sends 1F(token=0xFE) in
# download mode. The device's 5A state machine requires the download-mode
# token here to arm the bulk stream; browse-mode (all-zero) token causes
# the device to ignore the subsequent 5A probe.
# Confirmed from 4-2-26 capture frames 66-67 vs frame 74.
# Save next key now; 5A will still use cur_key.
try:
key4, data8 = proto.advance_event(browse=True)
key4, data8 = proto.advance_event(browse=False)
log.info(
"get_events: 1F → key=%s trailing=%s",
"get_events: 1F(download) → key=%s trailing=%s",
key4.hex(), data8[4:8].hex(),
)
except ProtocolError as exc: