Commit Graph

15 Commits

Author SHA1 Message Date
tonycao
0a183e449c hostdemo: full parameter sweep + periodic RDM status polling in session_loop
After zero-pre-baked discovery, session_loop now sweeps each fixture
(DEVICE_INFO with E1.20 PD decode + raw hex, DMX_START_ADDRESS,
DEVICE_LABEL / MODEL_DESCRIPTION / SOFTWARE_VERSION / MANUFACTURER_LABEL)
with a 2-round retry for the flaky RDM window arm, prints a per-fixture
parameter summary, then enters a 6s status-poll cycle: one compact line
per fixture per cycle, address/footprint changes reported as alarms, and
playback follows a changed DMX address automatically.  Duplicate uplinks
from the flag=00/01 pair copies are deduped; the playback address list
is kept per-UID (no more duplicate control-address entries).
2026-09-14 21:04:45 +08:00
tonycao
ac6ea29db9 hostdemo: show mode runs session_loop (fix PDL=0 DUB storm, zero-pre-bake works)
Commit ab8090b emptied the show-mode 'known' fixture list (default) but
left its step state machine intact: with known.len()==0 the machine
oscillates step 0<->1 through the '_' arm, emitting malformed
DISC_UNIQUE_BRANCH frames with PDL=0 forever.  The DUT's pool proxy
correctly ignores them, so discovery never saw a single fixture.

Fix: after the AECH claim, show mode now enters session_loop() — the
verified zero-pre-baked full-space bisect (pool-answered DUBs, collision
pulses, UN_MUTE/MUTE) plus GET DEVICE_INFO and encrypted DMX playback on
the discovered addresses.  hybrid keeps the legacy template behaviour.

Bench: 3/3 fixtures discovered (0899500026c9 / 010734880900 /
010734670125), addresses 1/129/101 read back, 1386-frame DMX run —
locally and from the Windows host over udprelay.
2026-09-14 20:36:45 +08:00
Tony Cao
03d0e79268 udprelay: per-client upstream sockets (SL 30fps flood mis-routed scan replies to the wrong socket) 2026-09-14 00:49:02 +08:00
Tony Cao
ab8090be79 hostdemo: pure SL-style broadcast RDM discovery (drop hardcoded bench fixture UIDs; HOSTDEMO_KNOWN optional) 2026-09-14 00:44:55 +08:00
Tony Cao
5a68237091 hostdemo: auto source IP (arg4/HOSTDEMO_SRC), guard rdm_region rlen=0 telemetry frames 2026-09-12 00:44:42 +08:00
Tony Cao
a1c413618c fix: show-mode RDM step bounds scale with HOSTDEMO_KNOWN length (was hardcoded 3) 2026-09-11 21:18:57 +08:00
Tony Cao
ac2fed8ee4 feat: HOSTDEMO_KNOWN env to override show-mode fixture UID list (for emulated-Butler interop tests) 2026-09-11 21:17:46 +08:00
OpenCode
e03d130f0f feat: udprelay subcommand + HOSTDEMO_LISTEN env for cross-subnet host verification
- udprelay [listen] [butler_ip] [src_ip]: generic UDP/31772 relay on Windows,
  forwards client frames to Butler with spoofed source IP (default .113,
  bypasses AECH firmware filter), relays Butler replies/broadcasts back
- hostdemo: HOSTDEMO_LISTEN separates actual socket bind from advertised IP
  (Ubuntu binds 0.0.0.0:31772, frames still claim 192.168.123.113)
2026-09-11 18:37:03 +08:00
OpenCode
249cd05906 fix: build_rdm_frame checksum off-by-one (summed 1 extra byte incl. stale template checksum)
Default mode RDM discovery got 0 responses because the template-based builder's
checksum range was 0x3C..0x3C+msgLen (includes the old checksum slot) instead of
0x3C..0x53+PDL. build_rdm_frame2 was already correct (used by show mode).
2026-09-11 17:11:27 +08:00
OpenCode
2fb74a2f67 fix: default mode claim now uses proven minimal recipe; bind52/prelude default off (toxic)
Root causes found via ablation on cold Butler:
1. bind52x4 ending with 0000(unbind) -> Butler enters multi-minute AECH-refusing
   state (recovers spontaneously); now gated behind HOSTDEMO_BIND=1
2. 45s broadcast prelude also toxic (PRE=45 claim FAIL / PRE=0 PASS);
   gating hypothesis ('Butler needs 13+ announce rounds') falsified;
   HOSTDEMO_PRE default now 0
3. AECH requires announce144 identity first: skip2 (no ident) FAIL,
   per-round announce144 + claim -> PASS
4. IDENT102 patch offset bug: writing IP at 0x1C corrupted MAC high bytes
   (IP already at 0x1A in const) - patch removed
5. Claim wait loop now drains socket buffer and uses 700ms wall clock
   (was 10x5ms recv which expired on buffered self-broadcasts)
2026-09-11 16:50:26 +08:00
OpenCode
c555a2252f feat: show mode claim frame now fully self-constructed (zero opaque blocks)
build_claim_frame(): 552B AECH claim from scratch - envelope + host IP/MAC +
AECH + zeroed opaque regions + nonce@0x88 + B12@0x8C. Verified on real Butler:
AERE PASS, 3 fixtures online. Show mode no longer needs claim_h112 template.
2026-09-11 15:03:09 +08:00
OpenCode
44ff080ae6 feat: decode remaining frame fields (claim/AERE/announce/discovery-resp/EUCE/events)
- claim 552B: full layout; 240B opaque blocks proven UNCHECKED by Butler
  (CLAIM_ZERO=1 ablation: zeroed blocks -> AERE still PASS) -> claim can be
  built from scratch with zeros
- AERE 552B: Butler IP/MAC/netmask, fixture UID@0x33, slow counter@0xB1/0xB5,
  resp@0xC0; only resp+counter vary across captures
- announce 644B: session GUID, UTF-16BE show-file path, full timestamp
  @0x239 (y/mo/d/h/mi/s/ms; live sample decodes to 22:52:50.992 matching SL
  session), ephemeral port@0x25C, enable flags
- discovery-resp 217B: device name, serial blob, network block, config block
- EUCE 540B: 'EUCE' magic, version 5, username+computername+GUID, host MAC
- event_b: type=4 1084B RDM-uplink frame identified (RDM response @0x3C)
- analyze: new 'xor' subcommand with periodicity analysis
2026-09-11 14:49:39 +08:00
OpenCode
8938b15691 fix: dual-port DMX output in show mode; AERE claim verification; SHOW_DIAG mode
- Root cause of 'steady white': fixture on Butler port2, our data only went to port1
  (port data regions are independent: port1 @0x3C, port2 @0x23C)
- show mode now mirrors pattern to both ports; SHOW_DIAG=1 gives 3s off/on blink test
- Claim now verifies AERE response and warns on failure
- Docs updated with port layout note; README updated
2026-09-11 13:53:21 +08:00
OpenCode
9be449fda8 feat: crack all DMX/RDM frame fields; show mode now fully self-constructed
- analyze subcommand: offline replay/template field variance, diff, counter analysis
- DMX header fully decoded: port mask @0x20, port lens u16LE=512 @0x34/0x36, counter +1/frame
- RDM request frame fully decoded: counter=0, 0x20=02, 0x2A=0xCC, msgLen=24+PDL,
  checksum=0xCC+sum(0x3C..0x53+PDL) @0x53+PDL, pair copy rules
- Fix historical misreadings: RDM always starts @0x3C (not variable); no session-level
  frame check exists - earlier failures were wrong template + checksum off-by-one
- show mode: build_dmx_frame/build_rdm_frame2/rdm_pair_copy, zero template dependency
- Decode 47B register response and 42B event frames; doc enet_protocol_current.md rewritten
2026-09-11 12:53:36 +08:00
OpenCode
9995335d74 feat: show mode for standalone 1-32 rainbow DMX + RDM status polling
- Merge show/hybrid paths: use dmx_a template for DMX payload and replay-extracted SL frame skeleton for RDM.
- HOSTDEMO_MODE=show runs indefinitely when secs=0; wave period slowed for smoother breathing.
- Update README with show mode usage.
2026-09-11 12:03:43 +08:00