From ce24e6acbbc754a4c56a26dc4920f34199356b9b Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 8 Jul 2020 09:45:49 +0200 Subject: [PATCH] fpga merge hell, all compiles --- armsrc/appmain.c | 9 +++++++-- armsrc/iso15693.h | 2 +- client/src/cmdhf15.c | 7 +++---- include/pm3_cmd.h | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/armsrc/appmain.c b/armsrc/appmain.c index 963d36c78..2ed5811fa 100644 --- a/armsrc/appmain.c +++ b/armsrc/appmain.c @@ -1031,8 +1031,13 @@ static void PacketReceived(PacketCommandNG *packet) { AcquireRawAdcSamplesIso15693(); break; } - case CMD_HF_ISO15693_RAWADC: { - RecordRawAdcSamplesIso15693(); + case CMD_HF_ISO15693_SNIFF: { + struct p { + uint8_t jam_search_len; + uint8_t jam_search_string[]; + } PACKED; + struct p *payload = (struct p *) packet->data.asBytes; + SniffIso15693(payload->jam_search_len, payload->jam_search_string); break; } case CMD_HF_ISO15693_COMMAND: { diff --git a/armsrc/iso15693.h b/armsrc/iso15693.h index 1b5405b13..fcca9491c 100644 --- a/armsrc/iso15693.h +++ b/armsrc/iso15693.h @@ -33,7 +33,7 @@ int GetIso15693CommandFromReader(uint8_t *received, size_t max_len, uint32_t *eo void TransmitTo15693Tag(const uint8_t *cmd, int len, uint32_t *start_time); int GetIso15693AnswerFromTag(uint8_t* response, uint16_t max_len, uint16_t timeout, uint32_t *eof_time); -void RecordRawAdcSamplesIso15693(void); +//void RecordRawAdcSamplesIso15693(void); void AcquireRawAdcSamplesIso15693(void); void ReaderIso15693(uint32_t parameter); // Simulate an ISO15693 reader - greg void SimTagIso15693(uint8_t *uid); // simulate an ISO15693 tag - greg diff --git a/client/src/cmdhf15.c b/client/src/cmdhf15.c index 2b8812d33..ad69d5615 100644 --- a/client/src/cmdhf15.c +++ b/client/src/cmdhf15.c @@ -973,12 +973,12 @@ static int CmdHF15Info(const char *Cmd) { // Record Activity without enabling carrier //helptext -static int CmdHF15Record(const char *Cmd) { +static int CmdHF15Sniff(const char *Cmd) { char cmdp = tolower(param_getchar(Cmd, 0)); if (cmdp == 'h') return usage_15_record(); clearCommandBuffer(); - SendCommandNG(CMD_HF_ISO15693_RAWADC, NULL, 0); + SendCommandNG(CMD_HF_ISO15693_SNIFF, NULL, 0); return PM3_SUCCESS; } @@ -1841,9 +1841,8 @@ static command_t CommandTable[] = { {"demod", CmdHF15Demod, AlwaysAvailable, "Demodulate ISO15693 from tag"}, {"dump", CmdHF15Dump, IfPm3Iso15693, "Read all memory pages of an ISO15693 tag, save to file"}, {"info", CmdHF15Info, IfPm3Iso15693, "Tag information"}, -// {"sniff", CmdHF15Sniff, IfPm3Iso15693, "Sniff ISO15693 traffic"}, + {"sniff", CmdHF15Sniff, IfPm3Iso15693, "Sniff ISO15693 traffic"}, {"raw", CmdHF15Raw, IfPm3Iso15693, "Send raw hex data to tag"}, - {"record", CmdHF15Record, IfPm3Iso15693, "Record Samples (ISO15693)"}, {"read", CmdHF15Read, IfPm3Iso15693, "Read a block"}, {"reader", CmdHF15Reader, IfPm3Iso15693, "Act like an ISO15693 reader"}, {"readmulti", CmdHF15Readmulti, IfPm3Iso15693, "Reads multiple Blocks"}, diff --git a/include/pm3_cmd.h b/include/pm3_cmd.h index bf16aaca6..492eca798 100644 --- a/include/pm3_cmd.h +++ b/include/pm3_cmd.h @@ -431,7 +431,7 @@ typedef struct { #define CMD_HF_ISO14443B_COMMAND 0x0305 #define CMD_HF_ISO15693_READER 0x0310 #define CMD_HF_ISO15693_SIMULATE 0x0311 -#define CMD_HF_ISO15693_RAWADC 0x0312 +#define CMD_HF_ISO15693_SNIFF 0x0312 #define CMD_HF_ISO15693_COMMAND 0x0313 #define CMD_HF_ISO15693_FINDAFI 0x0315 #define CMD_LF_SNIFF_RAW_ADC 0x0317