I have an Desfire EV1 Smart Card and try to read it by DUALi reader. I'm aware that for the Desfire I need to wrap the command.
Tried sent the simple APDU command like this:
90 60 00 00 00 00
INT uiLen = 0;
BYTE pbData[256];
BYTE cmd[6] = {0x90,0x60,0x00,0x00,0x00,0x00};
iDERc = DE_APDU(
m_sPortNoM,
6, cmd,
(LPINT)&uiLen, (LPBYTE)pbData);
but why the return always : DE_NACK_COUNT_ERROR?
Also tried to send some APDU command to the SAM, always encounter errors. the return code was 1 which is not defined in any Response code definitions.
already send the DE_InitPort and DE_IC_PowerOn command and the return was successful.
Thanks
EDIT :
For DE_APDU command and parameters explanation:
int DE_APDU(int nPort, BYTE datalen, LPBYTE data, LPINT outlen, LPBYTE lpRes)
- It sends and receive data as APDU format defined by ISO7816. Device change it to ISO14443 protocol and send to card, so User can easily use this function without knowing of ISO14443 protocol.
- Parameters
- int nPort[in] : Port number.
- int datalen[in] : Length of LPBYTE data.
- LPBYTE data[in] : APDU to send to card.
- LPINT outlen[out] : Length of LPBYTE lpRes
- LPBYTE lpRes[out] : Response data.