Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linbfc
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
Debian
linbfc
Commits
f0471ebc
Commit
f0471ebc
authored
Jun 13, 2013
by
Philippe Teuwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
acr122_usb: capture more specifically the expected error SW=637f
parent
7638e9ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
libnfc/drivers/acr122_usb.c
libnfc/drivers/acr122_usb.c
+8
-1
No files found.
libnfc/drivers/acr122_usb.c
View file @
f0471ebc
...
...
@@ -187,6 +187,9 @@ struct acr122_usb_data {
// ISO 7816-4
#define SW1_More_Data_Available 0x61
#define SW1_Warning_with_NV_changed 0x63
#define PN53x_Specific_Application_Level_Error_Code 0x7f
// This frame template is copied at init time
// Its designed for TAMA sending but is also used for simple ADPU frame: acr122_build_frame_from_apdu() will overwrite needed bytes
...
...
@@ -653,7 +656,11 @@ read:
return
pnd
->
last_error
;
}
if
(
abtRxBuf
[
10
]
!=
SW1_More_Data_Available
)
{
log_put
(
LOG_GROUP
,
LOG_CATEGORY
,
NFC_LOG_PRIORITY_ERROR
,
"Unexpected Status Word (SW1: %02x SW2: %02x)"
,
abtRxBuf
[
10
],
abtRxBuf
[
11
]);
if
((
abtRxBuf
[
10
]
==
SW1_Warning_with_NV_changed
)
&&
(
abtRxBuf
[
11
]
==
PN53x_Specific_Application_Level_Error_Code
))
{
log_put
(
LOG_GROUP
,
LOG_CATEGORY
,
NFC_LOG_PRIORITY_ERROR
,
"PN532 has detected an error at the application level"
);
}
else
{
log_put
(
LOG_GROUP
,
LOG_CATEGORY
,
NFC_LOG_PRIORITY_ERROR
,
"Unexpected Status Word (SW1: %02x SW2: %02x)"
,
abtRxBuf
[
10
],
abtRxBuf
[
11
]);
}
pnd
->
last_error
=
NFC_EIO
;
return
pnd
->
last_error
;
}
...
...
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