mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-20 13:23:25 -07:00
fix 14b raw -s option, + get rid of...
<empty trace - possible error>
This commit is contained in:
parent
463871be6e
commit
9d84e68964
2 changed files with 21 additions and 19 deletions
|
@ -334,8 +334,6 @@ void SimulateIso14443bTag(void)
|
||||||
0x00, 0x21, 0x85, 0x5e, 0xd7
|
0x00, 0x21, 0x85, 0x5e, 0xd7
|
||||||
};
|
};
|
||||||
|
|
||||||
FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
|
|
||||||
|
|
||||||
clear_trace();
|
clear_trace();
|
||||||
set_tracing(TRUE);
|
set_tracing(TRUE);
|
||||||
|
|
||||||
|
@ -350,6 +348,8 @@ void SimulateIso14443bTag(void)
|
||||||
uint16_t len;
|
uint16_t len;
|
||||||
uint16_t cmdsRecvd = 0;
|
uint16_t cmdsRecvd = 0;
|
||||||
|
|
||||||
|
FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
|
||||||
|
|
||||||
// prepare the (only one) tag answer:
|
// prepare the (only one) tag answer:
|
||||||
CodeIso14443bAsTag(response1, sizeof(response1));
|
CodeIso14443bAsTag(response1, sizeof(response1));
|
||||||
uint8_t *resp1Code = BigBuf_malloc(ToSendMax);
|
uint8_t *resp1Code = BigBuf_malloc(ToSendMax);
|
||||||
|
@ -908,6 +908,9 @@ static void CodeAndTransmit14443bAsReader(const uint8_t *cmd, int len)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void ReadSTMemoryIso14443b(uint32_t dwLast)
|
void ReadSTMemoryIso14443b(uint32_t dwLast)
|
||||||
{
|
{
|
||||||
|
clear_trace();
|
||||||
|
set_tracing(TRUE);
|
||||||
|
|
||||||
uint8_t i = 0x00;
|
uint8_t i = 0x00;
|
||||||
|
|
||||||
FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
|
FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
|
||||||
|
@ -926,9 +929,6 @@ void ReadSTMemoryIso14443b(uint32_t dwLast)
|
||||||
FpgaWriteConfWord(FPGA_MAJOR_MODE_HF_READER_RX_XCORR | FPGA_HF_READER_RX_XCORR_848_KHZ);
|
FpgaWriteConfWord(FPGA_MAJOR_MODE_HF_READER_RX_XCORR | FPGA_HF_READER_RX_XCORR_848_KHZ);
|
||||||
SpinDelay(200);
|
SpinDelay(200);
|
||||||
|
|
||||||
clear_trace();
|
|
||||||
set_tracing(TRUE);
|
|
||||||
|
|
||||||
// First command: wake up the tag using the INITIATE command
|
// First command: wake up the tag using the INITIATE command
|
||||||
uint8_t cmd1[] = {0x06, 0x00, 0x97, 0x5b};
|
uint8_t cmd1[] = {0x06, 0x00, 0x97, 0x5b};
|
||||||
CodeAndTransmit14443bAsReader(cmd1, sizeof(cmd1));
|
CodeAndTransmit14443bAsReader(cmd1, sizeof(cmd1));
|
||||||
|
@ -1200,14 +1200,16 @@ void SendRawCommand14443B(uint32_t datalen, uint32_t recv, uint8_t powerfield, u
|
||||||
SetAdcMuxFor(GPIO_MUXSEL_HIPKD);
|
SetAdcMuxFor(GPIO_MUXSEL_HIPKD);
|
||||||
FpgaSetupSsc();
|
FpgaSetupSsc();
|
||||||
|
|
||||||
set_tracing(TRUE);
|
if (datalen){
|
||||||
|
set_tracing(TRUE);
|
||||||
|
|
||||||
CodeAndTransmit14443bAsReader(data, datalen);
|
CodeAndTransmit14443bAsReader(data, datalen);
|
||||||
|
|
||||||
if(recv) {
|
if(recv) {
|
||||||
GetSamplesFor14443bDemod(RECEIVE_SAMPLES_TIMEOUT, TRUE);
|
GetSamplesFor14443bDemod(RECEIVE_SAMPLES_TIMEOUT, TRUE);
|
||||||
uint16_t iLen = MIN(Demod.len, USB_CMD_DATA_SIZE);
|
uint16_t iLen = MIN(Demod.len, USB_CMD_DATA_SIZE);
|
||||||
cmd_send(CMD_ACK, iLen, 0, 0, Demod.output, iLen);
|
cmd_send(CMD_ACK, iLen, 0, 0, Demod.output, iLen);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!powerfield) {
|
if(!powerfield) {
|
||||||
|
|
|
@ -213,12 +213,12 @@ int CmdHF14BCmdRaw (const char *Cmd) {
|
||||||
|
|
||||||
if (cmd2[0] != 0x50 || cmdLen != 14 || !crc2) return rawClose();
|
if (cmd2[0] != 0x50 || cmdLen != 14 || !crc2) return rawClose();
|
||||||
|
|
||||||
data[0] = 0x1D;
|
cmd2[0] = 0x1D;
|
||||||
// UID from data[1 - 4]
|
// UID from data[1 - 4]
|
||||||
data[5] = 0x00;
|
cmd2[5] = 0x00;
|
||||||
data[6] = 0x08;
|
cmd2[6] = 0x08;
|
||||||
data[7] = 0x01;
|
cmd2[7] = 0x01;
|
||||||
data[8] = 0x00;
|
cmd2[8] = 0x00;
|
||||||
cmdLen = 9;
|
cmdLen = 9;
|
||||||
|
|
||||||
// attrib
|
// attrib
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue