fix: update event handling in MiniMateClient and protocol to ensure correct sequence for waveform downloads
This commit is contained in:
@@ -194,20 +194,33 @@ there is only one event.
|
||||
0A(key0) ← REQUIRED: establishes device context
|
||||
1E(token=0xFE) ← REQUIRED: arms device for 5A; CONFIRMED 4-2-26 + 4-3-26
|
||||
0C(key0) ← read waveform record
|
||||
5A(key0) ← bulk stream (metadata or full waveform)
|
||||
1F(all zeros / browse=True) → key1
|
||||
1F(all zeros / browse=True) → key1 ← MUST come BEFORE 5A (BW sequence, confirmed 4-2-26)
|
||||
POLL × 3 ← REQUIRED: 3 full POLL cycles before 5A (BW frames 68-73)
|
||||
5A(key0) ← bulk stream; key0 used even though 1F already advanced
|
||||
0A(key1)
|
||||
1E(token=0xFE) ← re-arm for next event's 5A
|
||||
0C(key1)
|
||||
1F(all zeros) → key2
|
||||
POLL × 3
|
||||
5A(key1)
|
||||
1F(all zeros) → null ← done
|
||||
```
|
||||
|
||||
**The 1E(token=0xFE) arm step is the root cause of the 5A timeout (FIXED 2026-04-06):**
|
||||
**The 1E(token=0xFE) arm step is required (FIXED 2026-04-06):**
|
||||
The device silently ignores all 5A probe frames unless a second SUB 1E with token=0xFE
|
||||
has been issued between 0A and 0C. This step is present in EVERY download cycle in both
|
||||
the 4-2-26 and 4-3-26 BW TX captures. Without it, `read_bulk_waveform_stream()` blocks
|
||||
for the full 120 s timeout.
|
||||
the 4-2-26 and 4-3-26 BW TX captures.
|
||||
|
||||
**1F must come BEFORE 5A (FIXED 2026-04-06):**
|
||||
BW always calls 1F (advance event) before starting the 5A bulk stream. 5A still uses the
|
||||
pre-advance key — the device streams the waveform for the key that was set up with 0A+1E-arm+0C
|
||||
even after 1F has moved the internal pointer to the next event.
|
||||
|
||||
**POLL × 3 required before 5A (FIXED 2026-04-06):**
|
||||
BW sends exactly 3 complete POLL (SUB 5B) probe+data cycles between the last 1F and the
|
||||
first 5A probe frame. Confirmed from 4-2-26 BW TX capture frames 68-73. Without these
|
||||
POLLs the device does not respond to the 5A probe. Use `proto.poll()` (not `startup()` —
|
||||
`startup()` drains the boot string, which is only needed on initial connect).
|
||||
|
||||
`advance_event(browse=True)` sends all-zero params; `advance_event()` default (browse=False)
|
||||
sends token=0xFE and is NOT used by any caller.
|
||||
|
||||
Reference in New Issue
Block a user