0

I have been trying to lock the first 15 pages to avoid any write operation.

The commands that I have tried to use are listed below:

note: [0x00, 0x00, 0xFF, 0xFF] is a byte array

CommandAPDU(0xFF, 0xD6, 0, 2, [0x00, 0x00, 0xFF, 0xFF]) or     CommandAPDU(0xFF, 0xD6, 0, 3, [0x00, 0x00, 0xFF, 0xFF])

I'm always getting 90 00so it seems to be doing something although I'm still able to write.

After that I read something related with COMPATIBILITY_WRITE that should be using A0 so I have tried to reformulate my command using this and I'm always getting 67 00 or 6B 00.

(0xFF, 0xA0, 0, 2, [0x00, 0x00, 0xFF, 0xFF])

I'm using Ultralight C with Omnikey5X21.

Am I doing something wrong?

RPDF
  • 76
  • 8

1 Answers1

0

Well, first thing is 90 00 means the operation was successful. So the first set of commands is doing something successfully - just not what you want it to do.

For the second command, 67 00 means wrong length and 6B 00 means wrong P1/P2 parameters.

A whole set of APDU responses is here: https://www.eftlab.com/knowledge-base/complete-list-of-apdu-responses/

The Omnikey documentation suggests using 0xFF, 0x30, 0x00, 0x02 for locking. See the formatting documentation here under section 10.3.3: http://www.intraproc.com/downloads/Fargo/HDP5000%20OLD/Omnikey%20CardMan%205121/Manuals/ok_contactless_developer_guide_an_en.pdf