-
Notifications
You must be signed in to change notification settings - Fork 153
Add custom read/write helpers for MIFARE Classic tags #217
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
base: develop
Are you sure you want to change the base?
Conversation
|
Hi, I'm interested in contributing to this project because I used this library in a project to interact with MiFare Classic tags. I had some difficulty accessing sectors and blocks at a low level, and after seeing that others had similar issues, I thought of implementing some user-friendly methods. This is my first official contribution, so I'm not sure if my approach is entirely correct. I'm open to suggestions and improvements. When you have a moment, could you please review my code? @Harry-Chen |
|
Thanks! I did have similar plans before, but the issue is that tags might have different keys for different sectors. So I prefer leaving the |
|
You're right, hardcoding a single key for the whole operation limits the real use cases. The idea behind these methods was to provide a high-level function for those dealing with uniformly keyed tags, but we could extend it by adding a |
Enable read & write block for iOS MIFARE Classic, Updated readme
|
@Harry-Chen let me know |
Fix: NFC Handler dead thread issue on Android SDK 35
Signed-off-by: Shengqi Chen <[email protected]>
Signed-off-by: Shengqi Chen <[email protected]>
Signed-off-by: Shengqi Chen <[email protected]>
This PR introduces two new utility methods for interacting with MIFARE Classic NFC tags:
readDataFromTagto read an arbitrary number of bytes from a specified sector/block, skipping trailer blocks automatically.writeDataToTagto write a list of bytes starting from a given sector and block, safely avoiding trailer blocks and padding incomplete blocks with zeros.They simplify working with MIFARE Classic tags by handling sector authentication, block calculation, and trailer block skipping. Useful for reading or writing multiple bytes without managing low-level NFC logic manually.