]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
Power down the field before sending the USB ACK
authorfrederikmoellers@aol.de <frederikmoellers@aol.de@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Sat, 1 Sep 2012 23:54:38 +0000 (23:54 +0000)
committerfrederikmoellers@aol.de <frederikmoellers@aol.de@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Sat, 1 Sep 2012 23:54:38 +0000 (23:54 +0000)
This fixes the bug that the USB communication breaks when collecting PACE nonces with no delay. The delay functionality has not been removed (it doesn't hurt to keep it), but using a delay of 0 is now possible without a high risk of getting too many errors.

armsrc/epa.c

index 8ab4311cf3976c0a13801252e7a5fdcf62fee2a3..0e93a0561cd408f54c13b1cf8688d4a988ca19db 100644 (file)
@@ -217,12 +217,12 @@ static void EPA_PACE_Collect_Nonce_Abort(UsbCommand *ack, uint8_t step, int func
        ack->arg[0] = step;
        // last return code
        ack->arg[1] = func_return;
-       
-       // send the USB packet
-       UsbSendPacket((void *)ack, sizeof(UsbCommand));
 
        // power down the field
        EPA_Finish();
+       
+       // send the USB packet
+       UsbSendPacket((void *)ack, sizeof(UsbCommand));
 }
 
 //-----------------------------------------------------------------------------
Impressum, Datenschutz