gassajor000 / pn532pi

Python interface for ndef communication using PN532 chip on raspberry pi
33 stars 19 forks source link

Update ntag21x_protect.py #8

Closed kreasteve closed 3 years ago

kreasteve commented 3 years ago

If we have a ntag216 e.g. it has a capacity value of 0x6D but if you multiply it with 8 to get the bytes count you can't compare it a few lines below... 0x6D * 8 = 0x368 != 0x6D

Let me know if I'm on the wrong way

gassajor000 commented 3 years ago

I think you are right. The datasheet for NTAG21x shows the CC[2] byte should be one of 0x12, 0x3E, and 0x6D. Multiplying by 8 would cause that comparison to fail.