EasyManua.ls Logo

Access IS LSR118 - C.4 Get ATR of the Card; C.5 Communicate with Card; C.6 Determine MIFARE Type from ATR; C.7 Disconnect the Card

Access IS LSR118
77 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Page 72 of 77 Copyright © Access-IS 2020
C.4 Get ATR of the card
RcvLength = 128;
if(SCardStatus(hCrd, (LPSTR)_Buffer, &RcvLength, NULL, NULL, ATR, &_ATRLen) !=
SCARD_S_SUCCESS)
{
SCardDisconnect(hCrd, SCARD_LEAVE_CARD);
MessageBox(“Unable to get ATR of card”);
}
else
{
MessageBox(“ATR successful”);
}
C.5 Communicate with card
RcvLength = RX_BUFFER_SIZE;
if(SCardTransmit(hCrd, &SendPci, TX_Buffer, Transmit_Length, NULL, RX_Buffer, &RcvLength) !=
SCARD_S_SUCCESS)
{
MessageBox(“Communication failed”);
}
else
{
MessageBox(“Communication successful”);
}
C.6 Determine if ATR indicates MIFARE type
Refer to MIFARE cards on page 37.
C.7 Disconnect the card
SCardDisconnect(hCrd, SCARD_LEAVE_CARD);

Table of Contents

Related product manuals