Page 1 of 2

What's the difference between APDU and TPDU?

Posted: Thu Jan 10, 2019 2:48 am
by BirdKing
What's the difference between APDU and TPDU for javacard ?

Re: What's the difference between APDU and TPDU?

Posted: Mon Jan 14, 2019 5:48 am
by Ellisun
The TPDU (Transport Protocol Data Unit) is a message encapsulation format where there are several bytes of routing header added to the front of the payload message.
The processing overhead of the TPDU has two components: the overhead TPDU and the overhead per byte.

The APDU (Application Protocol Data Unit) is the communication unit between a reader and a card. The structure of an APDU is defined by the ISO 7816 standards.
There are two categories of APDUs: command APDUs and response APDUs.

Re: What's the difference between APDU and TPDU?

Posted: Sun Jan 27, 2019 8:45 am
by BirdKing
thanks very much.
I want to implement CCID on APDU level. But I'm confused with that how to process PCB, NAD and so on ?

Re: What's the difference between APDU and TPDU?

Posted: Sun Jan 27, 2019 5:48 pm
by owlstead
Yes, things like the NAD would be part of the TPDU, not the APDU. So that's not possible.

Re: What's the difference between APDU and TPDU?

Posted: Mon Jan 28, 2019 7:45 am
by BirdKing
And I need not process S block and R block too ?

Re: What's the difference between APDU and TPDU?

Posted: Mon Jan 28, 2019 7:45 am
by BirdKing
TPDU is without PCB. The S block and the R block should be absence. Oh, I'm so foolish.
But how to process the PPS?

Re: What's the difference between APDU and TPDU?

Posted: Sat Feb 16, 2019 9:53 am
by BirdKing
On APDU level, CCID has a setParamters(0x61) command to set the GT, WT and protocol. So I think it doesn't need PPS.

Re: What's the difference between APDU and TPDU?

Posted: Sat Feb 16, 2019 10:06 am
by BirdKing
On APDU level, how to process wtx or 0x60?
In CCID specification I can see "If the ICC request time extension, by using a NULL proceduce byte (0x60) in T=0 protocol or S(wtx) in T=1 prptocol, the CCID informs the host of this request." But I annot understand very well.

Re: What's the difference between APDU and TPDU?

Posted: Mon Feb 25, 2019 6:26 am
by BirdKing
On APDU level, if the 8th word of pc_to_rdr_xfrblock is 0x0010 indicates the abData field is empty. This empty xfrblock could take place of s wtx in T=1 or T=0.

Re: What's the difference between APDU and TPDU?

Posted: Mon Feb 25, 2019 6:28 am
by BirdKing
The empty xfrblock also replace the ack in extend apdu.