more fixes

This commit is contained in:
iceman1001 2019-12-19 22:11:35 +01:00
parent d3723c2649
commit 72d51a7774

View file

@ -8,7 +8,7 @@ author = 'Kevin'
version = 'v1.0.1' version = 'v1.0.1'
desc = [[ desc = [[
This is a script that reads LTO-CM ISO14443a tags. This is a script that reads LTO-CM ISO14443a tags.
It starts from block 0 and ends at default block 20. It starts from block 0 and ends at default block 254.
]] ]]
example = [[ example = [[
-- default -- default
@ -82,7 +82,6 @@ local function sendRaw(rawdata, options)
local arg2 = #rawdata / 2 local arg2 = #rawdata / 2
if options.bits7 then if options.bits7 then
arg2 = arg2 + tonumber(lshift(7, 16)) arg2 = arg2 + tonumber(lshift(7, 16))
print('bit 7:', ("%08x %08x"):format(flags, arg2))
end end
local command = Command:newMIX{cmd = cmds.CMD_HF_ISO14443A_READER, local command = Command:newMIX{cmd = cmds.CMD_HF_ISO14443A_READER,
@ -145,7 +144,7 @@ function main(args)
-- Wakeup -- Wakeup
local payload = "45" local payload = "45"
local res, err = send(payload,{connect = true, no_select = true, ignore_response = false, append_crc = false, bits7 = true}) local res, err = send(payload,{connect = true, no_select = true, ignore_response = false, append_crc = false, bits7 = true})
if not err then return end if err then return end
-- start selecting -- start selecting
payload = "9320" payload = "9320"
@ -170,11 +169,12 @@ function main(args)
res, err = send(payload , {ignore_response = false, append_crc = true}) res, err = send(payload , {ignore_response = false, append_crc = true})
if err then return end if err then return end
local data = getdata(res)
payload = "80" payload = "80"
res, err = send(payload, {ignore_response = true, append_crc = false}) res, err = send(payload, {ignore_response = true, append_crc = false})
if err then return end if err then return end
local data = getdata(res)
print(block, data) print(block, data)
table.insert(block_data, data) table.insert(block_data, data)
end end