libmusclecard implements a plugin architecture.  The plugins actually do the 
work.  The library maps from the token to the specific plugin by looking at the 
ATR of the card.  

There's a directory somewhere (default /usr/local/pcsc/services for unix and 
c:\Program Files\Muscle\services" for window) that contains a number of 
bundles.  The bundles consist of an XML file that describes which ATRs that 
bundle supports and the actual plugin code for the bundle.

There's a tool in the libmusclecard package (bundletool) that makes it pretty 
easy to add a new ATR to an existing bundle.  But you can edit the XML file 
directly and add it there.

If your card isn't listed in one of the bundles, you'll get the Token Unknown 
error regardless of what applets the card contains.

The above assumes you already have the MCardPlugin installed - that's the 
plugin that implements the system side interface that talks to the token.  If 
not, install that first, then run bundletool if you need to.




At 05:59 AM 3/8/2008, Anri Lau wrote:
>Hi All,
>
>Muscle-tool 2.1.0 and muscleframework-1.1.6(libmusclepkcs11/ MCardPlugin/) 
>libmusclecard-1.3.3 has installed in my centos 5.1. But 
>
>muscleTool > tokens
>No Valid Tokens Found
>
>When the muscleTool started,  the log of pcscd is 
>
>winscard_msg_srv.c:288:SHMProcessEventsContext() correctly processed client: 7
>winscard.c:253:SCardReleaseContext() Releasing Context: 17013919
>winscard_msg_srv.c:276:SHMProcessEventsContext() Client has disappeared: 7
>winscard_svc.c:144:ContextThread() Client die: 7
>
>When i input the command
>
>The following is printed by pcscd
>
>winscard_msg_srv.c:217:SHMProcessEventsServer() Common channel packet arrival
>winscard_msg_srv.c:226:SHMProcessEventsServer() SHMProcessCommonChannelRequest 
>detects: 7
>pcscdaemon.c:174:SVCServiceRunLoop() A new context thread creation is 
>requested: 7
>winscard_svc.c:131:ContextThread() Thread is started: 7
>winscard_msg_srv.c:288:SHMProcessEventsContext() correctly processed client: 7
>winscard_svc.c:179:ContextThread() Client is protocol version 2:2
>winscard_msg_srv.c:288:SHMProcessEventsContext() correctly processed client: 7
>winscard.c:242:SCardEstablishContext() Establishing Context: 16975534
>
>The result of opensc-tool -lan is
>
>Nr.    Driver     Name
>0      pcsc       CASTLES EZ100PU 00 00
>3b:7b:18:00:00:00:31:c0:64:77:e9:10:00:01:90:00
>Muscle Card
>
>The applet was loaded by gpshell and  has been setuped and  personalized by 
>pkcs15-init -EC.
>
>The following the result of muscletest
>
>********************************************************
>
>Token #0
>Token name     : Token Unknown
>Slot name      : CASTLES EZ100PU 00 00
>Token id       : 3B7B1800000031C06477E91000019000
>Token state    : 20022
>Token type     : 0002 token unkown 
>
>********************************************************
>Token #0
>Token name     : Token Unknown
>Slot name      : CASTLES EZ100PU 00 00
>Token id       : 3B7B1800000031C06477E91000019000
>Token state    : 20022
>Token type     : 0002 token unkown 
>
>EstablishConn returns     : Token is unsupported
>
>Is any configuration missed by me. Is there some operation errors?
>
>Thank you!
>
>-- 
>Best regards to you and your family 
>_______________________________________________
>Muscle mailing list
>[email protected]
>http://lists.drizzle.com/mailman/listinfo/muscle


_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to