[FL-2701], [FL-2702], [FL-2699] NFC fixes (#1478)

* nfc: change read scene views
* nfc: rework return after save success
* nfc: add fallback to read UID of unrecognized iso14443-3
* nfc: show mifare desfire on read success
* nfc: add restore original confirm scene
* nfc: fix icon name
* nfc: clear 6 bit in SAK to emulate 14443-4 uids
* nfc: don't change original sak
This commit is contained in:
gornekich
2022-07-28 15:34:28 +03:00
committed by GitHub
parent b6e52e979d
commit c40e8811d6
11 changed files with 98 additions and 33 deletions

View File

@@ -245,6 +245,9 @@ static bool nfc_worker_read_nfca(NfcWorker* nfc_worker, FuriHalNfcTxRxContext* t
nfc_worker->dev_data->protocol = NfcDeviceProtocolUnknown;
}
card_read = true;
} else {
nfc_worker->dev_data->protocol = NfcDeviceProtocolUnknown;
card_read = true;
}
return card_read;
@@ -321,8 +324,14 @@ void nfc_worker_emulate_uid(NfcWorker* nfc_worker) {
FuriHalNfcDevData* data = &nfc_worker->dev_data->nfc_data;
NfcReaderRequestData* reader_data = &nfc_worker->dev_data->reader_data;
// TODO add support for RATS
// Now remove bit 6 in SAK to support ISO-14443A-3 emulation
// Need to save ATS to support ISO-14443A-4 emulation
uint8_t sak = data->sak;
FURI_BIT_CLEAR(sak, 5);
while(nfc_worker->state == NfcWorkerStateUidEmulate) {
if(furi_hal_nfc_listen(data->uid, data->uid_len, data->atqa, data->sak, true, 100)) {
if(furi_hal_nfc_listen(data->uid, data->uid_len, data->atqa, sak, true, 100)) {
if(furi_hal_nfc_tx_rx(&tx_rx, 100)) {
reader_data->size = tx_rx.rx_bits / 8;
if(reader_data->size > 0) {