Skip to content

113 Card Mode Get(Card Mode) ​

A mobile phone sends a new command to get whether ssm_touch is currently in the add or card verification mode, and sesame5 replies with the successful command and mode.

Sequence Diagram ​

Mobile Sends Out Data ​

Byte0
Dataitem code

item code : SSM_OS3_CARD_MODE_GET (113)

ssm_touch Return Content ​

Byte43210
Datacard moderesitem codetypeop code

type : SSM2_OP_CODE_RESPONSE(0x07)

item code : SSM_OS3_CARD_MODE_GET (113)

res : CMD_RESULT_SUCCESS (0x00)

card mode ​

0x00->Verification Mode

0x01->Add Mode

iOS, Android, ESP32 Examples ​

Android Example ​

jsx
  override fun cardModeGet(result: CHResult<Byte>) {
      if (checkBle(result)) return
      sendCommand(SesameOS3Payload(SesameItemCode.SSM_OS3_CARD_MODE_GET.value, byteArrayOf())) { res ->
          result.invoke(Result.success(CHResultState.CHResultStateBLE(res.payload[0])))
      }
  }

iOS Example ​

jsx
    func cardsModeGet(result: @escaping (CHResult<UInt8>)) {
        if (self.checkBle(result)) { return }

        sendCommand(.init(.SSM_OS3_CARD_MODE_GET)) { response in
            result(.success(CHResultStateNetworks(input: response.data[0])))
        }
    }

Deprecated