RfidResearchGroup / ChameleonUltra

The new generation chameleon based on NRF52840 makes the performance of card emulation more stable. And gave the chameleon the ability to read, write, and decrypt cards.
https://chameleonultra.com
GNU General Public License v3.0
783 stars 137 forks source link

API request fail, param error #171

Open Markus-HL opened 9 months ago

Markus-HL commented 9 months ago

FW Version: dev-3-gf9be867 CLI connect to ChameleonUltra command: HW SLOT LIST error message after Slot 3. see picture:

grafik

doegox commented 9 months ago

Hmm as such I cannot reproduce the problem as it is probably very dependent on your user data. Could you apply the following patch on the client, without changing the firmware or data, then try again and dump the logs ? If it contains sensitive data you can send it to me by email rather than posting it here. Thank you.

diff --git a/software/script/chameleon_com.py b/software/script/chameleon_com.py
index 726b61e..16d21c0 100644
--- a/software/script/chameleon_com.py
+++ b/software/script/chameleon_com.py
@@ -186,7 +186,7 @@ class ChameleonCom:
                         if data_buffer[data_position] == self.lrc_calc(data_buffer[:data_position]):
                             # ok, lrc for data is correct.
                             # and we are receive completed
-                            # print(f"Buffer data = {data_buffer.hex()}")
+                            print(f"Buffer data = {data_buffer.hex()}")
                             if data_cmd in self.wait_response_map:
                                 # call processor
                                 if 'callback' in self.wait_response_map[data_cmd]:
@@ -222,6 +222,7 @@ class ChameleonCom:
                 task = self.send_data_queue.get(block=True, timeout=THREAD_BLOCKING_TIMEOUT)
             except queue.Empty:
                 continue
+            print(f"Buffer cmd  = {task['frame'].hex()}")
             task_cmd = task['cmd']
             task_timeout = task['timeout']
             task_close = task['close']