Hello,
I am trying to access to the MasterFile without using FileAcessCardService.
I want to talk to the card sending APDUs but I get no response.
The smart card reader is a Litronic 210 and the cards are a Schlumberger
ME200
and ASE cc1.
What I get is:

Opencard.core.terminal.CardTerminalException: timed out during read

Why?
What I am not doing right?
Is it possible to do what I want to do?
I also own ASE Memory cards and a GemSAFE card(4kb, RSA 512bit - Sign and
Unwrap(40)bit)

Thanks in advance!
Manel.

This is my code:

        public void cardInserted(CardTerminalEvent ctEvent)
                {
                System.out.println("Se ha introducido una tarjeta!");
                System.out.println(ctEvent.toString());
                try{
                        Slot sl=ctEvent.getSlot();
                        CardTerminal ct=sl.getCardTerminal();
                        if (ct.isSlotChannelAvailable(sl))
                                {
                                SlotChannel sch=ct.openSlotChannel(sl);
                                System.out.println("El SlotChannel obtenido
es:");
                                System.out.println(sch.toString());
                                System.out.println("Tenemos comunicaci�n con
la tarjeta");
                                int accion=1;
                                if (accion == 0)
                                        {
                                        System.out.println("Haremos un reset
de la tarjeta");
                                        CardID cid=sch.reset();
                                        informaCardID(cid);
                                        accion++;
                                        }
                                //Enviaremos un APDU
                                if (accion == 1)
                                        {
                                        System.out.println("Seleccionaremos
el MasterFile(Root)");
                                        CommandAPDU apdu=new CommandAPDU(7);
                                        apdu.append((byte)0xC0);
                                        apdu.append((byte)0xA4);
                                        apdu.append((byte)0x00);
                                        apdu.append((byte)0x00);
                                        apdu.append((byte)0x02);
                                        apdu.append((byte)0x3F);
                                        apdu.append((byte)0x00);
                                        ResponseAPDU rapdu =
sch.sendAPDU(apdu);
                                        System.out.println("Respuesta:");
        
System.out.println(rapdu.toString());
                                        }
                                if (accion == 2)
                                        {
                                        System.out.println("Preguntaremos
por el Challenge");
                                        CommandAPDU apdu=new CommandAPDU(5);
                                        apdu.append((byte)0xC0);
                                        apdu.append((byte)0x84);
                                        apdu.append((byte)0x00);
                                        apdu.append((byte)0x00);
                                        apdu.append((byte)0x04);
                                        ResponseAPDU rapdu =
sch.sendAPDU(apdu);
                                        System.out.println("Respuesta:");
        
System.out.println(rapdu.toString());
                                        }
                                }
                        
                        }
                catch(InvalidSlotChannelException isce)
                        {
                        System.out.println(isce.toString());
                        return;
                        } 
                catch(Exception fnfe)
                        {
                        System.out.println(fnfe.toString());
                        return;
                        } 
                System.out.println("Ya tenemos acceso al filesystem!");
                }


---
> Visit the OpenCard web site at http://www.opencard.org/ for more
> information on OpenCard---binaries, source code, documents.
> This list is being archived at http://www.opencard.org/archive/opencard/

! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
! to
!                           [EMAIL PROTECTED]
! containing the word
!                           unsubscribe 
! in the body.

Reply via email to