Re: Re: Re: writing a binary file on basic card


[ Follow Ups ] [ BasicCard User Forum ]

Posted by christian (84.131.26.121) on April 29, 2006 at 06:31:14:

In Reply to: Re: Re: writing a binary file on basic card posted by massimilianof on April 28, 2006 at 15:47:40:

Unfortunately there is NO way to transmit more than 255 (or was it 254, I'm not sure here) bytes with one command regardless of whether it's a custom or a built-in command. This is due to limitations in the T=0 and T=1 protocols. You can see that the "Lc" field is only 8 bits long, thus limiting the maximum size of the "IDATA" field.

You'll have to split your request to several "Put" commands. BTW: The correct APDU for FilePut is
CLA=0xc0 INS=0x18 P1=0x93 P2=FileNumber Lc=DataLength IDATA=Data Le=1.
But if you use ZCBASIC or one of the available APIs for your terminal program, you won't have to define FilePut yourself, simply use the provided one.

Finally, your definition of a file system looks OK to me.

Christian


Follow Ups:


[ Follow Ups ] [ BasicCard User Forum ]