1 Reply Latest reply: Apr 24, 2013 12:41 PM by safarmer RSS

    sun.security.smartcardio.PCSCException: Unknown error 0x1f

    PavolAlcohol
      Hi all,

      i've tried to read longer data from my applet via javax.smartcardoi API. I'm able to get max 8190B(0x1FFE) from the card within the APDU response, otherwise I got following error:.
      javax.smartcardio.CardException: sun.security.smartcardio.PCSCException: Unknown error 0x1f
           at sun.security.smartcardio.ChannelImpl.doTransmit(Unknown Source)
           at sun.security.smartcardio.ChannelImpl.transmit(Unknown Source)
           at cmt.test.PCSC.main(PCSC.java:207)
      Caused by: sun.security.smartcardio.PCSCException: Unknown error 0x1f
           at sun.security.smartcardio.PCSC.SCardTransmit(Native Method)
           ... 3 more

      I would be very happy when it will works cca 20KB data per one response. Is it possible? I read simiral threads about this problem but without any solution.

      My applet implements ExtendLength interface and has following configuration:
      JCOP:JCOP 2.4.2r1
      JAVA CARD: jc222
      Global Platform: gp22

      Regarding the extend lengh APDU support it should by OK from the OMNIKEY. I'm using newest driver 1.2.9.2 for Win 7.

      thanks
        • 1. Re: sun.security.smartcardio.PCSCException: Unknown error 0x1f
          safarmer
          This is an error from the PC/SC layer. It is probably coming from the underlying smartcardio code at ChannelImpl.doTransmit() on this line:
          byte[] response = SCardTransmit(card.cardId, card.protocol, command, 0, n);
          I am guessing that for this test you are sending 0x1FFF bytes? It may be that there is a limitation on the underlying PC/SC implementation. I have not personally tried to retrieve more than 6KB - 8KB with extended length APDUs as I have never had the need.

          - Shane