WebSocket Commands PCSC PCSC Disconnect
April 13, 2023 at 2:39 AMDisconnect from the card
Role
This method gives access to the SCardDisconnect function.
Prototype
Method : pcsc.reader.{$id}.disconnect
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 |
Example
--> { "jsonrpc": "2.0", "id": 1,
"method": "pcsc.reader.mvQ5w5-6ZUbGfl76Q6w-lw.disconnect",
"params": {
"Token": "0AAZZevyX99hu1Py0Suib6"
}
}
Success
Result :
Field | Description |
---|---|
Result |
success if the PC/SC subsystem has returned SCARD_S_SUCCESS |
Example
<-- { "jsonrpc": "2.0", "id": 1, "result": {
"Result": "success"
}
}
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"
}
}