mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
FIX: the test scripts hade a problem when sending the new configuration block.
This commit is contained in:
parent
5ac81d0f58
commit
aa77d2b125
4 changed files with 11 additions and 6 deletions
|
@ -95,6 +95,7 @@ end
|
||||||
|
|
||||||
function test()
|
function test()
|
||||||
local y
|
local y
|
||||||
|
local block = "00"
|
||||||
for y = 0x0, 0x1d, 0x4 do
|
for y = 0x0, 0x1d, 0x4 do
|
||||||
for _ = 1, #procedurecmds do
|
for _ = 1, #procedurecmds do
|
||||||
local pcmd = procedurecmds[_]
|
local pcmd = procedurecmds[_]
|
||||||
|
@ -107,7 +108,7 @@ function test()
|
||||||
dbg(('lf t55xx write 0 %s'):format(config))
|
dbg(('lf t55xx write 0 %s'):format(config))
|
||||||
config = tonumber(config,16)
|
config = tonumber(config,16)
|
||||||
|
|
||||||
local writecmd = Command:new{cmd = cmds.CMD_T55XX_WRITE_BLOCK, arg1 = config}
|
local writecmd = Command:new{cmd = cmds.CMD_T55XX_WRITE_BLOCK,arg1 = config, arg2 = block, arg3 = "00", data = "00"}
|
||||||
local err = core.SendCommand(writecmd:getBytes())
|
local err = core.SendCommand(writecmd:getBytes())
|
||||||
if err then return oops(err) end
|
if err then return oops(err) end
|
||||||
local response = core.WaitForResponseTimeout(cmds.CMD_ACK,TIMEOUT)
|
local response = core.WaitForResponseTimeout(cmds.CMD_ACK,TIMEOUT)
|
||||||
|
|
|
@ -89,6 +89,7 @@ end
|
||||||
|
|
||||||
function test()
|
function test()
|
||||||
local y
|
local y
|
||||||
|
local block = "00"
|
||||||
for y = 1, 0x1D, 4 do
|
for y = 1, 0x1D, 4 do
|
||||||
for _ = 1, #procedurecmds do
|
for _ = 1, #procedurecmds do
|
||||||
local pcmd = procedurecmds[_]
|
local pcmd = procedurecmds[_]
|
||||||
|
@ -99,8 +100,9 @@ function test()
|
||||||
|
|
||||||
local config = pcmd:format(config1, y, config2)
|
local config = pcmd:format(config1, y, config2)
|
||||||
dbg(('lf t55xx write 0 %s'):format(config))
|
dbg(('lf t55xx write 0 %s'):format(config))
|
||||||
|
|
||||||
local writecmd = Command:new{cmd = cmds.CMD_T55XX_WRITE_BLOCK, arg1 = config ,arg2 = 0, arg3 = 0}
|
config = tonumber(config,16)
|
||||||
|
local writecmd = Command:new{cmd = cmds.CMD_T55XX_WRITE_BLOCK,arg1 = config, arg2 = block, arg3 = "00", data = "00"}
|
||||||
local err = core.SendCommand(writecmd:getBytes())
|
local err = core.SendCommand(writecmd:getBytes())
|
||||||
if err then return oops(err) end
|
if err then return oops(err) end
|
||||||
local response = core.WaitForResponseTimeout(cmds.CMD_ACK,TIMEOUT)
|
local response = core.WaitForResponseTimeout(cmds.CMD_ACK,TIMEOUT)
|
||||||
|
|
|
@ -92,6 +92,7 @@ end
|
||||||
|
|
||||||
function test(modulation)
|
function test(modulation)
|
||||||
local y
|
local y
|
||||||
|
local block = "00"
|
||||||
for y = 0x0, 0x1d, 0x4 do
|
for y = 0x0, 0x1d, 0x4 do
|
||||||
for _ = 1, #procedurecmds do
|
for _ = 1, #procedurecmds do
|
||||||
local pcmd = procedurecmds[_]
|
local pcmd = procedurecmds[_]
|
||||||
|
@ -104,7 +105,7 @@ function test(modulation)
|
||||||
dbg(('lf t55xx write 0 %s'):format(config))
|
dbg(('lf t55xx write 0 %s'):format(config))
|
||||||
|
|
||||||
config = tonumber(config,16)
|
config = tonumber(config,16)
|
||||||
local writecmd = Command:new{cmd = cmds.CMD_T55XX_WRITE_BLOCK, arg1 = config}
|
local writecmd = Command:new{cmd = cmds.CMD_T55XX_WRITE_BLOCK,arg1 = config, arg2 = block, arg3 = "00", data = "00"}
|
||||||
local err = core.SendCommand(writecmd:getBytes())
|
local err = core.SendCommand(writecmd:getBytes())
|
||||||
if err then return oops(err) end
|
if err then return oops(err) end
|
||||||
local response = core.WaitForResponseTimeout(cmds.CMD_ACK,TIMEOUT)
|
local response = core.WaitForResponseTimeout(cmds.CMD_ACK,TIMEOUT)
|
||||||
|
|
|
@ -108,6 +108,7 @@ end
|
||||||
function test(modulation)
|
function test(modulation)
|
||||||
local bitrate
|
local bitrate
|
||||||
local clockrate
|
local clockrate
|
||||||
|
local block = "00"
|
||||||
for bitrate = 0x0, 0x1d, 0x4 do
|
for bitrate = 0x0, 0x1d, 0x4 do
|
||||||
|
|
||||||
for clockrate = 0,8,4 do
|
for clockrate = 0,8,4 do
|
||||||
|
@ -125,8 +126,8 @@ function test(modulation)
|
||||||
dbg(('lf t55xx write 0 %s'):format(config))
|
dbg(('lf t55xx write 0 %s'):format(config))
|
||||||
|
|
||||||
config = tonumber(config,16)
|
config = tonumber(config,16)
|
||||||
local writecommand = Command:new{cmd = cmds.CMD_T55XX_WRITE_BLOCK, arg1 = config ,arg2 = 0, arg3 = 0}
|
local writecmd = Command:new{cmd = cmds.CMD_T55XX_WRITE_BLOCK,arg1 = config, arg2 = block, arg3 = "00", data = "00"}
|
||||||
local err = core.SendCommand(writecommand:getBytes())
|
local err = core.SendCommand(writecmd:getBytes())
|
||||||
if err then return oops(err) end
|
if err then return oops(err) end
|
||||||
local response = core.WaitForResponseTimeout(cmds.CMD_ACK,TIMEOUT)
|
local response = core.WaitForResponseTimeout(cmds.CMD_ACK,TIMEOUT)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue