Sorry All ... but I stard a new topic on one of my old subject.
Hi everybody ... Acutally I try to read the IMSI (serial number of a gsm sim card), I've moved to the JAVA 1.6 release, because AFAIK, the is the only version that support smartcard I/O.
Actually I use this code to access my card:
------------- CUT HERE -------------------
try {
List<CardTerminal> terminals = factory.terminals().list();
System.out.println("Terminals: " + terminals);
// Get the first terminal
CardTerminal terminal = terminals.get(0);
// * *******************************************************************************
// *
// * Establish a connection with the card
Card card = terminal.connect("T=0");
System.out.println("card: " + card);
byte[] x = { (byte)0x00,(byte)0x00,(byte)0x00,(byte)0xc1 };
byte Command[];
Command=new byte[4];
Command[0]=(byte)0xCA;
Command[1]=(byte)0xA0; // calculator
Command[2]=(byte)0x03;
Command[3]=(byte)0x03;
CardChannel channel = card.getBasicChannel();
ResponseAPDU r = channel.transmit(new CommandAPDU(Command));
----------- CUT HERE ----------------------
I think that I've to know the right value for the Command byte.
Any suggestion?!?!