I am trying to develop a mac os X application (in cocoa) that uses the pcscd to access a couple of CCID compliant devices. The long term goal is to use these devices to recognize which user is interacting w/ the program. At the moment I am just getting started and trying to figure out how to use the pcscd. To get started I wrote the following routine to list the smart card devices that are attached to my mac... - (void)ListSmartCardDevices { MSCLPTokenInfo tokenList; MSC_RV rv; MSCULong32 listSize = 0; rv = MSCListTokens( MSC_LIST_KNOWN, NULL, &listSize ); if (rv != MSC_SUCCESS) { char *err_str = pcsc_stringify_error(rv); NSLog(@"MSCListTokens failed for reason %s", err_str); return; } if (listSize == 0) { NSLog(@"MSCListTokens found no smart cards"); return; } tokenList = (MSCLPTokenInfo)malloc(sizeof(MSCTokenInfo)*listSize); rv = MSCListTokens( MSC_LIST_KNOWN, tokenList, &listSize ); if (rv != MSC_SUCCESS) { char *err_str = pcsc_stringify_error(rv); NSLog(@"MSCListTokens failed for reason %s", err_str); return; } for (int i = 0; i < listSize; i++) { printf("Token name : %s\n", tokenList[i].tokenName); printf("Slot name : %s\n", tokenList[i].slotName); } } If I run my program (which includes this routine) w/ no smartcards plugged in I get the following (predictable) output. [Session started at 2009-06-02 15:37:14 -0700.] *2009-06-02 15:37:15.155 POS[59501:10b] MSCListTokens found no smart cards* If I then plug in the ACR122 device from ACS system and rerun my program I get the following error [Session started at 2009-06-02 15:38:18 -0700.] *2009-06-02 15:38:19.470 POS[59511:10b] MSCListTokens failed for reason Unknown PCSC error: 40019 [0x00009C53]* I get a similar error if I plug in the SCL010 card reader from SCM microsystems. Can anyone suggest any debugging next steps? Cheers, J
2009/6/3 Johnny Alaska <johnnyalaska@gmail.com>:
I am trying to develop a mac os X application (in cocoa) that uses the pcscd to access a couple of CCID compliant devices. The long term goal is to use these devices to recognize which user is interacting w/ the program. At the moment I am just getting started and trying to figure out how to use the pcscd.
To get started I wrote the following routine to list the smart card devices that are attached to my mac...
[...]
rv = MSCListTokens( MSC_LIST_KNOWN, NULL, &listSize );
Can anyone suggest any debugging next steps?
MSCListTokens() has nothing to do with PC/SC. It is a function provided by libmusclecard [1]. Unless you have a card supported by libmusclecard you should not use this library. The PC/SC API is described in [2]. Bye [1] http://svn.debian.org/wsvn/pcsclite/trunk/libmusclecard/doc/#_trunk_libmuscl... [2] http://pcsclite.alioth.debian.org/api/group__API.html -- Dr. Ludovic Rousseau
Is there a way to specify the dbg level of output for the muscle card library? I would like to figure out where this library is getting hung up and fix it instead of re-implementing something similar for my specific application. I have been looking at the musclecard library code and it appears that you wrote it and it last changed in ~2006, is there a more up to date version of this library that I can try? Also is there an authoritative list of devices supported by the muscle card library? Cheers, J On Wed, Jun 3, 2009 at 11:31 PM, Ludovic Rousseau < ludovic.rousseau@gmail.com> wrote:
2009/6/3 Johnny Alaska <johnnyalaska@gmail.com>:
I am trying to develop a mac os X application (in cocoa) that uses the pcscd to access a couple of CCID compliant devices. The long term goal is to use these devices to recognize which user is interacting w/ the program. At the moment I am just getting started and trying to figure out how to use the pcscd.
To get started I wrote the following routine to list the smart card devices that are attached to my mac...
[...]
rv = MSCListTokens( MSC_LIST_KNOWN, NULL, &listSize );
Can anyone suggest any debugging next steps?
MSCListTokens() has nothing to do with PC/SC. It is a function provided by libmusclecard [1]. Unless you have a card supported by libmusclecard you should not use this library.
The PC/SC API is described in [2].
Bye
[1] http://svn.debian.org/wsvn/pcsclite/trunk/libmusclecard/doc/#_trunk_libmuscl... [2] http://pcsclite.alioth.debian.org/api/group__API.html
-- Dr. Ludovic Rousseau
Is there a way to specify the dbg level of output for the muscle card library? I would like to figure out where this library is getting hung up and fix it instead of re-implementing a similar abstraction for my specific application. I have been looking at the musclecard library code and it appears that you wrote it and it last changed in ~2006, is there a more up to date version of this library that I can try? Also is there an authoritative list of devices supported by the muscle card library? Cheers, J On Wed, Jun 3, 2009 at 11:31 PM, Ludovic Rousseau < ludovic.rousseau@gmail.com> wrote:
2009/6/3 Johnny Alaska <johnnyalaska@gmail.com>:
I am trying to develop a mac os X application (in cocoa) that uses the pcscd to access a couple of CCID compliant devices. The long term goal is to use these devices to recognize which user is interacting w/ the program. At the moment I am just getting started and trying to figure out how to use the pcscd.
To get started I wrote the following routine to list the smart card devices that are attached to my mac...
[...]
rv = MSCListTokens( MSC_LIST_KNOWN, NULL, &listSize );
Can anyone suggest any debugging next steps?
MSCListTokens() has nothing to do with PC/SC. It is a function provided by libmusclecard [1]. Unless you have a card supported by libmusclecard you should not use this library.
The PC/SC API is described in [2].
Bye
[1] http://svn.debian.org/wsvn/pcsclite/trunk/libmusclecard/doc/#_trunk_libmuscl... [2] http://pcsclite.alioth.debian.org/api/group__API.html
-- Dr. Ludovic Rousseau
2009/6/4 Johnny Alaska <johnnyalaska@gmail.com>:
Is there a way to specify the dbg level of output for the muscle card library?
$ export MUSCLECARD_DEBUG=0 $ my_program
I would like to figure out where this library is getting hung up and fix it instead of re-implementing a similar abstraction for my specific application. I have been looking at the musclecard library code and it appears that you wrote it and it last changed in ~2006, is there a more up to date version of this library that I can try?
No. But OpenSC should now have support of the MuscleCard applet.
Also is there an authoritative list of devices supported by the muscle card library?
No. For Musclecard questions you should use the muscle mailing list at http://musclecard.com/list.html Bye -- Dr. Ludovic Rousseau
participants (2)
-
Johnny Alaska
-
Ludovic Rousseau