Page 1 of 2

GidsAPP User Guide - GidsApp initialization process(2/7)

Posted: Mon Jan 09, 2017 9:56 pm
by JavaCardOS

    Firstly, prepare Smart Card Reader R502 and Java Card JC30M48CR, and make sure that GidsApp has been downloaded and installed successfully on the card. Then use OpenSC Tool to perform card initialization. including setting PIN, writing admin-key and serial-number and creating file system.

    steps:

    Press "Win+R" keys to open "Run" dialog box, type "cmd" and click on OK .

    Switch to opensc directory:

    Check the corresponding smart card reader connection mode No.:

    Type the command "gids-tool.exe -r 0 –X" and then enter admin key with length 48 bytes or press Enter to set the admin key to "00...00":

    Note:
    -r: Select the smart card reader.
    0: Smart card reader connection mode No. (Here we use contact card, so the No. is 0.)
    -X: Perform personalization, including admin-key, PIN, serial-number.


    Type “PIN” and press Enter.

    Type “serial number” or press Enter to set to the default value.

    Then the card personalization is finished.

Re: GidsAPP User Guide - GidsApp initialization process(2/7)

Posted: Mon Jan 16, 2017 9:41 am
by ahmedelsaaid
after send this command to command window "gids-tool.exe -r 6 –X " it return error message:

C:\Program Files\OpenSC Project\OpenSC\tools>gids-tool.exe -r 6 -X
===============================
Dumping the content of the card
===============================
unable to retrieve the master file: File not found
Is that a new card ?


--------------------

how can i fix this

Re: GidsAPP User Guide - GidsApp initialization process(2/7)

Posted: Mon Jan 16, 2017 9:41 am
by ahmedelsaaid
after send this command to command window "gids-tool.exe -r 6 –X " it return error message:

C:\Program Files\OpenSC Project\OpenSC\tools>gids-tool.exe -r 6 -X
===============================
Dumping the content of the card
===============================
unable to retrieve the master file: File not found
Is that a new card ?


--------------------

how can i fix this

update:

i open opensc source file and found that master file id = 0xA000 while it is equal 0x3f00 in the GIDS applet source code


how can i fix this problem?

Re: GidsAPP User Guide - GidsApp initialization process(2/7)

Posted: Wed Jan 18, 2017 2:43 am
by JavaCardOS
ahmedelsaaid wrote:after send this command to command window "gids-tool.exe -r 6 –X " it return error message:

C:\Program Files\OpenSC Project\OpenSC\tools>gids-tool.exe -r 6 -X
===============================
Dumping the content of the card
===============================
unable to retrieve the master file: File not found
Is that a new card ?


--------------------

how can i fix this

update:

i open opensc source file and found that master file id = 0xA000 while it is equal 0x3f00 in the GIDS applet source code


how can i fix this problem?


Hi,

Thanks for your question.

We cannot reproduce your problem based on your description.

But according to the error message "Dumping the content of the card", we can know that the command you executed is to get card applet info, not initialization operation. It's recommended to follow this article and implement this solution step by step.

If you still have any question with this solution, please feel free to post your question here.We are always here to help.



BR

Re: GidsAPP User Guide - GidsApp initialization process(2/7)

Posted: Wed Jan 18, 2017 7:18 am
by ahmedelsaaid
JavaCardOS wrote:
ahmedelsaaid wrote:after send this command to command window "gids-tool.exe -r 6 –X " it return error message:

C:\Program Files\OpenSC Project\OpenSC\tools>gids-tool.exe -r 6 -X
===============================
Dumping the content of the card
===============================
unable to retrieve the master file: File not found
Is that a new card ?


--------------------

how can i fix this

update:

i open opensc source file and found that master file id = 0xA000 while it is equal 0x3f00 in the GIDS applet source code


how can i fix this problem?


Hi,

Thanks for your question.

We cannot reproduce your problem based on your description.

But according to the error message "Dumping the content of the card", we can know that the command you executed is to get card applet info, not initialization operation. It's recommended to follow this article and implement this solution step by step.

If you still have any question with this solution, please feel free to post your question here.We are always here to help.



BR


Hi,

thanks for your replay ,

i follow the steps very carefully and this the second step after upload and install the applet (Gids ) i start to personalize it on the card

on this step [2/7] i start with opensc tool with version mentioned in article (OpenSC-0.16.0-rc2-win64_vs12-Release.msi)
after installation i try to see the reader number from opensc it is 5

then the next step i start to send this command to window line gids-tool.exe -r 6 –X for start personalization

to find solution i start to USB sniffer and found that gids-tool.exe after select the applet - try to send this command for get data
"00CBA000045C02DF1F00"
in this command i found that application try to search for master file with (0xA000) tag but the applet master file is 0x3F00 so this the different between the application (gids-tool.exe ) and applet

this the log of gids-tool.exe sniffer

>>> 00A4040009A0000003974254465900
Time 10639 us
TotalTime 226724 us
<<< 61124F0BA00000039742544659020173034001C09000

>>> 00A4040C09A00000039742544659
Time 9532 us
TotalTime 249015 us
<<< 9000

>>> 00CBA000045C02DF1F00
Time 11357 us
TotalTime 275575 us
<<< 6A82


please try to follow what i did and try to personalize the card?

thanks for your support

Ahmed el saaid

Re: GidsAPP User Guide - GidsApp initialization process(2/7)

Posted: Thu Jan 19, 2017 1:57 am
by UNKNwYSHSA
This the command and the echo logs:

Code: Select all

C:\Program Files\OpenSC Project\OpenSC\tools>gids-tool.exe -r 4 -X
Enter admin key (48 hexadecimal characters) :
Press Enter to set the admin key to 00...00          // I press Enter;

Enter initial User-PIN (4 - 16 characters) :          // I enter 0102030405;
Enter serial number (32 hexadecimal characters):
Press Enter to set a random serial number          // I press Enter;


This is the APDUs i captured when the command process.
I write comments for each APDU you mentioned.

Code: Select all

>> 00 a4 04 00 0f d2 33 00 00 00 45 73 74 45 49 44 20 76 33 35 00 
<< 6a 82
>> 00 ca df 30 05 65
<< 6a 88
>> 00 a4 04 00 06 a0 00 00 00 01 01 0d
<< 6a 82
>> 00 a4 04 00 09 a0 00 00 03 08 00 00 10 00 00 5d
<< 6a 82
>> 00 a4 04 00 09 a0 00 00 03 08 00 00 10 00 00 1d
<< 6a 82
>> 00 a4 04 00 0c f2 76 a2 88 bc fb a6 9d 34 f3 10 01 f9
<< 6a 82
>> 00 a4 04 00 09 a0 00 00 03 97 42 54 46 59 00                         // First APDU;
<< 61 12 4f 0b a0 00 00 03 97 42 54 46 59 02 01 73 03 40 01 c0 90 00
>> 00 a4 04 0c 09 a0 00 00 03 97 42 54 46 59 00                         // Second APDU;
<< 90 00
>> 00 cb a0 00 04 5c 02 df 1f 00                                        // This APDU is always response 6A82;
<< 6a 82
>> 00 24 01 80 0a 30 31 30 32 30 33 30 34 30 35                         // But the initialize process continues;
<< 90 00
>> 00 e0 00 00 0e 62 0c 82 01 39 83 02 a0 00 8c 03 03 30 00
<< 90 00
>> 00 44 00 00 00
<< 90 00
>> 00 e0 00 00 0e 62 0c 82 01 39 83 02 a0 10 8c 03 03 30 00
<< 90 00
>> 00 44 00 00 00
<< 90 00
>> 00 e0 00 00 0e 62 0c 82 01 39 83 02 a0 11 8c 03 03 30 ff
<< 90 00
>> 00 44 00 00 00
<< 90 00
>> 00 e0 00 00 0e 62 0c 82 01 39 83 02 a0 12 8c 03 03 20 00
<< 90 00
>> 00 44 00 00 00
<< 90 00
>> 00 e0 00 00 0e 62 0c 82 01 39 83 02 a0 13 8c 03 03 30 30
<< 90 00
>> 00 44 00 00 00
<< 90 00
>> 00 e0 00 00 0e 62 0c 82 01 39 83 02 a0 14 8c 03 03 20 20
<< 90 00
>> 00 44 00 00 00
<< 90 00
>> 00 e0 00 00 1c 62 1a 82 01 18 83 02 b0 80 8c 04 87 00 20 ff a5 0b a4 09 80 01 02 83 01 80 95 01 c0
<< 90 00
>> 00 44 00 00 00
<< 90 00
>> 00 db 3f ff 26 70 24 84 01 80 a5 1f 87 18 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 03 b0 73 dc
<< 90 00
>> 00 db a0 00 91 df 1f 81 8d 01 6d 73 63 70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 a0 00 00 00 00 00 00 00 00 00 00 00 63 61 72 64 69 64 00 00 00 00 00 20 df 00 00 12 a0 00 00 00 00 00 00 00 00 00 00 00 63 61 72 64 61 70 70 73 00 00 00 21 df 00 00 10 a0 00 00 00 00 00 00 00 00 00 00 00 63 61 72 64 63 66 00 00 00 00 00 22 df 00 00 10 a0 00 00 6d 73 63 70 00 00 00 00 00 63 6d 61 70 66 69 6c 65 00 00 00 23 df 00 00 10 a0 00 00
<< 90 00
>> 00 db a0 10 0b df 21 08 6d 73 63 70 00 00 00 00
<< 90 00
>> 00 db a0 10 09 df 22 06 00 00 00 00 00 00
<< 90 00
>> 00 db a0 10 03 df 23 00
<< 90 00
>> 00 db a0 12 13 df 20 10 98 78 71 44 38 5d 93 96 5c 2e e2 c9 1a 3b 5e 0c
<< 90 00
>> 00 a4 00 0c 02 3f ff
<< 90 00
>> 00 44 00 00
<< 90 00

Re: GidsAPP User Guide - GidsApp initialization process(2/7)

Posted: Thu Jan 19, 2017 2:11 am
by JavaCardOS
Hi @ahmedelsaaid, you can check what @UNKNwYSHSA said. If you still have any doubt, please let us know and I will ask our techinical support to help you via Teamviewer.

Re: GidsAPP User Guide - GidsApp initialization process(2/7)

Posted: Thu Jan 19, 2017 3:10 am
by ahmedelsaaid
UNKNwYSHSA wrote:This the command and the echo logs:

Code: Select all

C:\Program Files\OpenSC Project\OpenSC\tools>gids-tool.exe -r 4 -X
Enter admin key (48 hexadecimal characters) :
Press Enter to set the admin key to 00...00          // I press Enter;

Enter initial User-PIN (4 - 16 characters) :          // I enter 0102030405;
Enter serial number (32 hexadecimal characters):
Press Enter to set a random serial number          // I press Enter;


This is the APDUs i captured when the command process.
I write comments for each APDU you mentioned.

Code: Select all

>> 00 a4 04 00 0f d2 33 00 00 00 45 73 74 45 49 44 20 76 33 35 00 
<< 6a 82
>> 00 ca df 30 05 65
<< 6a 88
>> 00 a4 04 00 06 a0 00 00 00 01 01 0d
<< 6a 82
>> 00 a4 04 00 09 a0 00 00 03 08 00 00 10 00 00 5d
<< 6a 82
>> 00 a4 04 00 09 a0 00 00 03 08 00 00 10 00 00 1d
<< 6a 82
>> 00 a4 04 00 0c f2 76 a2 88 bc fb a6 9d 34 f3 10 01 f9
<< 6a 82
>> 00 a4 04 00 09 a0 00 00 03 97 42 54 46 59 00                         // First APDU;
<< 61 12 4f 0b a0 00 00 03 97 42 54 46 59 02 01 73 03 40 01 c0 90 00
>> 00 a4 04 0c 09 a0 00 00 03 97 42 54 46 59 00                         // Second APDU;
<< 90 00
>> 00 cb a0 00 04 5c 02 df 1f 00                                        // This APDU is always response 6A82;
<< 6a 82
>> 00 24 01 80 0a 30 31 30 32 30 33 30 34 30 35                         // But the initialize process continues;
<< 90 00
>> 00 e0 00 00 0e 62 0c 82 01 39 83 02 a0 00 8c 03 03 30 00
<< 90 00
>> 00 44 00 00 00
<< 90 00
>> 00 e0 00 00 0e 62 0c 82 01 39 83 02 a0 10 8c 03 03 30 00
<< 90 00
>> 00 44 00 00 00
<< 90 00
>> 00 e0 00 00 0e 62 0c 82 01 39 83 02 a0 11 8c 03 03 30 ff
<< 90 00
>> 00 44 00 00 00
<< 90 00
>> 00 e0 00 00 0e 62 0c 82 01 39 83 02 a0 12 8c 03 03 20 00
<< 90 00
>> 00 44 00 00 00
<< 90 00
>> 00 e0 00 00 0e 62 0c 82 01 39 83 02 a0 13 8c 03 03 30 30
<< 90 00
>> 00 44 00 00 00
<< 90 00
>> 00 e0 00 00 0e 62 0c 82 01 39 83 02 a0 14 8c 03 03 20 20
<< 90 00
>> 00 44 00 00 00
<< 90 00
>> 00 e0 00 00 1c 62 1a 82 01 18 83 02 b0 80 8c 04 87 00 20 ff a5 0b a4 09 80 01 02 83 01 80 95 01 c0
<< 90 00
>> 00 44 00 00 00
<< 90 00
>> 00 db 3f ff 26 70 24 84 01 80 a5 1f 87 18 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 03 b0 73 dc
<< 90 00
>> 00 db a0 00 91 df 1f 81 8d 01 6d 73 63 70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 a0 00 00 00 00 00 00 00 00 00 00 00 63 61 72 64 69 64 00 00 00 00 00 20 df 00 00 12 a0 00 00 00 00 00 00 00 00 00 00 00 63 61 72 64 61 70 70 73 00 00 00 21 df 00 00 10 a0 00 00 00 00 00 00 00 00 00 00 00 63 61 72 64 63 66 00 00 00 00 00 22 df 00 00 10 a0 00 00 6d 73 63 70 00 00 00 00 00 63 6d 61 70 66 69 6c 65 00 00 00 23 df 00 00 10 a0 00 00
<< 90 00
>> 00 db a0 10 0b df 21 08 6d 73 63 70 00 00 00 00
<< 90 00
>> 00 db a0 10 09 df 22 06 00 00 00 00 00 00
<< 90 00
>> 00 db a0 10 03 df 23 00
<< 90 00
>> 00 db a0 12 13 df 20 10 98 78 71 44 38 5d 93 96 5c 2e e2 c9 1a 3b 5e 0c
<< 90 00
>> 00 a4 00 0c 02 3f ff
<< 90 00
>> 00 44 00 00
<< 90 00


hi

i follow what u send
gids-tool.exe -r 4 -X
then it work correct thanks for your help
regards,
ahmed el saaid

Re: GidsAPP User Guide - GidsApp initialization process(2/7)

Posted: Thu Jan 19, 2017 3:25 am
by UNKNwYSHSA
OK.

Re: GidsAPP User Guide - GidsApp initialization process(2/7)

Posted: Tue Jul 17, 2018 10:19 am
by slimou12
please I need an APDU command to create a DF file