I hav following doubts in ur query,
1. When you say u r getting 9000 on card u mean to say 256 bytes of data followed by sw-9000 instead of sw-61XX?
2. How are u firing the APDUs to real card? I mean manually using sme reader or using any mobile device.
3. Can you provide the APDUs.
Thanks for reply
1- I have data on card which length 372 bytes. In first command I read 255 bytes and because there is more data on card chain variable is true so applet must send out 255 bytes and return 61xx to host, according to above code. but it sends first 255 bytes of data and sends status code 9000 (in first command). thus the answer of first question is "yes".
2- I have an ominikey 3121 cardreader that has a usb cable and connected to my notebook by usb port. I send my APDUs by several application. first application is JSmartCardExplorer.jar which can be downlowded in sourceforge. second application is gpshell 1.4.4.
3- my APDUs is not according to standard because it just for test. i send my apdu with P1,P2 and Lc= 0x00 and Le =FF.
also i tried my apdu and changed code for Lr<Le and Lr=Le, but the status code allways is 9000. for example i set Le = 255 and sent 130 byte in Le by changing MAX_APDU to 130.
I dnt think it varies on T=0 or T=1 bcoz im wrking on card supporting both n cmd chaining wrks fr me.
1. Write a sample applet which will simply throw the execption 0x61XX without any data and see the behavior of card.
2. If it throws 0x61XX then ok OR if it throws 0x9000 then its sme thing to do wit ur card.
I sent before such apdu and it responded 9000 status word again.
i think there are differences in T=0 and T=1.
actually I tested this command when i connect to card by T=0 protocol and it didn't work. also there is little probability that card don't support 61xx exception.
In "Zhiqun Chen" book which write about there is sample code for T=1 connection that uses ISOException(SW_2_MORE_RECORDS)
which didn't exist in iso7816.
did you notice that?
I tried it. applet respond to iso7816 exception correctly except ISO7816.SW_BYTES_REMAINING_00. but it don't respond to my own exception like SW_HAS_MORE_DATA = 6300. it send 9000 status word again.
I send exception like this:
private static final short SW_HAS_MORE_DATA = (short) 0x6300;
I must say that in netbeans simulator, it works correctly.
whats your idea?