Direct protocol through PC/SC

Principles

In the PC/SC architecture, the SCardControl function implements a direct dialog (“Escape”) between an application and the firmware running in the coupler. This function is available even when no card is present.

As for SpringCore device, the SCardControl function call gives access to all the features of the Direct protocol.

The encapsulation of the Direct protocol in the SCardControl function is documented below.

Important warning

All the instructions that are exposed through the SpringCore Direct Protocol can be invoked through SCardControl.

Pay attention that most instructions are likely to modify the behaviour of the device in real-time, and, therefore, are likely to be not supported by the PC/SC driver and the upper-level PC/SC middleware and application stack.

Format of the messages

At the difference with Direct protocol where the length has to be provided within the message, SCardControl instructions and responses are encapsulated in CCID frames; therefore, the length is already known and managed by the CCID exchanges layers, and does not have to be specified within the message itself.

Also, since the CCID protocol enforces an half-duplex command/response scheme, the CLAss selector is not repeated in the response.

Instructions

Field Length Description / remark
CLA 1 byte CLAss selector
INS 1 byte opcode of the INStruction
Data 0 or more bytes Command data

Responses

Field Length Description / remark
STA 1 byte STAtus
Data 0 or more byte Response data