From a0a3eb4bbf6df5e67d5f1c3ada1bebf4117fb33f Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 29 Aug 2026 17:38:41 +0200 Subject: [PATCH] remove CMD_LF_SIMULATE_BIDIR, never implemented --- armsrc/Standalone/hf_colin.c | 4 ---- armsrc/appmain.c | 4 ---- armsrc/i2c.c | 1 - armsrc/lfops.c | 4 ---- armsrc/lfops.h | 1 - client/src/cmdhfcryptorf.c | 26 ++++++-------------------- client/src/cmdlf.c | 23 ----------------------- client/src/cmdlf.h | 1 - include/pm3_cmd.h | 2 +- 9 files changed, 7 insertions(+), 59 deletions(-) diff --git a/armsrc/Standalone/hf_colin.c b/armsrc/Standalone/hf_colin.c index aedad8f1b..6e2d6723c 100644 --- a/armsrc/Standalone/hf_colin.c +++ b/armsrc/Standalone/hf_colin.c @@ -577,13 +577,10 @@ failtag: if (key == -1) { err = 1; allKeysFound = false; - // used in portable imlementation on microcontroller: it reports back the fail and open the - // standalone lock reply_ng(CMD_CJB_FSMSTATE_MENU, NULL, 0); break; } else if (key == -2) { err = 1; // Can't select card. allKeysFound = false; - // reply_old(CMD_CJB_FSMSTATE_MENU, 0, 0, 0, 0, 0); break; } else { /* BRACE YOURSELF : AS LONG AS WE TRAP A KNOWN KEY, WE STOP CHECKING AND ENFORCE KNOWN SCHEMES */ @@ -592,7 +589,6 @@ failtag: num_to_bytes(key64, 6, foundKey[type][sec]); cjSetCursRight(); DbprintfEx(FLAG_NEWLINE, "SEC: %02x ; KEY : %012" PRIx64 " ; TYP: %i", sec, key64, type); - /*reply_old(CMD_CJB_INFORM_CLIENT_KEY, 12, sec, type, tosendkey, 12);*/ for (int i = 0; i < colin_total_schemas; i++) { if (key64 == colin_Schemas[i].trigger) { diff --git a/armsrc/appmain.c b/armsrc/appmain.c index 5613f8a85..954ac987d 100644 --- a/armsrc/appmain.c +++ b/armsrc/appmain.c @@ -1451,10 +1451,6 @@ static void PacketReceived(PacketCommandNG *packet) { LED_A_OFF(); break; } - case CMD_LF_SIMULATE_BIDIR: { - SimulateTagLowFrequencyBidir(packet->oldarg[0], packet->oldarg[1]); - break; - } case CMD_LF_T55XX_READBL: { struct p { uint32_t password; diff --git a/armsrc/i2c.c b/armsrc/i2c.c index 2548b3435..4f68efb09 100644 --- a/armsrc/i2c.c +++ b/armsrc/i2c.c @@ -1298,7 +1298,6 @@ void SmartCardRaw(const smart_card_raw_t *p) { if ((flags & SC_SELECT) == SC_SELECT) { smart_card_atr_t card; bool gotATR = GetATR(&card, true); - //reply_old(CMD_ACK, gotATR, sizeof(smart_card_atr_t), 0, &card, sizeof(smart_card_atr_t)); if (gotATR == false) { reply_ng(CMD_SMART_RAW, PM3_ESOFT, NULL, 0); goto OUT; diff --git a/armsrc/lfops.c b/armsrc/lfops.c index d4b2ebdda..559793272 100644 --- a/armsrc/lfops.c +++ b/armsrc/lfops.c @@ -937,10 +937,6 @@ void SimulateTagLowFrequency(int period, int gap, bool ledcontrol) { } -#define DEBUG_FRAME_CONTENTS 1 -void SimulateTagLowFrequencyBidir(int divisor, int max_bitlen) { -} - // compose fc/X fc/Y waveform (FSKx) static void fcAll(uint8_t fc, int *n, uint8_t clock, int16_t *remainder) { uint8_t *dest = BigBuf_get_addr(); diff --git a/armsrc/lfops.h b/armsrc/lfops.h index 3e14175e6..6e34c7b00 100644 --- a/armsrc/lfops.h +++ b/armsrc/lfops.h @@ -32,7 +32,6 @@ void AcquireTiType(bool ledcontrol); void AcquireRawBitsTI(void); void SimulateTagLowFrequencyEx(int period, int gap, bool ledcontrol, int numcycles); void SimulateTagLowFrequency(int period, int gap, bool ledcontrol); -void SimulateTagLowFrequencyBidir(int divisor, int max_bitlen); bool add_HID_preamble(uint32_t *hi2, uint32_t *hi, uint32_t *lo, uint8_t length); void CmdHIDsimTAGEx(uint32_t hi2, uint32_t hi, uint32_t lo, uint8_t longFMT, bool ledcontrol, int numcycles); diff --git a/client/src/cmdhfcryptorf.c b/client/src/cmdhfcryptorf.c index e63ca3629..e551f986d 100644 --- a/client/src/cmdhfcryptorf.c +++ b/client/src/cmdhfcryptorf.c @@ -455,27 +455,13 @@ static int CmdHFCryptoRFELoad(const char *Cmd) { return PM3_EFILE; } - PrintAndLogEx(SUCCESS, "Uploading to emulator memory"); - - uint32_t bytes_sent = 0; - /* - //Send to device - uint32_t bytes_remaining = bytes_read; - - while (bytes_remaining > 0) { - uint32_t bytes_in_packet = MIN(PM3_CMD_DATA_SIZE, bytes_remaining); - if (bytes_in_packet == bytes_remaining) { - // Disable fast mode on last packet - g_conn.block_after_ACK = false; - } - clearCommandBuffer(); - // NOTE: CMD_HF_CRYPTORF_EML_MEMSET has no device handler; needs one plus an NG payload if revived - bytes_remaining -= bytes_in_packet; - bytes_sent += bytes_in_packet; - } - */ + // ICEMAN: Once we have CryptoRF dump files, we can implement an upload + PrintAndLogEx(INFO, "to be implemented"); + //PrintAndLogEx(SUCCESS, "Uploading to emulator memory"); + //uint32_t bytes_sent = 0; + free(data); - PrintAndLogEx(SUCCESS, "sent " _YELLOW_("%d") " bytes of data to device emulator memory", bytes_sent); + //PrintAndLogEx(SUCCESS, "sent " _YELLOW_("%d") " bytes of data to device emulator memory", bytes_sent); return PM3_SUCCESS; } diff --git a/client/src/cmdlf.c b/client/src/cmdlf.c index c4a272a89..f9d52f6cd 100644 --- a/client/src/cmdlf.c +++ b/client/src/cmdlf.c @@ -1513,28 +1513,6 @@ int CmdLFpskSim(const char *Cmd) { return lfsim_wait_check(CMD_LF_PSK_SIMULATE); } -int CmdLFSimBidir(const char *Cmd) { - - CLIParserContext *ctx; - CLIParserInit(&ctx, "lf simbidir", - "Simulate LF tag with bidirectional data transmission between reader and tag", - "lf simbidir" - ); - - void *argtable[] = { - arg_param_begin, - arg_param_end - }; - CLIExecWithReturn(ctx, Cmd, argtable, true); - CLIParserFree(ctx); - - // Set ADC to twice the carrier for a slight supersampling - // HACK: not implemented in ARMSRC. - PrintAndLogEx(INFO, "Not implemented yet."); -// SendCommandNG(CMD_LF_SIMULATE_BIDIR, NULL, 0); // needs an NG payload if revived - return PM3_SUCCESS; -} - // ICEMAN, Verichip is Animal tag. Tested against correct reader /* @@ -2431,7 +2409,6 @@ static command_t CommandTable[] = { {"simfsk", CmdLFfskSim, IfPm3Lf, "Simulate " _YELLOW_("FSK") " tag"}, {"simpsk", CmdLFpskSim, IfPm3Lf, "Simulate " _YELLOW_("PSK") " tag"}, // {"simnrz", CmdLFnrzSim, IfPm3Lf, "Simulate " _YELLOW_("NRZ") " tag"}, - {"simbidir", CmdLFSimBidir, IfPm3Lf, "Simulate LF tag (with bidirectional data transmission between reader and tag)"}, {"sniff", CmdLFSniff, IfPm3Lf, "Sniff LF traffic between reader and tag"}, {"tune", CmdLFTune, IfPm3Lf, "Continuously measure LF antenna tuning"}, // {"vchdemod", CmdVchDemod, AlwaysAvailable, "Demodulate samples for VeriChip"}, diff --git a/client/src/cmdlf.h b/client/src/cmdlf.h index 8881973f0..78fafbb2e 100644 --- a/client/src/cmdlf.h +++ b/client/src/cmdlf.h @@ -35,7 +35,6 @@ int CmdLFSim(const char *Cmd); int CmdLFaskSim(const char *Cmd); int CmdLFfskSim(const char *Cmd); int CmdLFpskSim(const char *Cmd); -int CmdLFSimBidir(const char *Cmd); int CmdLFSniff(const char *Cmd); int CmdVchDemod(const char *Cmd); int CmdLFfind(const char *Cmd); diff --git a/include/pm3_cmd.h b/include/pm3_cmd.h index c468de396..19afa422f 100644 --- a/include/pm3_cmd.h +++ b/include/pm3_cmd.h @@ -871,7 +871,7 @@ typedef struct { #define CMD_LF_HID_WATCH 0x020B #define CMD_LF_HID_SIMULATE 0x020C #define CMD_LF_SET_DIVISOR 0x020D -#define CMD_LF_SIMULATE_BIDIR 0x020E +// 0x020E was CMD_LF_SIMULATE_BIDIR, removed - the ARM handler was an empty stub #define CMD_SET_ADC_MUX 0x020F #define CMD_LF_HID_CLONE 0x0210 #define CMD_LF_EM410X_CLONE 0x0211