X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/b13fa4448f517b46e917c5145050f434d6df24d5..refs/pull/15/head:/armsrc/appmain.c

diff --git a/armsrc/appmain.c b/armsrc/appmain.c
index cfde4fbb..78605bda 100644
--- a/armsrc/appmain.c
+++ b/armsrc/appmain.c
@@ -356,6 +356,8 @@ void SendVersion(void)
 
 	FpgaGatherVersion(temp, sizeof(temp));
 	DbpString(temp);
+	// Send Chip ID
+	cmd_send(CMD_ACK,*(AT91C_DBGU_CIDR),0,0,NULL,0);
 }
 
 #ifdef WITH_LF
@@ -637,9 +639,15 @@ void UsbPacketReceived(uint8_t *packet, int len)
 		case CMD_HID_SIM_TAG:
 			CmdHIDsimTAG(c->arg[0], c->arg[1], 1);					// Simulate HID tag by ID
 			break;
-    case CMD_HID_CLONE_TAG: // Clone HID tag by ID to T55x7
+		case CMD_HID_CLONE_TAG: // Clone HID tag by ID to T55x7
 			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
+			break;
+		case CMD_IO_CLONE_TAG: // Clone IO tag by ID to T55x7
+			CopyIOtoT55x7(c->arg[0], c->arg[1], c->d.asBytes[0]);
+			break;
 		case CMD_EM410X_WRITE_TAG:
 			WriteEM410x(c->arg[0], c->arg[1], c->arg[2]);
 			break;
@@ -780,12 +788,24 @@ void UsbPacketReceived(uint8_t *packet, int len)
 		case CMD_MIFARE_READBL:
 			MifareReadBlock(c->arg[0], c->arg[1], c->arg[2], c->d.asBytes);
 			break;
+		case CMD_MIFAREU_READBL:
+			MifareUReadBlock(c->arg[0],c->d.asBytes);
+			break;
+		case CMD_MIFAREU_READCARD:
+			MifareUReadCard(c->arg[0],c->d.asBytes);
+                        break;
 		case CMD_MIFARE_READSC:
 			MifareReadSector(c->arg[0], c->arg[1], c->arg[2], c->d.asBytes);
 			break;
 		case CMD_MIFARE_WRITEBL:
 			MifareWriteBlock(c->arg[0], c->arg[1], c->arg[2], c->d.asBytes);
 			break;
+		case CMD_MIFAREU_WRITEBL_COMPAT:
+			MifareUWriteBlock(c->arg[0], c->d.asBytes);
+                        break;
+		case CMD_MIFAREU_WRITEBL:
+                        MifareUWriteBlock_Special(c->arg[0], c->d.asBytes);
+                        break;
 		case CMD_MIFARE_NESTED:
 			MifareNested(c->arg[0], c->arg[1], c->arg[2], c->d.asBytes);
 			break;
@@ -838,6 +858,12 @@ void UsbPacketReceived(uint8_t *packet, int len)
 		case CMD_READER_ICLASS:
 			ReaderIClass(c->arg[0]);
 			break;
+		case CMD_READER_ICLASS_REPLAY:
+		    ReaderIClass_Replay(c->arg[0], c->d.asBytes);
+			break;
+		case CMD_ICLASS_ISO14443A_GETPUBLIC:
+		    IClass_iso14443A_GetPublic(c->arg[0]);
+		    break;
 #endif
 
 		case CMD_SIMULATE_TAG_HF_LISTEN:
@@ -866,7 +892,7 @@ void UsbPacketReceived(uint8_t *packet, int len)
 			LED_D_OFF(); // LED D indicates field ON or OFF
 			break;
 
-		case CMD_DOWNLOAD_RAW_ADC_SAMPLES_125K: {
+		case CMD_DOWNLOAD_RAW_ADC_SAMPLES_125K:
 //			UsbCommand n;
 //			if(c->cmd == CMD_DOWNLOAD_RAW_ADC_SAMPLES_125K) {
 //				n.cmd = CMD_DOWNLOADED_RAW_ADC_SAMPLES_125K;
@@ -888,7 +914,7 @@ void UsbPacketReceived(uint8_t *packet, int len)
 			// Trigger a finish downloading signal with an ACK frame
 			cmd_send(CMD_ACK,0,0,0,0,0);
 			LED_B_OFF();
-		} break;
+			break;
 
 		case CMD_DOWNLOADED_SIM_SAMPLES_125K: {
 			uint8_t *b = (uint8_t *)BigBuf;