Regarding to write comnand, phalMful_Write, it can write to MAIFARE ULTRALIGHT card by only 4 bytes in designated block. So, I replaced it to phalMful_CompatibilityWrite and tried again but it also write the data by only 4 byte.
How can I write the full byte of data (16 bytes) using these commands?
I appreciate helps as early as possible!
S. Miwa
Hi Michael san,
Understood!
I knew how to handle with NDEF case and now I know about Ultralight case. Your reply has clarified my understanding.
Thank you very much!
Best regards,
S. Miwa
Hi Jorge san,
Sorry for my poor expression. My meaning is how long the data which user wrote in the available space of MIFARE Ultralight card is.
Best regards,
S. Miwa
Hi S. Miwa,
how to detect the length of the data written by the user depends on the format and structure of the written data. In case the structure is unknown, you have to make an agreement with the user application about how to communicate the length of the written data.
But if you use the well defined NDEF format, the data in the header will tell you exactly the length of the data.
HTH,
Michael
Hi Jorge san,
Sure, fully understood! Thank you very much.
By the way, is there no way to know how long the data contents is for this type of card?
Best regards,
S. Miwa
Hi S. Miwa,
With data contents you mean the available space for user memory?
If so, it depends on the specific MIFARE Ultralight product. For example NXP has MIFARE Ultralight, MIFARE Ultralight C, MIFARE Ultralight EV1, MIFARE Ultralight Nano. Which of these is the type of your cards?
Regards!
Jorge Gonzalez
Hello S. Miwa,
MIFARE Ultralight does not provide a command to write 16-bytes at once.
The COMPATIBILITY_WRITE command is used to ease the compatibility with systems initially designed for MIFARE Classic, as it matches the MIFARE Write (A0) command framing, but from the 16 bytes only the first 4 bytes are written and the rest are ignored as you have seen already.
I hope this clarifies.
Best Regards!,
Jorge Gonzalez
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------