When I went to test the standalone mode using hf_craftbyte I realized that isn't working to mifare 1k, reviewing the code I found the problem , isn't checking the tag type when the UID is emulated.
If replace these lines:
Dbprintf("Starting simulation, press pm3-button to stop and go back to search state.");
SimulateIso14443aTag(3, flags, card.uid, 0);
For these:
Dbprintf("Starting simulation, press pm3-button to stop and go back to search state.");
if (card.sak == 8 && card.atqa[0] == 4 && card.atqa[1] == 0) {
Dbprintf("Mifare Classic");
SimulateIso14443aTag(1, flags, card.uid, 0); // Mifare Classic
} else if (card.sak == 0 && card.atqa[0] == 0x44 && card.atqa[1] == 0) {
Dbprintf("Mifare Ultralight");
SimulateIso14443aTag(2, flags, card.uid, 0);// Mifare Ultralight
} else if (card.sak == 20 && card.atqa[0] == 0x44 && card.atqa[1] == 3) {
Dbprintf("Mifare DESFire");
SimulateIso14443aTag(3, flags, card.uid, 0); // Mifare DESFire
} else {
Dbprintf("Unrecognized tag type -- defaulting to Mifare Classic emulation");
SimulateIso14443aTag(1, flags, card.uid, 0);
}
Hi,
When I went to test the standalone mode using hf_craftbyte I realized that isn't working to mifare 1k, reviewing the code I found the problem , isn't checking the tag type when the UID is emulated.
If replace these lines:
Dbprintf("Starting simulation, press pm3-button to stop and go back to search state."); SimulateIso14443aTag(3, flags, card.uid, 0);
For these:
The simulation work better.
Regards.