1
mirror of https://github.com/flipperdevices/flipperzero-firmware.git synced 2025-12-12 04:41:26 +04:00

[FL-3701] NFC fixes (#3264)

* nfc app: fix unlock with manual password crash
* nfc app: preserve card detected state
* nfc app: fix mf keys scene switch
* nfc app: fix multiple protocol tag detect notification
* nfc plugin: fix retrun in function body in aime parser
* iso14443-3b poller: rework ATTRIB response check
* nfc app: fix navigation after file load failur
* iso14443-3b poller: fix PVS warning
* mfc listener: add crutch in mfc emulation
This commit is contained in:
gornekich
2023-12-05 17:40:06 +04:00
committed by GitHub
parent c477d1321a
commit 82baf1e923
9 changed files with 38 additions and 20 deletions

View File

@@ -131,9 +131,18 @@ Iso14443_3bError iso14443_3b_poller_activate(Iso14443_3bPoller* instance, Iso144
break;
}
if(bit_buffer_get_size_bytes(instance->rx_buffer) != 1 ||
bit_buffer_get_byte(instance->rx_buffer, 0) != 0) {
FURI_LOG_D(TAG, "Unexpected ATTRIB response");
if(bit_buffer_get_size_bytes(instance->rx_buffer) != 1) {
FURI_LOG_W(
TAG,
"Unexpected ATTRIB response length: %zu",
bit_buffer_get_size_bytes(instance->rx_buffer));
}
if(bit_buffer_get_byte(instance->rx_buffer, 0) != 0) {
FURI_LOG_D(
TAG,
"Incorrect CID in ATTRIB response: %02X",
bit_buffer_get_byte(instance->rx_buffer, 0));
instance->state = Iso14443_3bPollerStateActivationFailed;
ret = Iso14443_3bErrorCommunication;
break;

View File

@@ -481,6 +481,13 @@ static const MfClassicListenerCmd mf_classic_listener_cmd_handlers[] = {
.command_num = COUNT_OF(mf_classic_listener_halt_handlers),
.handler = mf_classic_listener_halt_handlers,
},
{
// This crutch is necessary since some devices (like Pixel) send 15-bit "HALT" command ...
.cmd_start_byte = MF_CLASSIC_CMD_HALT_MSB,
.cmd_len_bits = 15,
.command_num = COUNT_OF(mf_classic_listener_halt_handlers),
.handler = mf_classic_listener_halt_handlers,
},
{
.cmd_start_byte = MF_CLASSIC_CMD_AUTH_KEY_A,
.cmd_len_bits = 2 * 8,