Hi Carl, > 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. Regards, -- Damien Sauveron ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. _______________________________________________ Muscle mailing list [EMAIL PROTECTED] http://lists.drizzle.com/mailman/listinfo/muscle
