Forum › MIFARE SDK › Mifare Classic Personalization › Re: Mifare Classic Personalization
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,
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