Skip to content

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

@jdbruner

Description

@jdbruner

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority:2Work that is important, but not critical for the releasebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions