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 use APDU instance in install method

JavaCard Applet Development Related Questions and Answers.
leogen
Posts: 13
Joined: Wed Jan 06, 2016 2:45 am
Points :94
Contact:

How to use APDU instance in install method

Post by leogen » Sun Jun 18, 2017 10:31 pm

I want to use

Code: Select all

OPSystem.getCPLCData(javacard.framework.APDU apdu, short apdu_offset, short cplc_offset, short length) 


in install() method. But APDU is not accessible in install method.

Here is my code:

Code: Select all

public static void install(bytes[] bArray, short bOffset, byte bLength){

short apdu_offset = (short)0;
short cplc_offset = (short)8;
short length = (short)2;

OPSystem.getCPLCData(apdu, apdu_offset, cplc_offset length);

}


Does anybody know where I did wrong? Pls help to solve this. Thanks

chico0609
Posts: 59
Joined: Mon Sep 14, 2015 5:05 am
Points :416
Contact:

Re: How to use APDU instance in install method

Post by chico0609 » Mon Jun 19, 2017 2:01 am

Because the byte[] in the install method is the global buffer. You will need to defer this call until the process method has been invoked.

leogen
Posts: 13
Joined: Wed Jan 06, 2016 2:45 am
Points :94
Contact:

Re: How to use APDU instance in install method

Post by leogen » Mon Jun 19, 2017 4:27 am

Is there any way to get CPLC information in install() method?

chico0609
Posts: 59
Joined: Mon Sep 14, 2015 5:05 am
Points :416
Contact:

Re: How to use APDU instance in install method

Post by chico0609 » Mon Jun 19, 2017 6:12 am

It's a little hard to reach your goal. Why do you need it in the install method?

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 45 guests

JavaCard OS : Disclaimer