h4kbas / nfc-reader

A simple library that provides to use rfid card readers.
MIT License
128 stars 44 forks source link

AuthBlock Returns code 22 #16

Closed BeeFrog closed 2 years ago

BeeFrog commented 3 years ago

I'm using an ACR1220 and running VS 2019 in Admin mode on Windows 10. When attempting to call the AuthBlock method I always get code 22 returned.

I can get the UUID ok. I've tried this with multiple Mifare classic 1k cards but they all return the same code. The reader works find with the Mifare app on the same PC. I've tried it on another PC and get the same error.

Do you have any idea what error code 22 means?

Also I'm happy to help contribute to the code base.

h4kbas commented 3 years ago

AuthBlock cannot return 22 because it returns bool. These error codes are standardized and I have defined most of them in the code base if they are not defined, you should checkout the datasheet of the acr122 readers in case