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.

Get Response 6F00

JavaCard Applet Development Related Questions and Answers.
Janel
Posts: 8
Joined: Sun May 15, 2016 10:29 pm
Points :126
Contact:

Get Response 6F00

Post by Janel » Thu Sep 01, 2016 11:44 pm

I wrote an applet, The followings are part of the code. When I sent my command to the card, it can return the data successfully. But about 50 times, it returned "6F00". What happened? How can I solve this problem?

Code: Select all

//Get data from APDU, generate random code, encrypt the data and then send it.
private void apro(APDU apdu) {
        byte[] buffer = apdu.getBuffer();
        byte[] random=new byte[4];
        gen_random(random);
        byte[] data=new byte[8];
        data[0]=random[0];
        data[1]=(byte)0x88;
        data[2]=(byte)0x32;
        data[3]=(byte)0x86;
        data[4]=(byte)0x80;
        data[5]=random[1];
        data[6]=random[2];
        data[7]=random[3];
        byte[] data2=encryptdata(data,keydata,(byte)0);
        Util.arrayCopyNonAtomic(data2, (short)0, buffer, (short)0, (short) 8);
        apdu.setOutgoingAndSend((short)0, (short)8);

User avatar
Marshaldll
Posts: 13
Joined: Thu Jun 11, 2015 2:53 am
Points :32
Contact:

Re: Get Response 6F00

Post by Marshaldll » Fri Sep 02, 2016 3:27 am

Just a small tip for you, allocate memory in constructor. Don't allocate it when executing APDU command.

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

Re: Get Response 6F00

Post by chico0609 » Fri Sep 02, 2016 4:45 am

I guess that is because storage space is insufficient. You can use JCIDE to debug your applet, then watch memory space situation in the Memory window.

Tazmania09
Posts: 25
Joined: Mon Nov 30, 2015 3:40 am
Points :178
Contact:

Re: Get Response 6F00

Post by Tazmania09 » Fri Sep 02, 2016 5:23 am

If you allocated memory when executing APDU command, remember to call JCSystem.requestObjectDeletion () to collect garbage in order to avoid memory leak.

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 60 guests

JavaCard OS : Disclaimer