JavacardOS will not accept order any more, please contact our partner Feitian online Store:
https://ftsafe.en.alibaba.com/index.html
https://ftsafe.en.alibaba.com/index.html
Problems with debugging
Problems with debugging
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!
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!
Re: Problems with debugging
Where is the WalletDemo? Could you share it with us?
-
- Posts: 55
- Joined: Thu Sep 22, 2016 5:05 am
- Points :784
- Contact:
Re: Problems with debugging
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().
Re: Problems with debugging
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
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
Re: Problems with debugging
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?
Will it work okay?
Is the IDE debugging a worth thing or is it just a pain as for me?
Re: Problems with debugging
Mine is ok. I have download this applet in my JCOP card(J3D081). What is your JCIDE's version?
-
- Posts: 55
- Joined: Thu Sep 22, 2016 5:05 am
- Points :784
- Contact:
Re: Problems with debugging
/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
>> 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
-
- Posts: 55
- Joined: Thu Sep 22, 2016 5:05 am
- Points :784
- Contact:
Re: Problems with debugging
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.
Re: Problems with debugging
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.
You do not have the required permissions to view the files attached to this post. Please login first.
Re: Problems with debugging
Pleae using the latest version of JCIDE. It's no a problem anymore.
well
Who is online
Users browsing this forum: No registered users and 1 guest