<Forwarded by [EMAIL PROTECTED]>

David,
I see two errors in your commands to the IBM card (without knowing that much
of the particular card):

1. You do not send any EDC character, error detection code, at the end of
each command. Or perhaps you do, but you forgot to include it in the mailed
example.

2. You have to consider the "send sequence number" in T=1, named N(S) in the
ISO standard papers. This is one of those small details in T=1 protocol that
makes it a bit trickier than T=0 (the same goes for the "more"-bit too). The
N(S) bit is bit b7 (counted b1-b8) of the PCB byte in the header. This bit
should be toggled for each I-block (=command) you send. So your Write Binary
command would be:
-> 00 40 07 00 d6 00 00 02 00 00  plus an EDC byte.

And your next command after that, whatever it will be, would have a PCB-byte
of 00 again, and so on (I assume short commands where the more-bit is not
needed). The responses from the card have their own toggling of the
N(S)-bit, quite independently of your N(S)-bits. If you should go by the
book you should check that the N(S)-bit from the card really toggles for
each I-block received (this error checking is probably just what the IBM
card did, which caused the error indicating R-block).

Kindest regards
Mats Hansson

>>From: David Corcoran <[EMAIL PROTECTED]>
>>Subject: MUSCLE T=1 Problem
>>Cc: [EMAIL PROTECTED]
>>Sender: [EMAIL PROTECTED]
>>Reply-To: [EMAIL PROTECTED]
>>
>>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:
>>
>>IBM T=1 Card
>>
>>Command 1: Select File
>>-> 00 00 07 00 a4 00 00 02 00 07
>><- 00 00 10 63 0c 03 e8 00 07 00 00 00 ff ff 11 01 00 90 00 13
>>
>>
>>Command 2: Write Binary
>>-> 00 00 07 00 d6 00 00 02 00 00
>><- 00 92 00 92
>>
>>
>>No matter what the first command always work and the second comes back with
>>00 92 00 92.  This could only be an error R block but why ?  Is there
>>something I need to do to close the first command ?
>>
>>Regards,
>>Dave
>>
>>David Corcoran                                        Purdue University
>>
>>1008 Cherry Lane                              MUSCLE Smartcard Developers
>>West Lafayette, IN 47906                      http://www.linuxnet.com
>>765-463-0096                                  317-514-4797
>>
>>If you can't make it work - at least make it look good.  ~ Bill Gates, M$
>>
>>
>>
>>***************************************************************
>>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
>>***************************************************************
>>
>

Mats Hansson
Intertex Data AB
Rissneleden 45
174 44 Sundbyberg
Sweden

Tel +46-8-6282828    Fax +46-8-6286414    www: http://www.intertex.se

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