nfc-reader icon indicating copy to clipboard operation
nfc-reader copied to clipboard

Always unauthorized

Open layos opened this issue 4 years ago • 3 comments

Hi folks, I'm a complete newbie about NFC, so I'm at my first try. Please forgive my question if it is too dumb. I got your useful lib from git and I try to use it. I can connect to my reader, handle the "card-in" event, but when I try to write a tag in block, I always get as return code "6" that means, as far as I understand, that I'm not allowed to write. Could you please help understand why? Thank you.

layos avatar Feb 11 '21 12:02 layos

Idk if I understood it correctly but If you want to write into some block first you need to authorize it, it is a process of locking that block and then writing it

h4kbas avatar Feb 11 '21 19:02 h4kbas

Idk if I understood it correctly but If you want to write into some block first you need to authorize it, it is a process of locking that block and then writing it

Thank you I just understand that it was a problem of "threads". I opened a connection in a separate thread in my UI and it was not still active when I tented to write.

layos avatar Feb 12 '21 10:02 layos

Oh I see, yeah you should have a async lock kind of thing to wait it

h4kbas avatar Feb 12 '21 10:02 h4kbas