hardcoded limit for in/output data size for the apdu commands?
Is there a hardcoded limit for in/output data size for the apdu commands when using multos cards. We are using a ML3-36k-r1 and all output data is truncated to 255 bytes.
From my understanding of the cards should be able to consume/produce more data than 255 as in/output.
You can check the maximum TPDU sizes for the product by looking at the MIR. This is the M3 MIR entry.
It is possible to return more than 255 bytes from the application and use multiple GET RESPONSE commands to recover the data. Here is an example application that returns 272 bytes of data.
#pragma attribute("aid", "f0 00 00 A1")
#pragma attribute("dir", "61 10 4f 4 f0 00 00 A1 50 8 54 65 73 74 20 61 70 70")
#define ERR_OK 0x9000
#define ERR_WRONGCLASS 0x6402
#define ERR_BAD_INS 0x6404
#define CMD_RANDOM 0x10
#define MYAPP_CLA 0x70
if (CLA != MYAPP_CLA)
// Generate 8 bytes of random data
// Store to buffer
__code (STORE, __typechk(char *, buff), 8);
// Copy to public
// Mark first and last 8 bytes
To generate and read the random data, the APDU sequence is as follows (expected Status Words returned are in brackets):
At present, the maximum amount of data you can return like this is equal to the size of the Public data area.