ISO/IEC 7816-4
Identification cards — Integrated circuit cards — Part 4: Organization, security and commands for interchange
Cartes d’identification — Cartes à circuit intégré — Partie 4: Organisation, sécurité et commandes pour les échanges

Status bytes
SW1-SW2 indicates the processing state. Due to specifications in ISO/IEC 7816-3, any value different from ’6XXX’ and ’9XXX’ is invalid; any value ’60XX’ is also invalid.
The values ’61XX’, ’62XX’, ’63XX’, ’64XX’, ’65XX’, ’66XX’, ’68XX’, ’69XX’, ’6AXX’ and ’6CXX’ are interindustry. Due to specifications in ISO/IEC 7816-3, the values ’67XX’, ’6BXX’, ’6DXX’, ’6EXX’, ’6FXX’ and ’9XXX’ are proprietary, except the values ’6700′, ’6B00′, ’6D00′, ’6E00′, ’6F00′ and ’9000′ that are interindustry.
Figure 1 shows the structural scheme of the values ’9000′ and ’61XX’ to ’6FXX’ for SW1-SW2.

Mifare DESFire EV1 4K Contactless Smart Cards,Mifare DESFire EV1 4K Proximity Smart Cards,Mifare DESFire 4K Smart Cards For Access Control systems,

Figure 1 — Structural scheme of values of SW1-SW2

Table 5 lists all the interindustry values of SW1-SW2 and shows their general meaning. ISO/IEC JTC 1/SC 17 reserves for future use any interindustry value of SW1-SW2 not defined in ISO/IEC 7816.

   SW1-SW2 Meaning
Normal processing ’9000′ ’61XX’ No further qualification SW2 encodes the number of data bytes still available (see text below)
Warning processing ’62XX’ ’63XX’ State of non-volatile memory is unchanged (further qualification in SW2) State of non-volatile memory has changed (further qualification in SW2)
Execution error ’64XX’ ’65XX’ ’66XX’ State of non-volatile memory is unchanged (further qualification in SW2) State of non-volatile memory has changed (further qualification in SW2) Security-related issues
Checking error ’6700′ ’68XX’ ’69XX’ ’6AXX’ ’6B00′ ’6CXX’ ’6D00′ ’6E00′ ’6F00′ Wrong length; no further indication Functions in CLA not supported (further qualification in SW2) Command not allowed (further qualification in SW2) Wrong parameters P1-P2 (further qualification in SW2) Wrong parameters P1-P2 Wrong Lefield; SW2 encodes the exact number of available data bytes (see text below) Instruction code not supported or invalid Class not supported No precise diagnosis

 

If the process is aborted with a value of SW1 from ’64′ to ’6F’, then the response data field shall be absent.
If SW1 is set to ’63′ or ’65′, then the state of the non-volatile memory has changed. If SW1 is set to ’6X’ except for ’63′ and ’65′, then the state of the non-volatile memory is unchanged.
In response to a command that is not the last command of a chain (see 5.1.1.1), interindustry warning indications are prohibited (see also ISO/IEC 7816-3), i.e., SW1 shall be set to neither ’62′ nor ’63′.
Two interindustry values of SW1 are independent from any transmission protocol.
–If SW1 is set to ’61′, then the process is completed and before issuing any other command, a GET RESPONSE command may be issued with the same CLA and using SW2 (number of data bytes still available) as short Le field.
–If SW1 is set to ’6C’, then the process is aborted and before issuing any other command, the same command may be re-issued using SW2 (exact number of available data bytes) as short Le field.
Table 6 lists all the specific interindustry warning and error conditions used in ISO/IEC 7816 at the time of publication.
Table 6 — Specific interindustry warning and error conditions

SW1 SW2 Meaning
’62′  ’00′ No information given
(warning) ’02′ to ’80′ Triggering by the card (see 8.6.1)
  ’81′ Part of returned data may be corrupted
  ’82′ End of file or record reached before reading Nebytes
  ’83′ Selected file deactivated
  ’84′ File control information not formatted according to 5.3.3
  ’85′ Selected file in termination state
  ’86′ No input data available from a sensor on the card
’63′(warning)  ’00′ ’81′ ‘CX’ No information given File filled up by the last write Counter from 0 to 15 encoded by ‘X’ (exact meaning depending on the command)
’64′(error)  ’00′ ’01′ ’02′ to ’80′ Execution error Immediate response required by the card Triggering by the card (see 8.6.1)
’65′(error)  ’00′ ’81′ No information given Memory failure
’68′  ’00′ No information given
(error) ’81′ Logical channel not supported
  ’82′ Secure messaging not supported
  ’83′ Last command of the chain expected
  ’84′ Command chaining not supported
’69′  ’00′ No information given
(error) ’81′ Command incompatible with file structure
  ’82′ Security status not satisfied
  ’83′ Authentication method blocked
  ’84′ Reference data not usable
  ’85′ Conditions of use not satisfied
  ’86′ Command not allowed (no current EF)
  ’87′ Expected secure messaging data objects missing
  ’88′ Incorrect secure messaging data objects
’6A’  ’00′ No information given
(error) ’80′ Incorrect parameters in the command data field
   ’81′ Function not supported
  ’82′ File or application not found
   ’83′ Record not found
  ’84′ Not enough memory space in the file
   ’85′ Ncinconsistent with TLVstructure
   ’86′ Incorrect parameters P1-P2
   ’87′ Ncinconsistent with parameters P1-P2
  ’88′ Referenced data or reference data not found (exact meaning depending on the command)
   ’89′ File already exists
  ’8A’ DF name already exists
Any other value of SW2 is reserved for future use by ISO/IEC JTC 1/SC 17.