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.

how to solve this question?

JavaCard Applet Development Related Questions and Answers.
happy123654
Posts: 35
Joined: Wed Jun 20, 2018 4:06 am
Points :218
Contact:

how to solve this question?

Post by happy123654 » Thu Oct 25, 2018 10:25 pm

hello, every boy, who can help me to resolve this question?

Now, I use my tool to test my java cos. there is a test case failure in T0 protocol and success in T1 or TCL.
the command is as followed:
send: 80050000
the right response: 256 bytes data +SW.
the real response: The tool cannot receive anything.

If I modify the commad as followed:
send:80500000
the right response: 255 bytes data +SW
the real response: ==the right response

later123654
Posts: 11
Joined: Tue May 22, 2018 9:43 pm
Points :130
Contact:

Re: how to solve this question?

Post by later123654 » Thu Oct 25, 2018 10:38 pm

hello, you can provide your code here which can help me to parse this question.

happy123654
Posts: 35
Joined: Wed Jun 20, 2018 4:06 am
Points :218
Contact:

Re: how to solve this question?

Post by happy123654 » Thu Oct 25, 2018 10:52 pm

public void process(APDU apdu)
{
if (selectingApplet())
{
return;
}

byte[] buf = apdu.getBuffer();
switch (buf[ISO7816.OFFSET_INS])
{
case (byte)0x01:
Util.arrayFillNonAtomic(buf, (short)0, (short)256, (byte)0xaa);
apdu.setOutgoingAndSend((short)0, (short)256);
break;
case (byte)0x02:
Util.arrayFillNonAtomic(buf, (short)0, (short)256, (byte)0xbb);
apdu.setOutgoingAndSend((short)0, (short)255);
break;
default:
ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
}
}

later123654
Posts: 11
Joined: Tue May 22, 2018 9:43 pm
Points :130
Contact:

Re: how to solve this question?

Post by later123654 » Thu Oct 25, 2018 10:55 pm

I test the code and the command with JCOP card and the question is still exist.
But the command is ok:
the command( 8005000000) can return 256 bytest data.

so you can modify the command.

happy123654
Posts: 35
Joined: Wed Jun 20, 2018 4:06 am
Points :218
Contact:

Re: how to solve this question?

Post by happy123654 » Thu Oct 25, 2018 10:57 pm

hello boy. I modify my command to be 8005000000 and I can get the right response.

but why?

later123654
Posts: 11
Joined: Tue May 22, 2018 9:43 pm
Points :130
Contact:

Re: how to solve this question?

Post by later123654 » Thu Oct 25, 2018 11:32 pm

I guess the reason : the reader handle the command as case 1 and refuse the response data from the card.

happy123654
Posts: 35
Joined: Wed Jun 20, 2018 4:06 am
Points :218
Contact:

Re: how to solve this question?

Post by happy123654 » Thu Oct 25, 2018 11:33 pm

i see and thanks very much!

BirdKing
Posts: 86
Joined: Wed Nov 04, 2015 7:23 am
Points :656
Contact:

Re: how to solve this question?

Post by BirdKing » Wed Oct 31, 2018 2:46 am

T0 is an imperfect protocol. It claims the applet and host on pc knows how many bytes will be translated. You may add setIncomingAndReceive() and try this apdu again.

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 41 guests

JavaCard OS : Disclaimer