diff options
author | gornekich <n.gorbadey@gmail.com> | 2022-07-28 15:34:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-28 15:34:28 +0300 |
commit | c40e8811d68e9f4b8f603ae5d5826b814521014d (patch) | |
tree | 65146d9465342e925c3b6804197b2e01cc626639 /lib | |
parent | b6e52e979d07dbd17de80614df6fa224fcb9af33 (diff) |
[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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/nfc/nfc_worker.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/nfc/nfc_worker.c b/lib/nfc/nfc_worker.c index 4a3176ff..3a45c363 100644 --- a/lib/nfc/nfc_worker.c +++ b/lib/nfc/nfc_worker.c @@ -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) { |