OLD/MIX convert to NG: Phase D. reworked all lua scripts to handle and behavie same way. Thanks Claude

This commit is contained in:
iceman1001 committed 2026-08-29 16:31:01 +02:00
1 parent 24a9a686ea
commit bd20f7cc81
18 files changed
+249 -248

No files matched your search

+5 -9
View File
@@ -100,14 +100,9 @@ function sendRaw(rawdata, options)
+ lib14a.ISO14A_COMMAND.ISO14A_APPEND_CRC
+ lib14a.ISO14A_COMMAND.ISO14A_NO_RATS
local command = Command:newMIX{cmd = cmds.CMD_HF_ISO14443A_READER,
arg1 = flags, -- Send raw
-- arg2 contains the length, which is half the length
-- of the ASCII-string rawdata
arg2 = string.len(rawdata)/2,
data = rawdata}
local command = Command:newRaw{ tech = '14a', flags = flags, data = rawdata }
return command:sendMIX(options.ignore_response)
return command:sendNG(options.ignore_response)
end
---
-- The main entry point
@@ -146,8 +141,9 @@ function main(args)
return oops(err)
end
local cmd_response = Command.parse(res)
local len = tonumber(cmd_response.arg1) * 2
local _rlen, _sel, _raw = parseRaw('14a', res)
local cmd_response = { arg1 = _rlen or 0, data = tohex(_raw or '') }
local len = (_rlen or 0) * 2
local data = string.sub(tostring(cmd_response.data), 0, len-4)
showdata(block, data)