Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NFCTestmo
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chongjin
NFCTestmo
Commits
0d739701
Commit
0d739701
authored
Nov 22, 2022
by
Chongjin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
动态锁测试
parent
f6640635
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
.idea/vcs.xml
.idea/vcs.xml
+6
-0
app/src/main/java/com/hnty/nfctestdemo/activity/MainActivity.java
...main/java/com/hnty/nfctestdemo/activity/MainActivity.java
+8
-0
No files found.
.idea/vcs.xml
0 → 100644
View file @
0d739701
<?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
app/src/main/java/com/hnty/nfctestdemo/activity/MainActivity.java
View file @
0d739701
...
...
@@ -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
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment