Our Online Store have the new products: RFID antenna board. Currently it can work with JC10M24R and JCOP4 card chips.
Compared with normal cards, the antenna board module has a smaller size and fixed holes, which is easy to integrate in the IOT(Internet Of Things) project.

Video Tutorial - How to download CAP file to smart card?

Applets Development Guide

Moderator: product

thapnk
Posts: 9
Joined: Thu Dec 10, 2015 3:37 am
Points :0
Contact:

Re: How to download CAP file to smart card?

Post by thapnk » Thu Dec 10, 2015 5:11 am

your ideal, that's mean: "80 E8 00 00 FA C4 82 01 35 01 00 1A DE CA FF ED 02 02 04 00 01 05 11 22 33 44 55 0A 74 65 73 74 41 70 70 6C 65 74 02 00 21 00 1A 00 21 00 0A 00 15 00 2A 00 0E 00 6F 00 0A 00 0F 00 00 00 5B 02 1D 00 00 00 00 00 00 02 01 00 04 00 15 02 03 01 07 A0 00 00 00 62 01 01 00 01 07 A0 00 00 00 62 00 01 03 00 0A 01 06 11 22 33 44 55 66 00 08 06 00 0E 00 00 00 80 03 00 FF 00 07 01 00 00 00 1C 07 00 6F 00 01 10 18 8C 00 00 7A 05 30 8F 00 01 3D 8C 00 02 18 1D 04 41 18 1D 25 8B 00 03 7A 03 24 18 8B 00 04 60 03 7A 19 8B 00 05 2D 19 8B 00 06 3B 03 32 1A 04 25 75 00 34 00 02 00 01 00 0D 00 02 00 2C 1A 05 25 29 04 1A 06 25 29 05 16 04 16 05 41 32 1A 03 1F 8D 00 07 3B 19 03 05 8B 00 08 70 10 19 03 08 8B 00 08 70 08 11 6D 00 8D 00 09 7A 08 00 0A 00 00 00 00 00 00 00 00 00 00 01, Recv: 64 38"???

User avatar
UNKNwYSHSA
Posts: 630
Joined: Thu May 21, 2015 4:05 am
Points :3053
Contact:

Re: How to download CAP file to smart card?

Post by UNKNwYSHSA » Thu Dec 10, 2015 5:18 am

thapnk wrote:your ideal, that's mean: "80 E8 00 00 FA C4 82 01 35 01 00 1A DE CA FF ED 02 02 04 00 01 05 11 22 33 44 55 0A 74 65 73 74 41 70 70 6C 65 74 02 00 21 00 1A 00 21 00 0A 00 15 00 2A 00 0E 00 6F 00 0A 00 0F 00 00 00 5B 02 1D 00 00 00 00 00 00 02 01 00 04 00 15 02 03 01 07 A0 00 00 00 62 01 01 00 01 07 A0 00 00 00 62 00 01 03 00 0A 01 06 11 22 33 44 55 66 00 08 06 00 0E 00 00 00 80 03 00 FF 00 07 01 00 00 00 1C 07 00 6F 00 01 10 18 8C 00 00 7A 05 30 8F 00 01 3D 8C 00 02 18 1D 04 41 18 1D 25 8B 00 03 7A 03 24 18 8B 00 04 60 03 7A 19 8B 00 05 2D 19 8B 00 06 3B 03 32 1A 04 25 75 00 34 00 02 00 01 00 0D 00 02 00 2C 1A 05 25 29 04 1A 06 25 29 05 16 04 16 05 41 32 1A 03 1F 8D 00 07 3B 19 03 05 8B 00 08 70 10 19 03 08 8B 00 08 70 08 11 6D 00 8D 00 09 7A 08 00 0A 00 00 00 00 00 00 00 00 00 00 01, Recv: 64 38"???

This is APDU command/reponse when loading helloworld.CAP.
I need to ensure which CAP causes error? helloworld.cap or cal.cap?
sense and simplicity

User avatar
UNKNwYSHSA
Posts: 630
Joined: Thu May 21, 2015 4:05 am
Points :3053
Contact:

Re: How to download CAP file to smart card?

Post by UNKNwYSHSA » Thu Dec 10, 2015 5:20 am

thapnk wrote:your ideal, that's mean: "80 E8 00 00 FA C4 82 01 35 01 00 1A DE CA FF ED 02 02 04 00 01 05 11 22 33 44 55 0A 74 65 73 74 41 70 70 6C 65 74 02 00 21 00 1A 00 21 00 0A 00 15 00 2A 00 0E 00 6F 00 0A 00 0F 00 00 00 5B 02 1D 00 00 00 00 00 00 02 01 00 04 00 15 02 03 01 07 A0 00 00 00 62 01 01 00 01 07 A0 00 00 00 62 00 01 03 00 0A 01 06 11 22 33 44 55 66 00 08 06 00 0E 00 00 00 80 03 00 FF 00 07 01 00 00 00 1C 07 00 6F 00 01 10 18 8C 00 00 7A 05 30 8F 00 01 3D 8C 00 02 18 1D 04 41 18 1D 25 8B 00 03 7A 03 24 18 8B 00 04 60 03 7A 19 8B 00 05 2D 19 8B 00 06 3B 03 32 1A 04 25 75 00 34 00 02 00 01 00 0D 00 02 00 2C 1A 05 25 29 04 1A 06 25 29 05 16 04 16 05 41 32 1A 03 1F 8D 00 07 3B 19 03 05 8B 00 08 70 10 19 03 08 8B 00 08 70 08 11 6D 00 8D 00 09 7A 08 00 0A 00 00 00 00 00 00 00 00 00 00 01, Recv: 64 38"???

From CAP file Header component, the version of helloworld.cap is 2.1, the version of cal.cap is 2.2. For your card (JC version is 2.2), you can build helloworld.cap with version 2.2, and try again.
sense and simplicity

thapnk
Posts: 9
Joined: Thu Dec 10, 2015 3:37 am
Points :0
Contact:

Re: How to download CAP file to smart card?

Post by thapnk » Thu Dec 10, 2015 5:29 am

UNKNwYSHSA wrote:This is APDU command/reponse when loading helloworld.CAP.
I need to ensure which CAP causes error? helloworld.cap or cal.cap?


helloworld.cap is good
cal.cap is error, and i received responds

Download Cap error: Download cap file failed. Send: 80 E8 00 00 FA C4 82 01 A3 01 00 17 DE CA FF ED 02 02 04 00 01 09 61 D2 A3 E4 05 E6 E4 E2 43 03 63 61 6C 02 00 21 00 17 00 21 00 0B 00 15 00 2E 00 0E 00 C8 00 19 00 13 00 00 00 65 02 33 00 02 00 01 00 0C 02 01 00 04 00 15 02 03 01 07 A0 00 00 00 62 01 01 00 01 07 A0 00 00 00 62 00 01 03 00 0B 01 07 61 D2 A3 E4 05 E6 E4 00 08 06 00 0E 00 00 00 80 03 00 FF 00 07 01 00 00 00 1C 07 00 C8 00 01 10 18 8C 00 00 7A 05 30 8F 00 01 3D 8C 00 02 18 1D 04 41 18 1D 25 8B 00 03 7A 05 23 18 8B 00 04 60 03 7A 19 8B 00 05 2D 1A 04 25 73 00 8E 00 00 00 05 00 13 00 2B 00 38 00 45 00 52 00 6A 7B 00 06 03 1A 03 7B 00 06 92 8D 00 07 3B 19 03 7B 00 06 92 8B 00 08 7A 1A 03 1A 05 25 1A 06 25 41 5B 38 70 5E 1A 03 1A 05 25 1A 06 25 43 5B 38 70 51 1A 03 1A 05 25 1A 06 25 45 5B 38 70 01, Recv: 64 38.

thapnk
Posts: 9
Joined: Thu Dec 10, 2015 3:37 am
Points :0
Contact:

Re: How to download CAP file to smart card?

Post by thapnk » Thu Dec 10, 2015 5:30 am

UNKNwYSHSA wrote:
thapnk wrote:your ideal, that's mean: "80 E8 00 00 FA C4 82 01 35 01 00 1A DE CA FF ED 02 02 04 00 01 05 11 22 33 44 55 0A 74 65 73 74 41 70 70 6C 65 74 02 00 21 00 1A 00 21 00 0A 00 15 00 2A 00 0E 00 6F 00 0A 00 0F 00 00 00 5B 02 1D 00 00 00 00 00 00 02 01 00 04 00 15 02 03 01 07 A0 00 00 00 62 01 01 00 01 07 A0 00 00 00 62 00 01 03 00 0A 01 06 11 22 33 44 55 66 00 08 06 00 0E 00 00 00 80 03 00 FF 00 07 01 00 00 00 1C 07 00 6F 00 01 10 18 8C 00 00 7A 05 30 8F 00 01 3D 8C 00 02 18 1D 04 41 18 1D 25 8B 00 03 7A 03 24 18 8B 00 04 60 03 7A 19 8B 00 05 2D 19 8B 00 06 3B 03 32 1A 04 25 75 00 34 00 02 00 01 00 0D 00 02 00 2C 1A 05 25 29 04 1A 06 25 29 05 16 04 16 05 41 32 1A 03 1F 8D 00 07 3B 19 03 05 8B 00 08 70 10 19 03 08 8B 00 08 70 08 11 6D 00 8D 00 09 7A 08 00 0A 00 00 00 00 00 00 00 00 00 00 01, Recv: 64 38"???

From CAP file Header component, the version of helloworld.cap is 2.1, the version of cal.cap is 2.2. For your card (JC version is 2.2), you can build helloworld.cap with version 2.2, and try again.

thanks , I will try to do

User avatar
UNKNwYSHSA
Posts: 630
Joined: Thu May 21, 2015 4:05 am
Points :3053
Contact:

Re: How to download CAP file to smart card?

Post by UNKNwYSHSA » Thu Dec 10, 2015 5:47 am

thapnk wrote:
UNKNwYSHSA wrote:This is APDU command/reponse when loading helloworld.CAP.
I need to ensure which CAP causes error? helloworld.cap or cal.cap?


helloworld.cap is good
cal.cap is error, and i received responds

Download Cap error: Download cap file failed. Send: 80 E8 00 00 FA C4 82 01 A3 01 00 17 DE CA FF ED 02 02 04 00 01 09 61 D2 A3 E4 05 E6 E4 E2 43 03 63 61 6C 02 00 21 00 17 00 21 00 0B 00 15 00 2E 00 0E 00 C8 00 19 00 13 00 00 00 65 02 33 00 02 00 01 00 0C 02 01 00 04 00 15 02 03 01 07 A0 00 00 00 62 01 01 00 01 07 A0 00 00 00 62 00 01 03 00 0B 01 07 61 D2 A3 E4 05 E6 E4 00 08 06 00 0E 00 00 00 80 03 00 FF 00 07 01 00 00 00 1C 07 00 C8 00 01 10 18 8C 00 00 7A 05 30 8F 00 01 3D 8C 00 02 18 1D 04 41 18 1D 25 8B 00 03 7A 05 23 18 8B 00 04 60 03 7A 19 8B 00 05 2D 1A 04 25 73 00 8E 00 00 00 05 00 13 00 2B 00 38 00 45 00 52 00 6A 7B 00 06 03 1A 03 7B 00 06 92 8D 00 07 3B 19 03 7B 00 06 92 8B 00 08 7A 1A 03 1A 05 25 1A 06 25 41 5B 38 70 5E 1A 03 1A 05 25 1A 06 25 43 5B 38 70 51 1A 03 1A 05 25 1A 06 25 45 5B 38 70 01, Recv: 64 38.


The APDU command you give us:
80 E8 00 00 FA C4 82 01 A3
Header component: 01 00 17 DE CA FF ED 02 02 04 00 01 09 61 D2 A3 E4 05 E6 E4 E2 43 03 63 61 6C
Directory component: 02 00 21 00 17 00 21 00 0B 00 15 00 2E 00 0E 00 C8 00 19 00 13 00 00 00 65 02 33 00 02 00 01 00 0C 02 01 00
Import component: 04 00 15 02 03 01 07 A0 00 00 00 62 01 01 00 01 07 A0 00 00 00 62 00 01 03 00 0B 01 07 61 D2 A3 E4 05 E6 E4 00 08 (Two import package)
Class component: 06 00 0E 00 00 00 80 03 00 FF 00 07 01 00 00 00 1C
Method component: 07 00 C8
00 01 10 18 8C 00 00 7A 05 30 8F 00 01 3D 8C 00
02 18 1D 04 41 18 1D 25 8B 00 03 7A 05 23 18 8B
00 04 60 03 7A 19 8B 00 05 2D 1A 04 25 73 00 8E
00 00 00 05 00 13 00 2B 00 38 00 45 00 52 00 6A
7B 00 06 03 1A 03 7B 00 06 92 8D 00 07 3B 19 03
...

The following is the components of cal.cap you give us:
Header component: 01 00 17 DE CA FF ED 02 02 04 00 01 09 61 D2 A3 E4 05 E6 E4 E2 43 03 63 61 6C
Directory component: 02 00 21 00 17 00 21 00 0B 00 0B 00 2E 00 0E 00 C8 00 19 00 13 00 00 00 65 02 33 00 02 00 01 00 0C 01 01 00
Import component: 04 00 0B 01 03 01 07 A0 00 00 00 62 01 01 (One import package)
Class component: 06 00 0E 00 00 00 80 03 00 FF 00 07 01 00 00 00 1C
Method component: 07 00 C8
00 01 10 18 8C 00 00 7A 05 30 8F 00 01 3D 8C 00
02 18 1D 04 41 18 1D 25 8B 00 03 7A 05 23 18 8B
00 04 60 03 7A 19 8B 00 05 2D 1A 04 25 73 00 8E
00 00 00 05 00 13 00 2B 00 38 00 45 00 52 00 6A
7B 00 06 03 1A 03 7B 00 06 92 8D 00 07 3B 19 03
...

The import component is not the same!
So the cal.cap you give us is not the same as you used.
sense and simplicity

thapnk
Posts: 9
Joined: Thu Dec 10, 2015 3:37 am
Points :0
Contact:

Re: How to download CAP file to smart card?

Post by thapnk » Thu Dec 10, 2015 5:51 am

UNKNwYSHSA wrote:From CAP file Header component, the version of helloworld.cap is 2.1, the version of cal.cap is 2.2. For your card (JC version is 2.2), you can build helloworld.cap with version 2.2, and try again.

Thanks, I successed

User avatar
UNKNwYSHSA
Posts: 630
Joined: Thu May 21, 2015 4:05 am
Points :3053
Contact:

Re: How to download CAP file to smart card?

Post by UNKNwYSHSA » Thu Dec 10, 2015 5:57 am

thapnk wrote:
UNKNwYSHSA wrote:From CAP file Header component, the version of helloworld.cap is 2.1, the version of cal.cap is 2.2. For your card (JC version is 2.2), you can build helloworld.cap with version 2.2, and try again.

Thanks, I successed

OK!
sense and simplicity

gkhunger
Posts: 1
Joined: Wed Feb 24, 2016 2:25 pm
Points :8
Contact:

Re: How to download CAP file to smart card?

Post by gkhunger » Wed Feb 24, 2016 5:48 pm

What should the three keys be set to?

User avatar
mabel
Posts: 237
Joined: Mon May 18, 2015 3:09 am
Points :1705
Contact:

Re: How to download CAP file to smart card?

Post by mabel » Wed Feb 24, 2016 10:17 pm

gkhunger wrote:What should the three keys be set to?


The three keys you set should be as same as the keys of your java cards.

As per GP specification said, the three keys of cards are 404142434445464748494A4B4C4D4E4F by default.

You can set the keys via pyApdutool. Switch to "Util" tab and select "GP Key..." button and then set the keys in the dialog box.

You do not have the required permissions to view the files attached to this post. Please login first.

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 4 guests

JavaCard OS : Disclaimer