VhlCfg / File / IntIndMaxApduDataLen Value
This value specifies the maximum length of the data field of a single APDU in the context of an Interindustry VHL access, i.e. the maximum Le of READ BINARY / READ RECORD commands (number of bytes requested in the response data field, excluding the status bytes SW1-SW2) and the maximum Lc of UPDATE BINARY commands. If the data is encapsulated in data objects (file offsets above 0x7F00), the offset data object as well as the tag and length bytes of the discretionary data object are included.
Use this value to optimize the throughput: Larger values reduce the number of APDUs and thus the overhead of reading or writing large files. Smaller values may be required for cards with small APDU buffers.
If this value is missing or 0, the reader reads up to 253 and writes up to 255 data bytes per APDU. This corresponds to the firmware behaviour before this value was introduced with firmware 1100 v2.20.00.
Up to 255, the reader uses short APDUs. Above 255, the reader uses extended length APDUs (extended Lc and Le fields). Only use values above 255 if the card supports extended length APDUs (see ISO/IEC 7816-4, third software function table).
If the card supports different maximum lengths for command and response APDUs, the smaller one has to be configured.
As the value limits the complete data field, the number of file data bytes transferred per APDU depends on the access. Values below the minimum make the access fail with a configuration error.
| Access | MaxApduDataLen | File data bytes per APDU |
|---|---|---|
| Read/write at file offsets up to 0x7F00 | 1 and above | MaxApduDataLen |
| Read at file offsets above 0x7F00 | 4 to 255 | MaxApduDataLen - 3 |
| 256 and above | MaxApduDataLen - 4 | |
| Write at file offsets above 0x7F00 | 10 to 264 | MaxApduDataLen - 9 |
| 265 and above | MaxApduDataLen - 10 |
Keep in mind that writing larger blocks takes the card more time; the APDU timeout (VhlCfg.File.IntIndTimeout) may have to be increased accordingly.
See also the parameter Iso14MaxApduDataLen of VHL.Setup.
Properties
- Value ID: 0x0300/0x5A
- Default value: 0
Format
| Name | Type/Size | Description |
|---|---|---|
| MaxApduDataLen | Integer (16 bits) | Maximum Le (read) / Lc (write) per APDU |