Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mifare DESfire EV2 2k - error in step 2 - authenticate #131

Open
SomeDevWeb opened this issue Jun 15, 2022 · 1 comment
Open

Mifare DESfire EV2 2k - error in step 2 - authenticate #131

SomeDevWeb opened this issue Jun 15, 2022 · 1 comment

Comments

@SomeDevWeb
Copy link

Hi all,
I am quite new in the NFC world, so I apologise for any silly things I say, but I have a Mifare DESfire EV2 2k that already has some employee data and I just need to get the ID from it.
I installed this awesome vfc-pcsc package and I tried a Mifare Classic card, which worked fine with the "mifare-classic" example, but when I tried the "mifare-desfire" to read the DESfire EV2 2k, I get this error:
This is the whole return code actually

[step 1 - select app] sending <Buffer 90 5a 00 00 03 00 00 00 00>
[step 1 - select app] received data <Buffer 91 00>
[step 2 - authenticate] sending <Buffer 90 0a 00 00 01 00 00>
[step 2 - authenticate] received data <Buffer 91 ae>
11:51:15 – ACS ACR1252 CL Reader PICC 0 error: error occurred during processing steps Error: error in step 2 - authenticate
    at authenticate (C:\Users\User\nfc-pcsc\examples\/mifare-desfire.js:103:11)
    at ACR122Reader.<anonymous> (C:\Users\User\nfc-pcsc\examples\/mifare-desfire.js:175:4)

I read and heard from a person that the card needs to have an original encryption key in order to authenticate.
Is that correct?
In any case, please shed some light on how to read this type of card.
Thank you so much for your help!!!

@Eneradler
Copy link

Hi,

I'm also new to the NFC, but I've noticed a method loadAuthenticationKey()

async loadAuthenticationKey(keyNumber, key) {
in the class Reader , which takes the key you pass and transmits it to load the keys to the NFC reader memory.

I am not sure, but probably you also need to have your key in the reader memory before trying to authenticate.

Hope it helps somehow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants