gave 14b commands some serious love and overhaul. package handling for APDU and different selects is improved. return codes now consequent

This commit is contained in:
iceman1001 2024-01-08 21:17:42 +01:00
commit 82aa6ac08c
11 changed files with 350 additions and 337 deletions

View file

@ -30,6 +30,7 @@ Check there for details about data format and how commands are interpreted on th
device-side.
]]
-- iceman, todo: return payload from ISO14b APDU is a struct now. iso14b_raw_apdu_response_t
local function mobib_parse(result)
if result.Oldarg0 >= 0 then
local len = result.Oldarg0 * 2
@ -126,7 +127,7 @@ local function mobib_send_cmd_raw(data, ignoreresponse )
local result, err = c:sendNG(ignoreresponse, 2000)
if result then
if result.Oldarg0 >= 0 then
if result.status == PM3_SUCCESS then
return mobib_parse(result)
else
err = 'card response failed'