NFC: fixes & improvements (#897)

* nfc: (mf_ul) fix overflow while reading
* nfc: (mf_ul) fix FAST_READ command emulation
* nfc: (mf_ul) implement non-strict PWD_AUTH command emulation for NTAG21x
* nfc: (mf_ul) improve emulation stability by removing frequent furi_hal_console_put() calls that cause delays or something
* nfc: (mf_ul) remove calls to blocking functions from emulation worker

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
ghettorce
2021-12-15 21:27:25 +03:00
committed by GitHub
parent 757ea073a8
commit de006aa06a
3 changed files with 78 additions and 10 deletions

View File

@@ -60,6 +60,14 @@ typedef struct {
uint8_t data[MF_UL_MAX_DUMP_SIZE];
} MifareUlData;
typedef struct {
uint8_t pwd[4];
union {
uint8_t raw[2];
uint16_t value;
} pack;
} MifareUlAuthData;
typedef struct {
MfUltralightType type;
uint8_t pages_to_read;
@@ -67,6 +75,7 @@ typedef struct {
bool support_fast_read;
bool data_changed;
MifareUlData data;
MifareUlAuthData* auth_data;
} MifareUlDevice;
bool mf_ul_check_card_type(uint8_t ATQA0, uint8_t ATQA1, uint8_t SAK);