Announce two new product: SmartCard Reader Rockey200 and USB2.0 Extension Cable

ROCKEY 200 is a handy and portable USB Smart Card reader that can perform read/write operations on any ISO 7816-1/2/3/4 smart cards which are compatible with protocol T=0 and T=1.

USB2.0 Extension Cable With high speed USB 2.0 devices such as USB token ,USB Card Reader and so on.

Come to try it now!

gp.exe Load .cap file

Other Tools
JavaCardVE
Posts: 15
Joined: Sun Sep 11, 2016 8:11 am
Points: 244
Contact:

gp.exe Load .cap file

Postby JavaCardVE » Sun Sep 11, 2016 8:17 am

I am having trouble loading the .cap file onto the Java card using "gp.exe" . I keep getting LOAD failed SW 6F 13 as an error. this cap file is a base and should be just loaded.Then an inherited cap file will be load and install.

Code: Select all

 c:\>gp.exe -load base.cap
>     pro.javacard.gp.GPException: LOAD failed SW: 6F13
>             at pro.javacard.gp.GlobalPlatform.check(GlobalPlatform.java:1092)
>             at pro.javacard.gp.GlobalPlatform.loadCapFile(GlobalPlatform.java:728)
>             at pro.javacard.gp.GlobalPlatform.loadCapFile(GlobalPlatform.java:686)
>             at pro.javacard.gp.GPTool.main(GPTool.java:427)

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

Re: gp.exe Load .cap file

Postby UNKNwYSHSA » Sun Sep 11, 2016 10:14 pm

Please use parameter -d for gp.exe to display APDUs. We can know the APDU command which SW 6F13 responsed.

Code: Select all

gp.exe -r "READERNAME" -d --load xxx.cap
sense and simplicity

JavaCardVE
Posts: 15
Joined: Sun Sep 11, 2016 8:11 am
Points: 244
Contact:

Re: gp.exe Load .cap file

Postby JavaCardVE » Mon Sep 12, 2016 11:53 pm

gp.exe response after load command using

Code: Select all

gp.exe -r "READERNAME" -d --load xxx.cap


Code: Select all

# Detected readers from SunPCSC
[*] ACS ACR1281 1S Dual Reader PICC 0
[*] ACS ACR1281 1S Dual Reader SAM 0
SCardConnect("ACS ACR1281 1S Dual Reader PICC 0", T=*) -> T=1, 3B8B8001209000000
00000D3C8CD1975
SCardBeginTransaction("ACS ACR1281 1S Dual Reader PICC 0")
A>> T=1 (4+0000) 00A40400 00
A<< (0094+2) (36ms) 6F5C8408A000000003000000A550734A06072A864886FC6B01600C060A2A
864886FC6B02020101630906072A864886FC6B03640B06092A864886FC6B040255650B06092B8510
864864020103660C060A2B060104012A026E01029F6501FF 9000
A>> T=1 (4+0008) 80500000 08 A52663392D9CA56B 00
A<< (0028+2) (66ms) 00000000000000000000FF0200E185B420A8F7580B7CFB34434D5427 900
0
A>> T=1 (4+0016) 84820100 10 64933CA05089987264AD129BC0F56DA1
A<< (0000+2) (28ms) 9000
A>> T=1 (4+0010) 84F28000 0A 4F00468EF32E6C7C6B53 00
A<< (0011+2) (15ms) 08A000000003000000019E 9000
A>> T=1 (4+0010) 84F24000 0A 4F0092726513AB742CEC 00
A<< (0013+2) (17ms) 0A4B4650495353554552000700 9000
A>> T=1 (4+0010) 84F22000 0A 4F00C80CCC8209D6D4AB 00
A<< (0032+2) (19ms) 07A00000015153500100074B4650426173650100094B4650495353554552
0100 9000
A>> T=1 (4+0010) 84F21000 0A 4F0076B636A3C18544F7 00
A<< (0055+2) (24ms) 07A000000151535001000108A000000151535041074B4650426173650100
00094B46504953535545520100010A4B465049535355455200 9000
A>> T=1 (4+0030) 84E60200 1E 094B465045505552534508A0000000030000000000002C0DD71
81FD80EC0
A<< (0001+2) (178ms) 9000
A>> T=1 (4+0255) 84E80000 FF C4820D07010013DECAFFED0102020001094B465045505552534
502001F0013001F0000001F00E600590960000A01DF0013024000000000000003000004001F03000
1074B465042617365020107A0000000620101000107A00000006200010600594280040B000905170
000016FFFFFFFFFFFFFFFFFFFFFFFFF009B00A200A900EE00FB015502F2FFFF00AF016201F8024F0
28B02A908CD08CF81020080000716171514181A1B008002010001010000000082000200020100000
0070960000411188C003818101091002F870003307010AD001D8F002F3D8C0029375901011D10106
CEF18038D0027870118038D0027870218038D00278731E1AEE2335EDAE1
A<< (0000+2) (688ms) 6F13
pro.javacard.gp.GPException: LOAD failed SW: 6F13
        at pro.javacard.gp.GlobalPlatform.check(GlobalPlatform.java:1092)
        at pro.javacard.gp.GlobalPlatform.loadCapFile(GlobalPlatform.java:728)
        at pro.javacard.gp.GlobalPlatform.loadCapFile(GlobalPlatform.java:686)
        at pro.javacard.gp.GPTool.main(GPTool.java:427)

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

Re: gp.exe Load .cap file

Postby UNKNwYSHSA » Tue Sep 13, 2016 2:14 am

Was the package "KFPBase" loaded first? it is imported by this cap file.
sense and simplicity

JavaCardVE
Posts: 15
Joined: Sun Sep 11, 2016 8:11 am
Points: 244
Contact:

Re: gp.exe Load .cap file

Postby JavaCardVE » Tue Sep 13, 2016 2:18 am

UNKNwYSHSA wrote:Was the package "KFPBase" loaded first? it is imported by this cap file.


Yes. "KFPBase" has loaded successfully.

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

Re: gp.exe Load .cap file

Postby UNKNwYSHSA » Tue Sep 13, 2016 5:29 am

1 What is your card model?
2 Can you send your cap file to me?
sense and simplicity

JavaCardVE
Posts: 15
Joined: Sun Sep 11, 2016 8:11 am
Points: 244
Contact:

Re: gp.exe Load .cap file

Postby JavaCardVE » Tue Sep 13, 2016 6:52 am

UNKNwYSHSA wrote:1 What is your card model?
2 Can you send your cap file to me?



1-FM1208 contactless cpu card/fUDAN microelectronic

2- The cap files uses usual packages

-the cap file uses these package

Code: Select all

import javacard.framework.AID;
import javacard.framework.ISO7816;
import javacard.framework.ISOException;
import javacard.framework.JCSystem;
import javacard.framework.Shareable;
import javacard.framework.Util;


-the KFPbase cap file (that former cap file inheritances from it ) uses these package:

Code: Select all

import javacard.framework.APDU;
import javacard.framework.Applet;
import javacard.framework.ISO7816;
import javacard.framework.ISOException;
import javacard.framework.JCSystem;
import javacard.framework.Util;
import javacard.security.DESKey;
import javacard.security.KeyBuilder;
import javacard.security.RandomData;
import javacard.security.Signature;
import javacardx.crypto.Cipher;

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

Re: gp.exe Load .cap file

Postby UNKNwYSHSA » Tue Sep 13, 2016 7:21 am

The FM1208 JavaCard has only 8K EEPROM.
Is there enough space to load your applet?

And you need to get more information about functions of this card.
I searched it but no information got.
sense and simplicity

JavaCardVE
Posts: 15
Joined: Sun Sep 11, 2016 8:11 am
Points: 244
Contact:

Re: gp.exe Load .cap file

Postby JavaCardVE » Tue Sep 13, 2016 8:10 am

UNKNwYSHSA wrote:The FM1208 JavaCard has only 8K EEPROM.
Is there enough space to load your applet?

And you need to get more information about functions of this card.
I searched it but no information got.



thanks a lot for replying my post.
This card has 64k EEPROM and i've checked and measured it and it has not memory problem.
this Error (0x6F13) is so strange. :shock:

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

Re: gp.exe Load .cap file

Postby UNKNwYSHSA » Tue Sep 13, 2016 9:56 pm

Maybe you need to ask the card manufactor, they know why the cap loader response 0x6F13.
When you got the answer, let me know please.
sense and simplicity


Return to “Other Tools”

Who is online

Users browsing this forum: No registered users and 1 guest

JavaCard OS : Disclaimer