WebSocket Commands PCSC PCSC Transmit
April 13, 2023 at 2:39 AMExchange APDUs with the card
Role
This method gives access to the SCardTransmit function.
The reader must be connected befoire using this command.
The timer associated to the reader will be reseted each time this command will be called.
Prototype
Method : pcsc.reader.{$id}.transmit
where {$id}
is the ReaderId, as found from an earlier call to the List PC/SC readers method.
Params :
Field | Description |
---|---|
Token |
Token given when connected to the card |
Command |
The command (or C-APDU) to send to the card (hexadecimal string) |
Example
--> { "jsonrpc": "2.0", "id": 1,
"method": "pcsc.reader.mvQ5w5-6ZUbGfl76Q6w-lw.transmit",
"params": {
"Token": "0AAZZevyX99hu1Py0Suib6",
"Command": "FFCA000000"
}
}
Success
Result :
Field | Description |
---|---|
Result |
success if the PC/SC subsystem has returned SCARD_S_SUCCESS |
Response |
The response (or R-APDU) that has been received from the card (hexadecimal string) |
Example
<-- { "jsonrpc": "2.0", "id": 1,
"result": {
"Result": "success",
"Response": "047C7B02C840809000"
}
}
Errors
A result response is returned in case of a PC/SC-error:
<-- { "jsonrpc": "2.0", "id": 1,
"result": {
"Result": "error",
"Error": "SCARD_W_REMOVED_CARD",
"Message": "The smart card has been removed, so further communication is not possible."
}
}
The error code 403 is returned in an error response if the specified {$id}
is not found:
<-- { "jsonrpc": "2.0", "id": 1,
"error": {
"code": 403,
"message": "Not found"
}
}