-
-
Notifications
You must be signed in to change notification settings - Fork 17
Payload limited to 38 characters on Mifare Classic 1k #241
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
Comments
Quick update - just running |
Another update - Tagwriter on android refuses to write messages longer than 44 bytes and says capacity of the card is 46 bytes. On all cards. Formatting doesn't help. It also says the cards are 1k, not sure how this both can be true :) I suspect the cards are somehow formatted wrong, but not sure what else could I try. Any ideas welcome :) |
Hi. I can only really think that these particular cards may actually only have a tiny capacity or have some sort of defect. You are definitely doing everything correctly The reason I say that is because the NFC backend used by the phone app is totally managed by Android itself, it's not like on the Core version where we use custom libraries, so it's unlikely there's an issue with the app or phone itself on the Android version. If you've got your heart set on using Mifare classic cards, maybe you find some to test from a more reputable place? The crash you experienced could be fixed, I've got an open issue atm where a comma written to a Mifare car has reported as crashing Core which sounds similar. If you've can reproduce it with a certain card please let me know what was written on it |
The adventure had a happy ending after some tinkering :) Posting here with the hope that other folks can benefit: sudo apt install libnfc-bin libfreefare-bin libnfc-dev libfreefare-dev
pip install ndeftool
yes 0123456789 | tr -d '\n' | head -c 700 > large.txt
ndeftool text "$(cat large.txt)" save large.ndef
mifare-classic-write-ndef -y -i large.ndef Some explanation:
while true; do read -n1 -s && mifare-classic-write-ndef -y -i large.ndef; echo "done"; done Regarding the crash: it happens to the core, every single time I try to write string longer than the allocated space on these cards (i.e. noname mifare classic 1k card "formatted" with I think we can close this issue at this point and thanks for your response Callan. And for the awesome app to the author of course! |
I'm glad you got it working in the end! Thank you so much for thoroughly documenting everything you did. I hope I can incorporate it back into Core so there's no need for all these extra tools. I don't use the Mifare cards myself so that support hasn't gotten much love |
Thanks for the great tool!
I encountered this weird problem: bunch of no-name Mifare Classic 1k cards from many different sources seem to be limited to only 38 characters of payload both for reading as well as writing. This happens with df52fad-dev (mister) web UI as well as android app.
I get an error when trying to write/read these cards either with the ACR122U or the android phone (relatively modern Samsung with up to date OS).
error reads something like "maximum size of the nfc tag exceeded", even when there is less than 50 characters to write.
When reading, the "value" of the card is not shown if the payload exceeds 38 characters (tested with NFC tools for desktop, which can reliably read and write longer texts on the same cards).
Note that from the factory the cards were not usable with zaparoo at all (could not be written or formatted). I had to prepare the cards with the following commands:
After that the card is usable but with the above limitation. Note that if I follow the recommendation to just add any text field using NFC tools for desktop before using mifare classic 1k with zaparoo, these cards are still not writable - app says they are not ndef formatted. After the above two commands the card is usable without writing a text field manually.
Also note that after a failure to write from the core (i.e. trying to write big text or unformatted card) some thread likely crashes in the server and it is no longer usable until reboot. This could be considered a separate bug, but that one is much less disruptive of course.
Thank you and let me know if any more information is needed.
(attaching screenshot of the NFC Tool with some card details)
The text was updated successfully, but these errors were encountered: