Hello everyone,
 
I was wondering if anybody has tought about adding card type detection to
CT-API - Resource manager. I think it could be usefull to abstract the
aplication programer from knowing the card transport protocol, and
implement the T=0, T=1, etc. specific comunication procedures somewhere
within the API libraries. 
 
Currently, as far as I can see nor David's neither Gregor's implementation
detect card protocol before sending commands to the card. Reflex CT-API
allways uses T=0 and MCT allways uses T=1 (please tell me if I'm wrong).
 
One posibility: in the CT-API driver, check card protocol before sending
any command to the card. This implies determining wether the card has
changed since last CT_data command or not, (this can be done with Towitoko
readers, I dont't know with Reflex or MCT), reset the card if it changed,
and store the ATR in a global static variable. After that the card
protocol can be determined from the previously stored ATR (interface byte
TD1 & 0x0F). 
 
I have written some ATR decodificacion utilities (like get protocol, get
historical bytes, get interface byte TXi), that will be included with my
Towitoko CT-API driver. Maybe they could be usefull for every driver. 
 
I appreciate any comment or suggestion. 
 
Saludos,
Carlos



***************************************************************
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
***************************************************************

Reply via email to