Z
Z
zyuzin2021-03-15 10:11:43
Android
zyuzin, 2021-03-15 10:11:43

How to read NFC Mifare Classic with default KEY A?

Good afternoon.

I have a card with the following markup.
604f074b4a2cf267573089.jpeg

I need to read data from sector 01 by a mobile application in the Cordova + NFC Plugin stack.

There is a code that, in my opinion, should do this, but does not think so))

try {
        await window.nfc.connect('android.nfc.tech.MifareClassic', 500);
    } catch (error) {
        alert('Ошибка подключения: ' + error);
    } finally {
        window.nfc.transceive('60 FF FF FF FF FF FF').then(
            response => alert('Результат авторизации: ' + util.arrayBufferToHexString(response)),
            error    => alert('Ошибка авторизации: ' + error)
        );
        window.nfc.transceive('30 00 01').then(
            response => alert('Считанные данные: ' + util.arrayBufferToHexString(response)),
            error    => alert('Ошибка чтения данных: ' + error)
        )
        await window.nfc.close();
        alert('Чтение завершено');
    }


Executing window.nfc.transceive('60 FF FF FF FF FF FF') results in an error.
And as a result of executing window.nfc.transceive('30 00 01') information from sector 03 appears.

KEY A by default FF FF FF FF FF.

Pliz tell me how to implement all this correctly.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question