Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorquantum-x <simon.yorkston@gmail.com>2022-06-30 17:47:08 +0300
committerGitHub <noreply@github.com>2022-06-30 17:47:08 +0300
commit8632c77d68e4129effef60b1ad8d839995f9134b (patch)
tree979e8925a41891a8c77793646048c3262778fda4 /lib
parent8b988e2b17ec512505f7c9362794e82ff49fe17d (diff)
1342 add mifare infineon (#1346)
* Adding MIFARE 1K Infineon Compatibility As per Issue #1342, MIFARE Classic 1K Cards from NXP have the SAK value of 0x08. MIFARE Classic 1K Cards from Infineon have an SAK value of 0x88. Adding the SAK values accordingly so that Infineon tags are properly handled.
Diffstat (limited to 'lib')
-rw-r--r--lib/nfc_protocols/mifare_classic.c4
-rw-r--r--lib/nfc_protocols/mifare_common.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/nfc_protocols/mifare_classic.c b/lib/nfc_protocols/mifare_classic.c
index b44f77cb..9dbfd9d0 100644
--- a/lib/nfc_protocols/mifare_classic.c
+++ b/lib/nfc_protocols/mifare_classic.c
@@ -198,7 +198,7 @@ static bool mf_classic_is_allowed_access(
bool mf_classic_check_card_type(uint8_t ATQA0, uint8_t ATQA1, uint8_t SAK) {
UNUSED(ATQA1);
- if((ATQA0 == 0x44 || ATQA0 == 0x04) && (SAK == 0x08)) {
+ if((ATQA0 == 0x44 || ATQA0 == 0x04) && (SAK == 0x08 || SAK == 0x88)) {
return true;
} else if((ATQA0 == 0x42 || ATQA0 == 0x02) && (SAK == 0x18)) {
return true;
@@ -219,7 +219,7 @@ bool mf_classic_get_type(
furi_assert(reader);
memset(reader, 0, sizeof(MfClassicReader));
- if((ATQA0 == 0x44 || ATQA0 == 0x04) && (SAK == 0x08)) {
+ if((ATQA0 == 0x44 || ATQA0 == 0x04) && (SAK == 0x08 || SAK == 0x88)) {
reader->type = MfClassicType1k;
} else if((ATQA0 == 0x42 || ATQA0 == 0x02) && (SAK == 0x18)) {
reader->type = MfClassicType4k;
diff --git a/lib/nfc_protocols/mifare_common.c b/lib/nfc_protocols/mifare_common.c
index 0be24b51..78094cdd 100644
--- a/lib/nfc_protocols/mifare_common.c
+++ b/lib/nfc_protocols/mifare_common.c
@@ -6,7 +6,7 @@ MifareType mifare_common_get_type(uint8_t ATQA0, uint8_t ATQA1, uint8_t SAK) {
if((ATQA0 == 0x44) && (ATQA1 == 0x00) && (SAK == 0x00)) {
type = MifareTypeUltralight;
} else if(
- ((ATQA0 == 0x44 || ATQA0 == 0x04) && (SAK == 0x08)) ||
+ ((ATQA0 == 0x44 || ATQA0 == 0x04) && (SAK == 0x08 || SAK == 0x88)) ||
((ATQA0 == 0x42 || ATQA0 == 0x02) && (SAK == 0x18))) {
type = MifareTypeClassic;
} else if(ATQA0 == 0x44 && ATQA1 == 0x03 && SAK == 0x20) {