feat(rawcli): finish T5577 catalog — page/password, RESET, hex data words
Round out the ATA5577C command set to the datasheet-catalog standard: - RESET command (downlink opcode 00), backed by a new lf.t55.reset() that drives CMD_LF_T55XX_RESET_READ. Hardware-validated (status 0). - READ/WRITE gain optional <page> (1 = traceability) and <password> for password-mode access, threaded through read_config / read_t55xx_block. - WRITE data and all passwords now parse as hex words (like the pm3 client's -d/-p and every other rawcli WRITE); blocks/pages stay decimal. Previously T5577 WRITE data alone was base-10, so WRITE(0, 00088040) wrote decimal. Live-validated on a T5577 emulating EM4100 00FFFFFFFF: DETECT/READ(0) decode the config 00148040 (ASK/RF64/EM4100), RESET/WAKE return ok. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -69,6 +69,16 @@ def test_lf_t55_wakeup():
|
||||
assert pwd == 0x11223344
|
||||
assert flags == (3 << 3)
|
||||
|
||||
def test_lf_t55_reset():
|
||||
t = AsyncMock()
|
||||
lf = LFCommands(t)
|
||||
t.send_ng.return_value = make_response(Cmd.LF_T55XX_RESET_READ, 0, b"")
|
||||
asyncio.get_event_loop().run_until_complete(lf.t55.reset(downlink_mode=2))
|
||||
cmd, payload = t.send_ng.call_args.args[0], t.send_ng.call_args.args[1]
|
||||
assert cmd == Cmd.LF_T55XX_RESET_READ
|
||||
# single flags byte carrying downlink_mode<<3
|
||||
assert payload == struct.pack("<B", 2 << 3)
|
||||
|
||||
def test_lf_t55_config_client_side():
|
||||
t = AsyncMock()
|
||||
lf = LFCommands(t)
|
||||
|
||||
Reference in New Issue
Block a user