Skip to content

109 Card Get ​

The mobile phone sends a command to pull a card to ssm_touch. After the command is successfully responded, the card data will be sent to the mobile phone.

Sequence diagram ​

Data sent by mobile phone ​

Byte0
Dataitem code

item code: SSM_OS3_CARD_GET (109)

ssm_touch returns ​

Byte210
Dataresitem_codetype
DescriptionCommand processing statusCommand numberPush type

type: SSM2_OP_CODE_RESPONSE (0x07)

item code: SSM_OS3_CARD_GET (109)

res: CMD_RESULT_SUCCESS (0x00)

iOS, Android, ESP32 examples ​

Android example ​

jsx
    override fun cards(result: CHResult<CHEmpty>) {
        if (checkBle(result)) return
        sendCommand(SesameOS3Payload(SesameItemCode.SSM_OS3_CARD_GET.value, byteArrayOf())) { res ->
            result.invoke(Result.success(CHResultState.CHResultStateBLE(CHEmpty())))
        }
    }

iOS example ​

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

        sendCommand(.init(.SSM_OS3_CARD_GET)) { _ in
            result(.success(CHResultStateNetworks(input: CHEmpty())))
        }
    }

ESP example ​

jsx