Martin,

pls try to change the following code in
com.gemplus.opencard.terminal.GemplusBlockProtocol.java

// calculate the timeout
      stopTime = System.currentTimeMillis() + getBlockWaitingTime();


into

// calculate the timeout
      stopTime = System.currentTimeMillis() + 10 * getBlockWaitingTime();


The problem is the following:

The card tells the terminal driver in the ATR about its block waiting time
(BWT)
This block waiting time is furtheron used to detect timeouts in
communication with the card in the java terminal code.
But if the card sends a T1 wait time extension S-Block to indicate that it
needs longer than BWT this is
handled in the Gemcore chipset within the reader and not passed along to
the java terminal code.
Thus the java terminal code still insists on the ATR - BWT and produces the
timeout exception.
By increasing the java timeout to a multiple of the ATR - BWT you can avoid
that problem.
Setting the value too large means that you cannot detect REAL timeouts and
your
sendAPDU call never (or very long) returns in case of real timeouts.

Another known bug is when the pure java driver receives response APDUs
longer than 128 bytes.

We have a fix for package opencard.opt.terminal.protocol that we intend to
make part of the next official version of
OCF.

(See attached file: T1Protocol.java)(See attached file: T1Block.java)


Peter Bendel, Smartcard Solutions,       Tel.: +49-7031-16-4650, Fax -4888
Dept. 4969, Bldg. 7103-01, Room 01-109        Lotus Notes:  bed@ibmde
IBM Pervasive Computing Division         Internet: [EMAIL PROTECTED]

Please visit the OpenCard Framework's homepage at http://www.opencard.org

T1Protocol.java

T1Block.java

Reply via email to