Hi Michael
You can determine the size of memory by inspecting the 4 byte ATR returned in
the REQUEST_ICC command. Now obviously, this requires a card reader that has
this kind of support. If not, you can read the first 4 bytes of memory, which
typically contains the ATR.
If coded properly, then the second byte contains the size of memory. In
our reader driver we use the following code segment to determine the memory
size:
help = (ctx->ATR[1] & 0x78) >> 3;
if(ctx->ATR[1] == 0xff)
help = 0x00;
if (help)
pt->Number_of_Data_Units = 64 << help;
else
pt->Number_of_Data_Units = 256;
Hope this helps. Additional information is contained in the MCT specifications.
You will find a link on our website.
Andreas
--
Andreas Schwier Tel. +49 171 8334920
CardContact Software & System Consulting
http://www.cardcontact.de
***************************************************************
Linux Smart Card Developers - M.U.S.C.L.E.
(Movement for the Use of Smart Cards in a Linux Environment)
http://www.linuxnet.com/smartcard/index.html
***************************************************************