Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the meaning of 6E 00 when I send a command to a SmartCard

I try to access a SmartCard via C++. I got already the Connection and the CardHandle.

But when I send an APDU Command via SCardTransmit, i'll get 6E 00 as the answer from the card. No matter which APDU Command i send. Everytime 6E 00.

For Example:

  • FF CA FA 00 00 (Card's ATR - Answer To Reset) or
  • FF CA FF 82 00 (Product name in ASCII)

The same thing when i send the Command with an PC/SC Testtootl like "PC/SC Diag".

Has anybody an Idea what the meaning of this Error-Code and how to solve the problem?

Please help me !!!! ;-)

like image 397
Pusher Avatar asked Jul 07 '11 10:07

Pusher


2 Answers

According to ISO 7816-4 0x6E00 means "Class not supported".

Are you using the correct CLA value in the APDU?

The class (CLA) byte is usually 0x00, 0xA0, 0xC0 or 0xF0 and sometimes masked with 0x0C that indicates Secure Messaging on some cards. AFAIK, the only invalid CLA value is 0xFF.

But this varies from one card to another, do you have the card specification from the vendor?

like image 167
Jonas Engström Avatar answered Nov 15 '22 05:11

Jonas Engström


It means "Wrong Instruction Class". Maybe it's just the wrong type of card?

https://datatracker.ietf.org/doc/html/draft-urien-eap-smartcard-05

like image 21
Roddy Avatar answered Nov 15 '22 05:11

Roddy