And the extra byte in the first ATR is TA1, coded 94, which here says
the card I/O can run at a higher bit rate that fclock / 372. Indeed it
can go at fclock / 64, and might be able to do intermediate rates
subject to PPS negotiation (see 7816-3:1997 section 6.5 and section 7).
Typical design if, say, the card is to be used as an EMV card or as a
high performance GSM card. In use as an EMV card, after a soft reset the
card is running as a basic interoperable EMV style card platform.
TS 3B: direct convention
T0 7B: TA1, TB1, TC1 all present, then 11 historical bytes
TA1 94: see above
TB1 00: no Vpp
TC1 00: no extra guard time
Peter
Damien Sauveron wrote:
Carl wrote:
I ran testpcsc to get the card's ATR and put it in
/usr/local/pcsc/services/mscMuscleCard.bundle/Contents/Info.plist.
The problem is that while the card is still inserted, the ATR that is
being found for the card changes while the card remains inserted.
After it changes, pcsclite says there are no tokens in the reader
because it doesn't recognize the ATR. Without removing the card, I
get the following behavior:
It may be normal. First I think that it is not pcsc-lite that says that there is
no token but Muscle. If I well understand the logs the first ATR is
3B7B9400008065B08301017483009000 and the second is
3B6B00008065B08301017483009000.
This is possible because there exists two resets: the warm reset
(SCARD_RESET_CARD) and the cold reset (SCARD_UNPOWER_CARD).
When you insert your card in a reader the card always sends its cold reset.
I guess that if you run twice testpcsc you will get the same ATR twice because
when testpcsc closes the connection it uses SCARD_UNPOWER_CARD. But if it uses
the
SCARD_RESET_CARD I think you will get two different ATRs. Indeed the card
should send its warm reset in this last case.
I have quick looked the source of muscleTool and it seems that it disconnects
using an argument that maps SCARD_RESET_CARD in the Muscle library. Thus the
first time when you insert your card you get the "good" cold reset but when
muscleTool closes it requires to pcsc-lite to do a warm reset and also when
you run again muscleTool you have a different ATR.
In order to test this assumption about the cold reset and warm reset change the
last "rv
= SCardDisconnect(hCard, SCARD_UNPOWER_CARD);" in the source code of testpcsc.c
by the following line "rv = SCardDisconnect(hCard, SCARD_RESET_CARD);", compile
it, insert your card and run it twice. If you get 2 different ATRs, you should
have the explanation of why your ATR change. :-) Else it may be a bug in the
CCID driver or pcsc-lite. In this case try the CVS version before to do a new
bug report.
Note that many cards have the same cold and warm reset also with them there is
no problem.
As I am not a Muscle expert I let other people answer about the other problems.
_______________________________________________
Muscle mailing list
[EMAIL PROTECTED]
http://lists.drizzle.com/mailman/listinfo/muscle