Topic: Setting TWI timeout

Hi,

We have a set of ISO-14443 cards which require an extended timeout. They don't provide the TB byte in the ATS, hence ISO-14443 says they should default to TWI=4, however these cards need a value of TWI=10 in order to operate.

How, using the libnfc API or otherwise, can I programmatically set the TWI value for TAMA devices?

Thanks,

snapdev

Re: Setting TWI timeout

Hi,

snapdev wrote:

We have a set of ISO-14443 cards which require an extended timeout. They don't provide the TB byte in the ATS, hence ISO-14443 says they should default to TWI=4, however these cards need a value of TWI=10 in order to operate.

How, using the libnfc API or otherwise, can I programmatically set the TWI value for TAMA devices?

What does mean TWI please ? BTW, I don't find TWI reference in PN53x user manual.

Romuald Conty

Re: Setting TWI timeout

In ISO-14443-4,

FWI is Frame waiting time integer and is provided by card in high nybble of "TB" from ATS (Answer to select)

FWT  is the Frame Waiting Time, and defines the maximum time for a PICC to start it's response frame after the end of a PCD frame.

The FWT is calculated as ( 256 x 16/fc )x(2^FWI)

FWI is coded in the range 0 to 14, the value 15 is RFU. The default is 4, it if TB is absent, then assume a value of 4.

Hopefully that makes sense.

So how do you tell the PN53x how long it can wait for a response to an APDU in initiator mode?

Re: Setting TWI timeout

FWT_MIN = ~302 μs

FWT_DEFAULT = ~4833 μs

FWT_MAX = ~4949 ms

Re: Setting TWI timeout

snapdev wrote:

So how do you tell the PN53x how long it can wait for a response to an APDU in initiator mode?

First, I made another search on FWT and FWI on PN53x manual : i got one response but it does not indicate how to set FWT and/or FWI.

In "RF Communication" chapter, you can set various timings (from manual) :
- fATR_RES TimeOut :  defines the timeout between ATR_REQ and ATR_RES in initiator mode
- fRetryTimeout : defines the timeout value to give up reception from the target in case of no answer. This timeout definition is also used when the target is a FeliCa or a mifare card.

But it don't seems to be what you are looking for, isn't it ?

Romuald Conty