Make detection threshold for ISO14443A configurable

This adds a new command "hw sethfthresh" to configure the thresholds
used inside the FPGA while demodulating ISO14443A. The thresholds
need to be increased on particularly noisy hardware, such as certain
Chinese PM3 Easy clones.
This commit is contained in:
Christian Zietz 2024-02-01 17:48:06 +01:00
commit dbfd8b7a6d
12 changed files with 68 additions and 12 deletions

View file

@ -1560,6 +1560,11 @@ static void PacketReceived(PacketCommandNG *packet) {
setHf14aConfig(&c);
break;
}
case CMD_HF_ISO14443A_SET_THRESHOLDS: {
FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
FpgaSendCommand(FPGA_CMD_SET_EDGE_DETECT_THRESHOLD, (packet->data.asBytes[0] & 0x3f) | ((packet->data.asBytes[1] & 0x3f) << 6));
break;
}
case CMD_HF_ISO14443A_SNIFF: {
SniffIso14443a(packet->data.asBytes[0]);
reply_ng(CMD_HF_ISO14443A_SNIFF, PM3_SUCCESS, NULL, 0);