Commit 0d739701 authored by Chongjin's avatar Chongjin

动态锁测试

parent f6640635
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
......@@ -470,6 +470,8 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
Log.i(TAG, "pwdAuth--res: " + ByteArrayToHexString(response));
tvFastReadRes.append("pwdAuth--res: " + ByteArrayToHexString(response) + "\r\n");
//密码认证可以通过
//动态锁
// byte[] SELECT3 = new byte[6];
// SELECT3[0] = (byte) 0xA2; // WRITE
......@@ -495,6 +497,7 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
byte[] response6 = nfcA.transceive(SELECT6);
Log.i(TAG, "pwdAuth--res: " + ByteArrayToHexString(response6));
tvFastReadRes.append("pwdAuth--PACK--res: " + ByteArrayToHexString(response6) + "\r\n");
//成功设置
//设置PWD
byte[] SELECT7 = new byte[6];
......@@ -508,6 +511,7 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
byte[] response7 = nfcA.transceive(SELECT7);
Log.i(TAG, "pwdAuth--res: " + ByteArrayToHexString(response7));
tvFastReadRes.append("pwdAuth--PWD--res: " + ByteArrayToHexString(response7) + "\r\n");
//成功设置
//设置密码错误次数限制
byte[] SELECT4 = new byte[6];
......@@ -523,6 +527,7 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
byte[] response4 = nfcA.transceive(SELECT4);
Log.i(TAG, "pwdAuth--res: " + ByteArrayToHexString(response4));
tvFastReadRes.append("pwdAuth--AUTHLIM--res: " + ByteArrayToHexString(response4) + "\r\n");
//错误次数设置为7
//设置密码验证页数
byte[] SELECT5 = new byte[6];
......@@ -537,6 +542,9 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
byte[] response5 = nfcA.transceive(SELECT5);
Log.i(TAG, "openPwdAuth--res: " + ByteArrayToHexString(response5));
tvFastReadRes.append("pwdAuth--AUTH0--res: " + ByteArrayToHexString(response5) + "\r\n");
//设置成功
//结论:设置页后没有作用,照样可读,动态锁锁定后无法解锁
}
nfcA.close();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment