mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
Improved error handling
This commit is contained in:
parent
30a46ed86a
commit
ea833d39ff
1 changed files with 5 additions and 1 deletions
|
@ -74,7 +74,11 @@ local library = {
|
||||||
command = Command:new{cmd = cmds.CMD_READER_ISO_14443a,
|
command = Command:new{cmd = cmds.CMD_READER_ISO_14443a,
|
||||||
arg1 = ISO14A_COMMAND.ISO14A_CONNECT}
|
arg1 = ISO14A_COMMAND.ISO14A_CONNECT}
|
||||||
|
|
||||||
core.SendCommand(command:getBytes())
|
err = core.SendCommand(command:getBytes())
|
||||||
|
if err then
|
||||||
|
print(err)
|
||||||
|
return nil, err
|
||||||
|
end
|
||||||
local result = core.WaitForResponseTimeout(cmds.CMD_ACK,TIMEOUT)
|
local result = core.WaitForResponseTimeout(cmds.CMD_ACK,TIMEOUT)
|
||||||
if result then
|
if result then
|
||||||
local count,cmd,arg0,arg1,arg2 = bin.unpack('LLLL',result)
|
local count,cmd,arg0,arg1,arg2 = bin.unpack('LLLL',result)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue