Modification to set PN53X_REG_CIU_TxAuto, PN53X_REG_CIU_CWGsP & PN53X_REG_CIU_ModGsP registers values before init.
Avoids a dummy scan in B mode before
Fix 4k - [@gelotus]
(we can re-introduce support for other card types later as long as we adhere to the principal that we don't write unless requested to)
when writing to gen2 and possible on gen3, it writes first block 3 wich is the trailing sector before writing to block 0, so the last write to block 0 fails because authenticate to old keyset
nfc-mfclassic.c:623:6: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
bool is_directwrite()
^~~~~~~~~~~~~~
nfc-mfclassic.c: In function ‘is_directwrite’:
nfc-mfclassic.c:623:6: warning: old-style function definition [-Wold-style-definition]
Modify pcsc.c and mifare.c files.
1. add code into pcsc.c to have support Mifare classic card.
2. The PCSC reader has SW value, add response data length for PCSC
reader
Adding support for extended Magic cards:
- DirectWrite cards
- One Time Write cards
Direct Write cards support modification of B0 directly, without any unlock codes. When we are attempting to detect if a card is 'magic', we will attempt to modify B0 directly as an initial check.
One Time Write cards support modification of B0 directly, one time only. They do not respond to magic commands, but have a fixed UID coming out of the factory. We now detect this UID, and if so, deem the card 'magic'.
Adding support for "DirectWrite" Ultralight tags.
- The latest generation of "Magic" Ultralight tags support DirectWrite to B0.
- Several versions of these cards are bricked if the older 'unlock' command is issued to the card.
- To avoid this, when detecting if a card is magic, we attempt to modify B0 directly. If this fails, we proceed with an unlock command.