I've finaly found my problem. thanks to Karsten Ohme who suggested me to trace
APDU using pcscd -f -a -d, I saw that the "format 1" command returned "6A
82".
Then using google, I was able to find that the applet may not be proprerly
installed. Indeed it wasn't! After step 3 below, I forgot to "Install" the
loaded applet and tryed directly a format (and obviously without any
success). [The applet was loaded, but not installed]
Would it be interresting to add some code to muscleTool.c around line 597?
I mean is it the correct place to do so?
if rv == 0x6A82 (OPGP_ISO7816_ERROR_FILE_NOT_FOUND) then display an
appropriate message like "Is your applet correctly installed?"?
if (rv != MSC_SUCCESS)
{
free(pConnection);
pConnection = 0;
printf("ERR: EstablishConnection Failed !\n");
printf("Is your card already formated?\n");
goto end;
}
My knowledge about smartcard is realy low, and maybe my suggestion is stupid,
thus I do not propose patch as I see that OPGP_ISO7816_ERROR_FILE_NOT_FOUND
is defined into GlobalPlatform.h and muscleTool is not linked with
GlobalPlatform.
Finaly,
As I understand, in order to use my CyberFlex 64K, I need to do
- load applet
- install applet!!!
- format card
I've used CFlexAccess32. What would have been the gpshell equivalent?
(especialy the install step).
As my card are 64K models (not 32K), is there a way to have more room to work
with? (I would be not cool to use a 64K model just like a 32K model leaving
32K unused/unavailable ;-) )
I mean: how do I determine optimum parameter for the install phase and the
setup phase?
Anyway, I wish big thanks to all of you who had helped me by giving advices
and tips. I still have problems (identified) with my GemXpresso211PKIS and
its weakened auth security mechanism not yet supported, but I I'm definitely
not blocked anymore as I can use my cyberflex.
My smartcard knowledge and understanding is far to low for me to contribute
with patches, but I'll try to publish all Mandriva RPMS specs files I've made
so most of stuffs I use could be installed easily.
> Here is what I've done so far:
>
> 1) inserted the card and read the ATR using pcsc_scan.
> the ATR is "3B 95 95 40 FF AE 01 03 00 00"
>
> 2) I've inserted the ATR in the /usr/share/pcsc/smartcard_list.txt
> and checked that now, pcsc_scan recognize it.
>
> 3) I loaded the CardEdge.bin applet to the card using
> CFlexAccess32Loader/load.sh (it apparently succeeded).
The missing action was here: needed to do a ./install.sh
(and then format command was available (but I used ./setup.sh)
> 4) As root, I've run the /usr/sbin/bundleTool and selected the
> mscMuscleCard.bundle
> thus the file
> /usr/lib/pcsc/services/mscMuscleCard.bundle/Contents/Info.plist has been
> updated with <string>3B959540FFAE01030000</string> value. thus the end of
> the file became:
> <key>spAtrValue</key>
> <string>3B959540FFAE01030000</string>
> <string>3B8540206801010204</string>
> <string>3B8540206801010204</string>
> <string>3B751300009C02020102</string>
> <string>3B6500009C02020102</string>
> <string>3B3B94008065AF030D0174830F9000</string>
> <string>3F6D000080318065B00501025E83009000</string>
> <key>spDefaultApplication</key>
> <string>A00000000101</string>
>
> 5) As normal user I started muscleTool
>
> 6) I typed "tokens" and saw: "1. MuscleCard Applet"
>
> 7) I typed "connect 1" which failed as expected as the card is not
> formatted.
>
> 8) I typed "format 1" and it failed with the following error:
> muscleTool > format 1
> ERR: EstablishConnection Failed ! (0x9C52 Token is unsupported)
>
--
Olivier LAHAYE
Motorola Labs IT Manager
Computer & Information Systems
European Communications Research
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle