diff --git a/armsrc/emvcmd.h b/armsrc/emvcmd.h index bcd7dd3a5..4cdc51ce6 100644 --- a/armsrc/emvcmd.h +++ b/armsrc/emvcmd.h @@ -18,7 +18,6 @@ #include "string.h" #include "iso14443crc.h" #include "iso14443a.h" -#include "emvcmd.h" #include "emvutil.h" #include "emvdataels.h" #include "emvcard.h" diff --git a/armsrc/emvutil.c b/armsrc/emvutil.c index f1eadaf69..81ece6ac1 100644 --- a/armsrc/emvutil.c +++ b/armsrc/emvutil.c @@ -1360,6 +1360,24 @@ int emv_select(uint8_t* AID, uint8_t AID_len, void* data) return iso14_apdu(selectCmd, selectCmd_len, data); } + +int emv_selectPPSE() +{ + int isOK = 0; + //PPSE directory = "2PAY.SYS.DDF01" + //uint8_t AID[14] = {0x32,0x50,0x41,0x59,0x2E,0x53,0x59,0x53,0x2E,0x44,0x44,0x46,0x30,0x31}; + while(true) { + if(!emv_select((uint8_t*)DF_PSE, 14, NULL)){ + if(MF_DBGLEVEL >= 1) Dbprintf("SELECT PPSE FAILED"); + break; + } + isOK=1; + break; + } + if(MF_DBGLEVEL >= 2) DbpString("SELECT_PPSE Finished"); + return isOK; +} + //perform READ RECORD int emv_readrecord(uint8_t recordnumber, uint8_t sfi, void* data) { diff --git a/armsrc/emvutil.h b/armsrc/emvutil.h index bb6216f0e..25d2bfd5a 100644 --- a/armsrc/emvutil.h +++ b/armsrc/emvutil.h @@ -2,7 +2,6 @@ // Peter Fillmore 2014 // code derived off merloks mifare code // -// // This code is licensed to you under the terms of the GNU GPL, version 2 or, // at your option, any later version. See the LICENSE.txt file for the text of // the license. @@ -23,7 +22,6 @@ #include "BigBuf.h" #include "iso14443crc.h" #include "iso14443a.h" -#include "emvutil.h" #include "emvdataels.h" //EMV data elements #include "emvtags.h" //EMV card structure