I'm developing an applet and using the OMNIKEY 5321 CL reader for communication and testing. One of the requirements for our card is to read large binary data.
For this purpose i used extented lenght APDU to read the data from card.
When I tested it via JCOP simulation I was able to read up to 32767 bytes as described in specification. But problem occurs when I test it with reader, in this case I'm able to read max 298B in APDU response. When I send greater byte count than 298B i have got following error in JCShell plugin: jcshell: requestSessionKey.jcsh: Error code: -6 (Card terminal error) jcshell: requestSessionKey.jcsh: Communication problems: A device attached to the system is not functioning.
Regarding the extend lengh APDU support it should by OK from the OMNIKEY. I'm using newest driver 220.127.116.11 for Win 7.
Here my configuration:
JAVA CARD: jc301
Global Platform: gp22
Can somebody help me? Any ideas?
I am not sure where the issue is, as I have managed to return several KB over CLF with the same reader and card on Linux. It may either be a driver or firmware issue with the reader. Since it is a PC/SC or terminal failure the driver is probably your best bet. You could always try on Linux as well and see if Windows is getting in the way.
If you want to use PC/SC directly, I have a simple Go program that reads an APDU file (just hex encoded APDU strings) and sends them to a smart card. You can give that a try if you like.
The code is at: https://bitbucket.org/safarmer/go-apdus
There is a Goclipse project as well as the source. You will need to install Go and run "go get github.com/ebfe/go.pcsclite/scard" to install the required PC/SC wrapper. Once you have done this you can run the program with -file <apth to text file>
An example text file: