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

MifareCard NDEF read/write don't work on multi-application cards #2030

Closed
jdbruner opened this issue Feb 7, 2023 · 0 comments
Closed

MifareCard NDEF read/write don't work on multi-application cards #2030

jdbruner opened this issue Feb 7, 2023 · 0 comments
Labels
bug Something isn't working Priority:2 Work that is important, but not critical for the release

Comments

@jdbruner
Copy link
Contributor

jdbruner commented Feb 7, 2023

In the MifareCard class, WriteNdefMessage and TryReadNdefMessage have two issues:

  1. They assume that the entire card is available for the NDEF message. A multi-application card could use some portion of the memory for other purposes. They should consult the Mifare Application Directory in sector 0 (and, for 2K and 4K cards, sector 16) to find the range of contiguous sectors that are assigned to the NDEF tag.
  2. They do not account for the larger sector size in the second half of 4K cards. (The first 32 sectors have 4 blocks per sector; the last 8 sectors of a 4K card have 16 blocks per sector.)
@jdbruner jdbruner added the bug Something isn't working label Feb 7, 2023
@ghost ghost added the untriaged label Feb 7, 2023
@krwq krwq added the Priority:2 Work that is important, but not critical for the release label Feb 9, 2023
@ghost ghost removed the untriaged label Feb 9, 2023
@ghost ghost locked as resolved and limited conversation to collaborators May 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working Priority:2 Work that is important, but not critical for the release
Projects
None yet
Development

No branches or pull requests

2 participants