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

Help wanted with changeable uid #6

Open
sgtJohnny opened this issue Sep 13, 2018 · 2 comments
Open

Help wanted with changeable uid #6

sgtJohnny opened this issue Sep 13, 2018 · 2 comments

Comments

@sgtJohnny
Copy link

Hi,

I'm using your libray for my reader, but now i'm stuck with extending the functions. I want to support UID-Change on mifare cards. A library for the RC522 can do this by sending commands to the mifare card directly

If you check https://www.nxp.com/docs/en/data-sheet/MF1S50YYX_V1.pdf on Page 13 you can see the commands "Halt" and "Personalize UID". I need to send this commands,

I guess they are similar to the REQUA that already in your code. Any help on how to make a function that can send this commands?

@iwanders
Copy link
Owner

I guess they are similar to the REQUA that already in your code. Any help on how to make a function that can send this commands?

Both interact with the tag yes, but REQA is a low level wakeup command in the ISO14443 specification. The halt command is also low-level, the Personalize UID usage is not a low level command but instead it is a chip-specific instruction not described by the ISO14443 specification. It's communication at a much higher layer then REQA or halt would be.

The library already contains the auth, read, write MIFARE classic commands. Which are described in page 20-23 in the pdf you linked. If you compare the code of those commands with their datasheet pages you should be able to write a similar function that implements your Personalize UID Usage command. Those were the commands that were supported by tags I had lying around when I created this library, I know they work so they should provide you with a solid basis to go on. You likely have to authenticate with the tag first before you can do any meaningful interaction with the memory, for this you can take a look at the example dump function.

Read the datasheet thoroughly first, especially section 10 to confirm you actually need to implement this command. I don't think it does what you think it does, it doesn't modify the UUID as far as I can see, it merely allows you to select which UUID from sector 0 block 0 is used and how the UUID affects the anti-collision behaviour.

@sgtJohnny
Copy link
Author

Thank you for your response, i sucessfully implemented and tested the function in my design, yes i do need the commands, since i use special cards that allow me to change the actual UID.

If you like, i can send you the code for the functions, since i changed the code to class-based i cannot make a request on github, but i could send you the code.

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