Update mifaredesfire.c to support DESELECT response

Signed-off-by: Benjamin DELPY <benjamin@gentilkiwi.com>
This commit is contained in:
Benjamin DELPY authored and GitHub committed 2026-04-27 22:36:00 +02:00
1 parent 83ca0a22fa
commit d6a471b6a3
1 file changed
+10 -2
+10 -2
View File
@@ -756,11 +756,19 @@ size_t CreateAPDU(uint8_t *datain, size_t len, uint8_t *dataout) {
// uint32_t crc = crc_finish(&desfire_crc32);
void OnSuccess(void) {
size_t len = 0;
uint8_t resp[MAX_FRAME_SIZE];
uint8_t par[MAX_PARITY_SIZE];
pcb_blocknum = 0;
ReaderTransmit(deselect_cmd, 3, NULL);
if (mifare_ultra_halt()) {
if (g_dbglevel >= DBG_ERROR) Dbprintf("Halt error");
len = ReaderReceive(resp, sizeof(resp), par);
if (len == 0) {
if (mifare_ultra_halt()) {
if (g_dbglevel >= DBG_ERROR) Dbprintf("Halt error");
}
}
switch_off();
}