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.
JavaCard Applet Development Related Questions and Answers.
-
ordane
- Posts: 11
- Joined: Thu Dec 17, 2015 11:02 pm
- Points :57
-
Contact:
Post
by ordane » Wed Dec 23, 2015 5:06 am
I bought IFD
R502 smart card reader which came with two
A40CR cards. And I am trying to write my own applet and load it into my cards. But I have some questions.
As you see below, add method adds 5 units to a declared variable. I would like to save the variable value into the card after making an operation. Does anyone know how can i write that value into the card? And if possible, how can i read it?
Code: Select all
byte[] buffer = apdu.getBuffer();
byte CLA = (byte) (buffer[ISO7816.OFFSET_CLA] & 0xFF);
byte INS = (byte) (buffer[ISO7816.OFFSET_INS] & 0xFF);
if (CLA != DE_CLA){
ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
}
switch (INS) {
case DE_INS_ADD:
add(apdu);
break;
default:
ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
}
-
mabel
- Posts: 237
- Joined: Mon May 18, 2015 3:09 am
- Points :1705
-
Contact:
Post
by mabel » Wed Dec 30, 2015 11:00 pm
Any state in EEPROM fields will be kept until the Applet instance is deleted. The same goes for state within non-transient array elements.
You need to retain a persistent reference to the array for your goal.
Basically all object instances live in persistent memory, this means any object instance created with new. This is also the case for any object created by the platform where the API does not explicitly specify that the result is transient.
If you want to store something, you need to know about the Java Card transaction mechanism, especially if your operations are not atomic.
Users browsing this forum: No registered users and 28 guests
JavaCard OS : Disclaimer
Board Disclaimer
The views and comments posted in these fora are personal and do not necessarily represent the those of the Management of JavaCard OS.
The Management of JavaCard OS does not, under any circumstances whatsoever, accept any responsibility for any advice, or recommentations, made by, or implied by, any member or guest vistor of JavaCard OS that results in any loss whatsoever in any manner to a member of JavaCard OS, or to any other person.
Furthermore, the Management of JavaCard OS is not, and cannot be, responsible for the content of any other Internet site(s) that have been linked to from JavaCard OS.