]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/epa.c
added data psk* cmds for pskdemod
[proxmark3-svn] / armsrc / epa.c
index 1300b5157da59a519e37f963f1f92ddb2b0ee2a8..fb19656d1dd1d345a8c72f016415691a47e8c9a3 100644 (file)
@@ -108,9 +108,9 @@ size_t EPA_Parse_CardAccess(uint8_t *data,
                if (data[index] == 0x31 || data[index] == 0x30) {
                        // enter the set (skip tag + length)
                        index += 2;
-                       // extended length
+                       // check for extended length
                        if ((data[index - 1] & 0x80) != 0) {
-                               index += (data[index] & 0x7F);
+                               index += (data[index-1] & 0x7F);
                        }
                }
                // OID
@@ -419,11 +419,11 @@ int EPA_Setup()
        // return code
        int return_code = 0;
        // card UID
-       uint8_t uid[8];
+       uint8_t uid[10];
        // card select information
        iso14a_card_select_t card_select_info;
        // power up the field
-       iso14443a_setup();
+       iso14443a_setup(FPGA_HF_ISO14443A_READER_MOD);
 
        // select the card
        return_code = iso14443a_select_card(uid, &card_select_info, NULL);
@@ -434,7 +434,8 @@ int EPA_Setup()
        // send the PPS request
        ReaderTransmit((uint8_t *)pps, sizeof(pps), NULL);
        uint8_t pps_response[3];
-       return_code = ReaderReceive(pps_response);
+       uint8_t pps_response_par[1];
+       return_code = ReaderReceive(pps_response, pps_response_par);
        if (return_code != 3 || pps_response[0] != 0xD0) {
                return return_code == 0 ? 2 : return_code;
        }
Impressum, Datenschutz