On Tue, Sep 01, 1998 at 05:40:56PM -0500, David Timothy Corcoran wrote:
> Hello,
>
> OK, I promised a look ahead at the upcoming resource manager for talking
> to a variety of smartcard readers. Below is a visual representation of
> how it all will fit together and the C resource manager API. Please let
> me know of any concerns. It is not implemented yet for I am curious of
> your thoughts and suggestions. On the low level all readers will have a
> CT-API driver which is only three commands CT_Init, CT_Data, and CT_Close.
char CT_Init (unsigned int ctn, unsigned int pn);
pn "denotes the physical interface through wich the CardTerminal is
accessed".
In ctapi.pdf (page 25) you can see how port numbers map to physical
address.
In ctapi-0.96/scio.c we can find another way to map pn->address
(/dev/ttySpn)
^^
This is ambiguous. What pn=3 means ?
1) /dev/ttyS3 (ctapi-0.96)
2) 0x340 (ctapi.pdf)
3) both, if you connect 2 different CardTerminal to your PC.
How about:
struct CT_Info {
int fd;
void *CT_private;
/* ... */
};
struct CT_Info ct;
CT_Init ("/dev/ct1", &ct);
CT_Data (&ct, ....);
CT_Close (&ct);
...
>
> SCR Reader API version 1.0
>
> SCR_GetAPIVersion - Allows the caller and the vendor to negotiate which
> version of the Smart Card API to use
Can you provide an example ?
...
>
> SCR_GetValidSlots - Called to enumerate and determine the capabilities of
> all available smart card slots.
>
> SCR_GetManufacturerId - Called to get a string describing the smart card
> reader for the given SlotId.
>
GetValidSlots and GetManufacturerId are not ISO 7816/4 commands, right ?
We need some configuration file to describe how to build this commands.
...
>
> SCR_IsoReset - Performs a ISO-7816 smart card reset. If the card is not
> powered a powerup is initiated.
If CT_Init does not reset the card, how SCR_IsoReset know the command
to send to the CT ? I think we need configuration files; one for each CT type.
--
Ciao Walter.
C makes it easy for you to shoot yourself in the foot. C++ makes that
harder, but when you do, it blows away your whole leg.
-- Bjarne Stroustrup
***************************************************************
Linux Smart Card Developers - M.U.S.C.L.E.
(Movement for the Use of Smart Cards in a Linux Environment)
http://www.linuxnet.com/smartcard/index.html
***************************************************************