Hi David.

Sorry for my late answer, but I was in hospital for
about one week.

> Hi everyone.  I was curious if anyone could look at
> the following and tell me what the problem is.  I'm
> sending 3 consecutive T=1 commands. The first
> command always works but any after that do not. For
> example: [...]

Two or three people allready wrote something about 
possible sources for failures (EDC and the send
sequence counter). I just would like to add some words
on the explanation of the send sequence counter that
Morton Norman wrote. I would maintain two variables
that keep track of the sequence numbers of the blocks
sent by you (ssn) and received from the card (rsn). 

As Morton explained, these counters do not depend on
each other. Whenever you send a block the ssn must
be toggled. Whenever you receive a block from the card
its N(S) should be the 1 if your rsn is 0 and vice
versa. If not, then there has been a paket loss that
should be told to the card using an according s-block
(resend last block, iirc). 

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

Reply via email to