0

I have successfully created Linear fixed file structure EF file in SCOSTA smart card BY USING following APDU Command

00 E0 00 00 1B 62 19 82 05 03 41 00 25 05 83 02 60 01 8A 01 01 88 01 48 8C 06 6E FF FF 22 25 25

I am also try to write the record oriented file using this APDU command.

00 DC 00 04 12 (Data=41 73 70 65 72 67 69 6C 6C 69 75 73 3A 6E 6E 6E 6E 6E)

But I got the error (6A85) LC inconsistent with TLV structure. I need the solution to write the smart card EF record oriented file. Please guide me.

vlp
  • 7,811
  • 2
  • 23
  • 51

1 Answers1

2

Your are trying to send an UPDATE RECORD command directly after creation. At this time no record may be available yet (some operating systems initialize a file with empty records, but this is no ISO-requirement).

  • First proposal is, to use Append Record instead
  • If this fails, verify that the record size of the created file matches your data. I can't find any 12 in the file control information, so there may be a mismatch. If I read the SCOSTA specification correctly, the record size specified is 0x25. In that case you MUST pad the data yourself, to achieve the correct record size.
guidot
  • 5,095
  • 2
  • 25
  • 37