12.2.6.3 Monitor Answer

The Secure SAM-BA Monitor answers any command with an acknowledgement message formatted as follows:

____,________,________#[<payload>]

opcode errcode length

where:

  • opcode—4 characters of the command
  • errcode—value of the error code
  • length—in cases where the Monitor must send data, this field shows how much data is in the payload, thus how much data the host computer has to read.
  • payload—optional data, depends on the command.
    Table 12-13. Command List
    Command Full Name Description
    CACK SEND_CMD_ACK Returns an acknowledgment after receiving a command
    ASTA SEND_APPLET_STATUS Returns the status after execution of an applet
    SVER SEND_ROM_VERSION Returns the ROM code version
    Table 12-14. Error Code
    Error Name Hex Value Description
    secCmdOK 0x000000000 Command OK
    secCmdTooLong 0xFFFFFFFF Whole command size too long
    secCmdOpcodeSizeErr 0xFFFFFFFE Opcode size too long
    secCmdAddrSizeErr 0xFFFFFFFD Address field size too long
    secCmdLenSizeErr 0xFFFFFFFC Length field size too long
    secCmdRWSizeErr 0xFFFFFFFA RW field size too long
    secCmdOpcodeUnknown 0xFFFFFFF9 Unknown command opcode
    secCmdCustKeyLengthErr 0xFFFFFFF8 Customer key payload message size error
    secCmdCustKeyNotWritten 0xFFFFFFF7 Customer key not written in OTP
    secCmdCustKeyAlreadyWritten 0xFFFFFFF6 Customer key already written in OTP
    secCmdCmacErr 0xFFFFFFF5 Error during message CMAC verification
    secCmdDecryptErr 0xFFFFFFF4 Error during message decryption
    secCmdRsaHashAlreadyWritten 0xFFFFFFEE RSA hash already written in OTP