Re: Mifare Classic Personalization

Forum MIFARE SDK Mifare Classic Personalization Re: Mifare Classic Personalization

Re: Mifare Classic Personalization

24. November 2014 at 8:15
Hi ,


you can personalize a sector multiple times.

After first time personalize, if you want to again personalize the same sector follow the below steps by keeping the key and appID unchanged.

public void onClassicCardDetected(final MFClassic objMFCCard) {
classic = objMFCCard;
byte sectorNo = 2;
byte[] key = { (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
(byte) 0xFF, (byte) 0xFF }; (factory default key)
byte[] appId = new byte[] { 0x11, 0x11, 0x11 }; //should be 3 bytes
try {
classic.format(sectorNo, key);
classic.personalize(sectorNo, appId, key);
classic.authenticate(sectorNo, appId, key);
classic.write(bdata);
classic.read(16);
} catch (Throwable t) {
}
}

Go through the samplelite application source code for more details.

Thanks,
+ 0  |  - 0