From d2c1f43a0e21bbfaa5de4c175e0c2f61c2f68ebb Mon Sep 17 00:00:00 2001 From: Zhong Jianxin Date: Wed, 6 May 2026 20:53:50 +0800 Subject: [PATCH] fix: hf14a_raw should return data bytes, not Response object Callers treat the return value as bytes (len(), slicing), but hf14a_raw was returning the Response object itself, causing TypeError. --- software/script/chameleon_cmd.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/software/script/chameleon_cmd.py b/software/script/chameleon_cmd.py index d28fd43..1f3c320 100644 --- a/software/script/chameleon_cmd.py +++ b/software/script/chameleon_cmd.py @@ -371,8 +371,7 @@ class ChameleonCMD: data = bytes(cs)+struct.pack(f'!HH{len(data)}s', resp_timeout_ms, bitlen, bytearray(data)) resp = self.device.send_cmd_sync(Command.HF14A_RAW, data, timeout=(resp_timeout_ms // 1000) + 1) - resp.parsed = resp.data - return resp + return resp.data @expect_response(Status.HF_TAG_OK) def mf1_manipulate_value_block(self, src_block, src_type: MfcKeyType, src_key, operator: MfcValueBlockOperator, operand, dst_block, dst_type: MfcKeyType, dst_key):