It's our great honour to announce the Industry’s First VHBR CCID reader - VHBR Dual interface smart card reader vR504. It is able to support the world’s fastest ePassports.

To celebrate the new product release, there is Special Discount for New Registered Members in our store.
- Get $20.00 OFF instantly for smart card reader vR504, R502 and bR301

Come to get the readers now!

Problems with debugging

JCIDE is an Integrated Development Environment designed specifically for the Java Card programming language.

Moderators: product, kuafu

xochyreg
Posts: 3
Joined: Wed May 09, 2018 12:56 am
Points: 34
Contact:

Problems with debugging

Postby xochyreg » Tue May 15, 2018 11:12 am

Hi!

I'm a newbie to Java Card technology, please don't be cruel to judge.
First i tried to debug the bundled "WalletDemoApplet".
i have entered some commands:


Card Manager AID : A000000003000000
Card Manager state : OP_READY

Application: SELECTABLE (--------) 112233445566
Load File : LOADED (--------) 1122334455
Module : 112233445566


>> /select 112233445566
>> 00 A4 04 00 06 11 22 33 44 55 66 00
<< 90 00

>> /send "80 01 00 00 00 00"
>> 80 01 00 00 00 00
<< 90 00

Apdu may be illegel.Decoding conventions for command APDU should obey the rule in 7816-3 section 12.1.3
>> /send "80 01 00 00 00 00"
>> 80 01 00 00 00 00
<< 90 00


Q1: Why does the app return just this? Where's the card no.?
Q2: I set a breakpoint @ line 131 ( byte[] buf = apdu.getBuffer(); )
Then did (/send "80 01 00 00 00 00") again. The IDE just executed the APDU,
it didn't stop on this BP. Why?

BTW: the (/send "80 20 00 00 00 00") is bad too... i'm in despare! :(

reumol
Posts: 2
Joined: Tue May 15, 2018 6:56 pm
Points: 22
Contact:

Re: Problems with debugging

Postby reumol » Wed May 16, 2018 11:18 pm

Where is the WalletDemo? Could you share it with us?

wumindejia
Posts: 44
Joined: Thu Sep 22, 2016 5:05 am
Points: 674
Contact:

Re: Problems with debugging

Postby wumindejia » Thu May 17, 2018 5:42 am

I guess, It works in a contactless interface. INS = 0x01 is command of the get cardID , INS = 0x20 is command of the verify pin. Because command of the get cardID is case2, so it does not need to receive data and execution is successful. Command of the verify pin is case3,so it needs to receive data and It's wrong in the apdu.setIncomingAndReceive().

xochyreg
Posts: 3
Joined: Wed May 09, 2018 12:56 am
Points: 34
Contact:

Re: Problems with debugging

Postby xochyreg » Sat May 19, 2018 3:17 pm

Hi guys,

i've setup the JCKit_JAVACOS_1.0.5.39.exe,
the folder C:\JavaCardKit\SDK\Sample\ contains these three sample apps,
incl. WalletDemo.

@wumindejia: i don't know the exact ways the IDE does the emulation,
but it seems to me it treats all commands as sent to a contact JavaCard,
not a mifare-like one.

Now i discovered even more problems with debugging, with applets i cannot
share, the IDE debugging subsystem needs serious rework, it's not a mature
product :(

xochyreg
Posts: 3
Joined: Wed May 09, 2018 12:56 am
Points: 34
Contact:

Re: Problems with debugging

Postby xochyreg » Sat May 19, 2018 3:33 pm

Can somebody please upload the walletdemo app to a real JavaCard?
Will it work okay?
Is the IDE debugging a worth thing or is it just a pain as for me?

Mohinder
Posts: 1
Joined: Fri May 18, 2018 9:42 pm
Points: 8
Contact:

Re: Problems with debugging

Postby Mohinder » Sat May 19, 2018 9:08 pm

Mine is ok. I have download this applet in my JCOP card(J3D081). What is your JCIDE's version?

wumindejia
Posts: 44
Joined: Thu Sep 22, 2016 5:05 am
Points: 674
Contact:

Re: Problems with debugging

Postby wumindejia » Sun May 20, 2018 11:13 pm

/select 112233445566
>> 00 A4 04 00 06 11 22 33 44 55 66 00
<< 90 00

>> /send "80 20 00 00 081122334455667788 "
>> 80 20 00 00 08 11 22 33 44 55 66 77 88
<< 90 00

>> /send "80 01 00 00 08"
>> 80 01 00 00 08
<< 01 40 20 30 40 50 60 70 90 00

wumindejia
Posts: 44
Joined: Thu Sep 22, 2016 5:05 am
Points: 674
Contact:

Re: Problems with debugging

Postby wumindejia » Sun May 20, 2018 11:23 pm

xochyreg wrote:Can somebody please upload the walletdemo app to a real JavaCard?
Will it work okay?
Is the IDE debugging a worth thing or is it just a pain as for me?

"Apdu may be illegel.Decoding conventions for command APDU should obey the rule in 7816-3 section 12.1.3" is warning. Because your command is wrong, it is processed in the java virtual machine, not to the application processing.

RSA4096
Posts: 3
Joined: Sat May 19, 2018 11:20 am
Points: 20
Contact:

Re: Problems with debugging

Postby RSA4096 » Thu May 24, 2018 7:41 am

I did some experiments on this topic. Look at the following figure. You should select the protocol "T=1" to replace "T=0|T=1". I think this IDE does not support getting response data automatically. And the other error is a divergence about the LC/LE, I am not sure which is the right format. This JCIDE consider your input APDU( /send "80 01 00 00 00 00") is wrong. If you remove only one byte like my screenshot, it will be ok.

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


Return to “User Guide”

Who is online

Users browsing this forum: No registered users and 0 guests

JavaCard OS : Disclaimer