ChameleonMini icon indicating copy to clipboard operation
ChameleonMini copied to clipboard

Support Ultralight NTAG215

Open FrankWu100 opened this issue 4 years ago • 6 comments

Thanks for #253 too. I compare NTAG215 with lots of codes. And read the Ultralight & NTAG spec from NXP, to make sure those can just be implemented together with the same structure.

//NTAG213 & NTAG216 can also be supported by little add-on codes.

note: Ultralight NTAG: https://www.nxp.com/docs/en/data-sheet/NTAG213_215_216.pdf Ultralight EV1: https://www.nxp.com/docs/en/data-sheet/MF0ULX1.pdf

FrankWu100 avatar Jun 18 '20 13:06 FrankWu100

Hi @FrankWu100, I just merged #253, what is the difference to your pull request?

fptrs avatar Jun 19 '20 07:06 fptrs

Hi @FrankWu100, I just merged #253, what is the difference to your pull request?

Just use the same code from MifareUltralight.c and else. If we need to do other methods's improve or implements, no need to maintained two files. Because of almost the same core functions between Ultralight EV1 and NTAG213/215/216.

FrankWu100 avatar Jun 19 '20 10:06 FrankWu100

Hi @FrankWu100, I just merged #253, what is the difference to your pull request?

Just use the same code from MifareUltralight.c and else. If we need to do other methods's improve or implements, no need to maintained two files. Because of almost the same core functions between Ultralight EV1 and NTAG213/215/216.

So you suggest to remove the other pull request and use your code?

fptrs avatar Jun 19 '20 11:06 fptrs

Hi @FrankWu100, I just merged #253, what is the difference to your pull request?

Just use the same code from MifareUltralight.c and else. If we need to do other methods's improve or implements, no need to maintained two files. Because of almost the same core functions between Ultralight EV1 and NTAG213/215/216.

So you suggest to remove the other pull request and use your code?

No, not at all. Because #253 still is good begining. Maybe we can discuss together. Which the is better way for future. Then if need combine into the ultralight, rebase it and pull the new request would more better.

FrankWu100 avatar Jun 19 '20 13:06 FrankWu100

I can confirm that #253 is based on the Mifare Ultralight code. Mifare Ultralight and NTAG21x tags are similar in the basic command and state machine implementation, but are a bit different regarding the lockbits / security mechanism used.

Since I think that having clean and easy to read and understand code should have priority over having "less" code, my idea when I started working on NTAG215 was to have a separate Application, with its respective .c and .h file, that could be extended to then support NTAG213 and NTAG216 with minimal modifications.

Merging the applications for the Mifare Ultralight tag family and the NTAG21x tag family would make the code harder to read and to "compare" to the datasheet for whoever is trying to make any modification to such code, and modification to the Mifare Ultralight code would end up affecting the NTAG21x code and vice-versa, which makes the code harder to maintain.

Of course, the decision of which approach to take depends on what the maintainer prefer and what whoever ends up adding the missing stuff to the NTAG code prefers, I'm just explaining the rationale behind my choice to make the NTAG21x code as a separate application.

gcammisa avatar Jun 20 '20 22:06 gcammisa

We really appreciate both of your contributions. I think for the time being we keep @gcammisa approach since it is easier for beginners to get into the code. If we run out of program memory we can still merge these applications.

fptrs avatar Jun 26 '20 08:06 fptrs