Secure SAM-BA Monitor Answer

The Secure SAM-BA Monitor answers any command with an acknowledgment 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 to SAM-BA, this field shows how much data is in the payload, thus how much data SAM-BA has to read.
  • payload—optional data, depends on the command.
    Table 2-36. Command List
    CommandFull NameDescription
    CACKSEND_CMD_ACKReturns the status of simple commands
    ASTASEND_APPLET_STATUSReturns the status after execution of an applet
    SVERSEND_ROM_VERSIONReturns the ROM code version
    Table 2-37. Error Code
    Error NameHex ValueDescription
    secCmdOK0x000000000Command OK
    secCmdTooLong0xFFFFFFFFWhole command size too long
    secCmdOpcodeSizeErr0xFFFFFFFEOpcode size too long
    secCmdAddrSizeErr0xFFFFFFFDAddress field size too long
    secCmdLenSizeErr0xFFFFFFFCLength field size too long
    secCmdRWSizeErr0xFFFFFFFARW field size too long
    secCmdOpcodeUnknown0xFFFFFFF9Unknown command op-code
    secCmdCustKeyLengthErr0xFFFFFFF8Customer key payload message size error
    secCmdCustKeyNotWritten0xFFFFFFF7Customer key not written in OTP
    secCmdCustKeyAlreadyWritten0xFFFFFFF6Customer key already written in OTP
    secCmdCmacErr0xFFFFFFF5Message CMAC error
    secCmdDecryptErr0xFFFFFFF4Error during message decryption
    secCmdRsaHashAlreadyWritten0xFFFFFFEERSA hash already written in OTP