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.

Find the data back in Buffer

JavaCard Applet Development Related Questions and Answers.
Kabin
Posts: 9
Joined: Tue Apr 18, 2017 3:51 am
Points :116
Contact:

Find the data back in Buffer

Post by Kabin » Fri May 26, 2017 11:05 pm

I have a problem about APDU buffer. When I select my applet, there are "CLA INS P1 P2 Lc Data" in the buffer, but when I tried to check the PIN code, this buffer array didn't have my PIN code in the data field. I only got "CLA INS P1 P2 Le". Why didn't it contain my PIN code? Need I do other operation to get this?

Code: Select all

byte[] buffer = apdu.getBuffer();

choimillen
Posts: 30
Joined: Wed Aug 19, 2015 2:55 am
Points :213
Contact:

Re: Find the data back in Buffer

Post by choimillen » Sat May 27, 2017 5:26 am

Please add this command:

Code: Select all

apdu.setIncomingAndReceive();

Kabin
Posts: 9
Joined: Tue Apr 18, 2017 3:51 am
Points :116
Contact:

Re: Find the data back in Buffer

Post by Kabin » Sat May 27, 2017 5:53 am

Well, I found I have made a stupid mistake. I missed this line

Code: Select all

apdu.setIncomingAndReceive();

Thanks for your help, choimillen.

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

Re: Find the data back in Buffer

Post by UNKNwYSHSA » Sun May 28, 2017 11:04 pm

choimillen wrote:Please add this command:

Code: Select all

apdu.setIncomingAndReceive();


You need to make sure that all data bytes are received, maybe you need the method apdu.receiveBytes() to receive all your data bytes.
sense and simplicity

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: Google [Bot] and 88 guests

JavaCard OS : Disclaimer