You are mixing concepts. I'll try to make it a little clear.
Disclaim: I'm not sure about some of the following lines!
A) Card Type
There are two kinds of Dual Interface cards:
- Dual Interface Dual Chip.
- Dual Interface Single Chipe.
AS you see above, regarding the type of the card, you may receive equal, or different responses for a specific command that is sent to the card through different interfaces.
Available cards are usually Dual Interface Single Chip. It is also notable that a Dual Chip Dual Interface can configured in way that have equal responses for equal commands on different interfaces.
B) APDU Handler Entity
In Java Cards, the applet that is receiving the APDU commands, can decide to respond equal or different to a specific incoming command based on the interface that the command is received from.
For example, the applet that is shown in the below snippet, in respond of APDU Command = 00 10 00 00 00
, returns "Contact" when the interface is contact, and returns Contactless
when the interface is contactless:
package testPack;
import javacard.framework.*;
public class TestApp extends Applet
{
private static final byte[] data = { (byte)'C', (byte)'o', (byte)'n', (byte)'t', (byte)'a', (byte)'c', (byte)'t',
(byte)'l', (byte)'e', (byte)'s', (byte)'s'};
public static void install(byte[] bArray, short bOffset, byte bLength)
{
new TestApp().register(bArray, (short) (bOffset + 1), bArray[bOffset]);
}
public void process(APDU apdu)
{
if (selectingApplet())
{
return;
}
byte transportMedia = (byte) (APDU.getProtocol() & APDU.PROTOCOL_MEDIA_MASK);
boolean isContactless = (transportMedia == APDU.PROTOCOL_MEDIA_CONTACTLESS_TYPE_A) ||
(transportMedia == APDU.PROTOCOL_MEDIA_CONTACTLESS_TYPE_B);
byte[] buf = apdu.getBuffer();
switch (buf[ISO7816.OFFSET_INS])
{
case (byte)0x10:
apdu.setOutgoing();
if (isContactless){
apdu.setOutgoingLength((short)0x0B);
apdu.sendBytesLong(data, (short)0, (short)0x0B);
}else{
apdu.setOutgoingLength((short)0x07);
apdu.sendBytesLong(data, (short)0, (short)0x07);
}
break;
default:
ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
}
}
}
Works as below:
Connect successful. # via the "Contact" Interface
Send: 00 A4 04 00 06 01 02 03 04 05 00 00
Recv: 90 00
Send: 00 10 00 00 00
Recv: 43 6F 6E 74 61 63 74 90 00
Disconnect successful.
Connect successful. # via the "Contactless" Interface
Send: 00 A4 04 00 06 01 02 03 04 05 00 00
Recv: 90 00
Send: 00 10 00 00 00
Recv: 43 6F 6E 74 61 63 74 6C 65 73 73 90 00
Note that, Security Domain and Card Manager (The entity responsible for answering to SELECT APDU Command), usually have equal responses for both interfaces.
C) APDU Commands vs Pseudo APDU
Card readers may supports reader features management/control commands. For example you can change the color of the LED, or delay of the beep sound. These commands that are supposed to be sent to the reader itself and not to the card are named Pseudo-APDU commands and usually are started with 0xFF
(I think the reader manufacturers choose this value because it is already defined in ISO7816-3 for PPSS in T=0 and for NAD in T=1, and so indicated as INVALID for normal applet commands).
The Specifications that the USB smart card readers are build based on it, is PCSC. You can download them freely from here. There is defined some Pseudo-APDU commands that usually reader manufacturers implement them in their products. They also may add some proprietary Pseudo APDU commands to their readers to add the capability to work with Memory Cards (SLE4432/42 for example) or to work with Mifare card.
The readers have a Pseudo-APDU command named Direct Transmint Command and it used to send a Payload to the card. For your reader, as you mentioned in the question, the Direct Transmit Command is as below:
I'll add something here soon! ...