Hi Carlos.
> T=1 protocol is far from being trivial to implement
> if the reader hardware does not implement
> communication protocol with the card, as happens with
> Towitoko's. Maybe we should have a common GPL
> implementation of T=1, using generic I/O routines to
> comunicate with the card, so that it could be reused
> for every driver of the MUSCLE.
Thatīs what Iīm doing now, if I understood you. My
T=1-implementation uses directly the serial
communication functions as they are used in serial.c
written by David. At least this routines will be used
for sending. Reading characters from the drive/card
will be a little bit more complicated, as the
exactly length of returned data canīt be forseen.
For example, you can tell the card via the Le-Byte,
what amount of bytes you expect. But if there is a
failure due to uncorrect parameters passed to the
card, it wonīt return le bytes, but only two. Using
IO_Read(Le, buffer) would return an error in this
case.
So, reading the returned characters will be done
directly within the T=1-handling routine. But only
those routines will be used, that are used by Davidīs
serial.c (select, read, write, etc).
Bye, Mike
***************************************************************
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
***************************************************************