Carlos Prados wrote:
> 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).

When my CT-API talks to the MCT it uses T=1, *not* depending what kind of Card is 
inserted. The MCT makes the conversion. When using an MCT, you don't
have to care what card you have inserted.

 
> 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).

That's what an MCT does internally. If you send a REQUEST_ICC the MCT first checks 
what kind of Card is inserted and uses the correct Protocol.

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