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 send apdu command to my function

Communication

Moderator: UNKNwYSHSA

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

how to send apdu command to my function

Post by chico0609 » Fri Nov 20, 2015 7:51 am

I wanna pass the APDU command to the this function. But I do not know how to do this.

Code: Select all

ResponseAPDU respApdu = channel.transmit( new CommandAPDU(cmd));


For example, the commands is as follows
CLA: 00
INS:80
P1: 00
P2:00
LC: 02
Data In : 1E06
Le: 0F

How can I write above instructions into bytes and send to the function I mentioned? I need to get 9000 as success response.

User avatar
btwtiger
Posts: 28
Joined: Wed Jun 10, 2015 7:22 am
Points :134
Contact:

Re: how to send apdu command to my function

Post by btwtiger » Tue Dec 01, 2015 1:16 am

Code: Select all

int CLA = 0x00;
int INS = 0x80;
int P1  = 0x00;
int P2  = 0x00;
//int LC  = 0x02;
byte[] data = new byte[] {(byte) 0x1E, (byte) 0x06};
int Le  = 0x0F;

ResponseAPDU respApdu = channel.transmit( new CommandAPDU(CLA, INS, P1, P2, data, Le));
Onward...

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 20 guests

JavaCard OS : Disclaimer