Merge branch 'ofw_dev' into dev

This commit is contained in:
MX
2023-12-07 08:03:18 +03:00
9 changed files with 38 additions and 20 deletions
@@ -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;
@@ -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,