Hi,
Is there a way for setting the PPS parameters using
PCSC Lite API?
In the IFD Handler 2.0 (or 3) interface there is a
function IFDHSetProtocolParameters() that allows to
specify a PPS request.
As far as I see, this function is currently used
internally by pcsc 1.0.1 for switching from T=0 to T=1
and viceversa if a card supports both protocols. The
PPS parameters are allways left to 0x00.
It could be very handy to be able to specify those PPS
parameters from the application level. If the IFD
Handler supports PPS (and towitoko 2.0.5 driver does).
The function could be used to set the IFD to a
baudrate other than the default, enlarge or shorten
the BWT, CWT (for T=1) and WWT (for T=0).
I think on three different ways of accomplishing this:
* Currently my CT-API driver allows to specify the PPS
request in the data field of the REQUEST ICC and RESET
CT commands. The SCardControl can be used to send such
command to the drive. It would work without modifiying
anithing on the PCSC Lite but it would depends on the
particular driver.
* Create a mapping to the funtion
IFDHSetProtocolParameters() in the winscard API.
* Modify the struct SCARD_IO_HEADER to convey also the
PPS paramters:
typedef struct _SCARD_IO_HEADER {
DWORD Protocol;
DWORD Length;
UCHAR Flags;
UCHAR PPS1;
UCHAR PPS2;
UCHAR PPS3;
} SCARD_IO_HEADER, *PSCARD_IO_HEADER;
On the pcsclite API this would map to the struct
SCARD_IO_REQUEST:
typedef struct _SCARD_IO_REQUEST{
unsigned long dwProtocol;
unsigned long cbPciLength;
unsigned char Flags;
unsigned char PPS1;
unsigned char PPS2;
unsigned char PPS3;
} SCARD_IO_REQUEST, *PSCARD_IO_REQUEST,
*LPSCARD_IO_REQUEST;
This way the application can specify different PPS
options to the default on the first call to
SCardTransmit(), in the SendPci parameter.
The first time this is done the IFD Handler would
reset the card and perform PPS procedure. The PPS
confirm could then be returned in RecvPci parameter.
If subsequent calls to SCardTransmit() transport
different SCARD_IO_REQUEST options the IFD Handler
could then reset the card and set new PPS options.
I think this third way is the best, but I don't know
what David was thinking regarding to PPS when he
designed the API.
Thanks,
Carlos.
__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com
***************************************************************
Unix Smart Card Developers - M.U.S.C.L.E.
(Movement for the Use of Smart Cards in a Linux Environment)
http://www.linuxnet.com/
To unsubscribe send an email to [EMAIL PROTECTED] with
unsubscribe sclinux
***************************************************************