]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/appmain.c
LF HID & IO prox fixes/options
[proxmark3-svn] / armsrc / appmain.c
index b7bc87e70c631fe8be5c7901e0c96462f7292d32..0f22ba90fc5fc8aca488240c8943c22d52e00b42 100644 (file)
@@ -203,7 +203,7 @@ void MeasureAntennaTuning(void)
 
   LED_B_ON();
        DbpString("Measuring antenna characteristics, please wait...");
-       memset(dest,0,sizeof(FREE_BUFFER_SIZE));
+       memset(dest,0,FREE_BUFFER_SIZE);
 
 /*
  * Sweeps the useful LF range of the proxmark from
@@ -215,7 +215,7 @@ void MeasureAntennaTuning(void)
  */
   
        FpgaDownloadAndGo(FPGA_BITSTREAM_LF);
-       FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_READER);
+       FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_ADC | FPGA_LF_ADC_READER_FIELD);
        for (i=255; i>19; i--) {
     WDT_HIT();
                FpgaSendCommand(FPGA_CMD_SET_DIVISOR, i);
@@ -638,8 +638,12 @@ void UsbPacketReceived(uint8_t *packet, int len)
                case CMD_MOD_THEN_ACQUIRE_RAW_ADC_SAMPLES_125K:
                        ModThenAcquireRawAdcSamples125k(c->arg[0],c->arg[1],c->arg[2],c->d.asBytes);
                        break;
+               case CMD_LF_SNOOP_RAW_ADC_SAMPLES:
+                       SnoopLFRawAdcSamples(c->arg[0], c->arg[1]);
+                       cmd_send(CMD_ACK,0,0,0,0,0);
+                       break;
                case CMD_HID_DEMOD_FSK:
-                       CmdHIDdemodFSK(0, 0, 0, 1);                                     // Demodulate HID tag
+                       CmdHIDdemodFSK(c->arg[0], 0, 0, 1);                                     // Demodulate HID tag
                        break;
                case CMD_HID_SIM_TAG:
                        CmdHIDsimTAG(c->arg[0], c->arg[1], 1);                                  // Simulate HID tag by ID
@@ -648,7 +652,7 @@ void UsbPacketReceived(uint8_t *packet, int len)
                        CopyHIDtoT55x7(c->arg[0], c->arg[1], c->arg[2], c->d.asBytes[0]);
                        break;
                case CMD_IO_DEMOD_FSK:
-                       CmdIOdemodFSK(1, 0, 0, 1);                                      // Demodulate IO tag
+                       CmdIOdemodFSK(c->arg[0], 0, 0, 1);                                      // Demodulate IO tag
                        break;
                case CMD_IO_CLONE_TAG: // Clone IO tag by ID to T55x7
                        CopyIOtoT55x7(c->arg[0], c->arg[1], c->d.asBytes[0]);
@@ -858,11 +862,14 @@ void UsbPacketReceived(uint8_t *packet, int len)
                        SnoopIClass();
                        break;
                case CMD_SIMULATE_TAG_ICLASS:
-                       SimulateIClass(c->arg[0], c->d.asBytes);
+                       SimulateIClass(c->arg[0], c->arg[1], c->arg[2], c->d.asBytes);
                        break;
                case CMD_READER_ICLASS:
                        ReaderIClass(c->arg[0]);
                        break;
+               case CMD_READER_ICLASS_REPLAY:
+                   ReaderIClass_Replay(c->arg[0], c->d.asBytes);
+                       break;
 #endif
 
                case CMD_SIMULATE_TAG_HF_LISTEN:
Impressum, Datenschutz