Thankyou for your quick reply, so for the sequence of events when the linux box is started, does it happen something like this. pc/sc daemon loads and waits for an application that may or may not be run so effectively it is on stand by. so that calls the ifdhandler, which in turn calls the kernel for certain functions correct?and the timing of it all?, which resources must i read to find out all relevant calls made for the overall working of the system?. Thanks again for your help.


Hi,

First I will add on the figure the SCard API (PC/SC Lite API) that used applications to contact the PC/SC Lite daemon.

When you start your box, if it is declared somewhere in the script to start the PC/SC Lite daemon, it runs, else it doesn't run.
In this last case you can launch it.


Now assume that the daemon runs. At its start it parse a config file where are declared statics readers (i.e. serial readers) and launch the IFDHandlers that match with them.
Then the daemon asks to all the IFDHandler in turn if a card is present. It does this task in loop until an application request arrived througth SCard API in order to use a reader for example by sending an APDU.
At this moment IFDHandler transmit the request to the reader throught the APIs (USB or serial, ...) to the kernel services which transmit it to the hardware that send it to the card.
During that the reader and the card inserted work, the IFDHandler of this particular reader is not called any more by the daemon. But the PC/SC Lite Daemon continues to request the card presence to the other IFDHandlers. At the end of the work of the card (i.e. APDU response) the IFDHandler is again asked by the daemon.


When a USB reader is plugged the PC/SC Lite Daemon detects it and load the matching IFDHandler. And the sequence is the same as described above.

Consider the PC/SC Lite Daemon is just a Ressource Manager.
If you want to understand the overall you can look the code of PC/SC Lite.


+-------------+ +-------------+ |Application A| |Application B| +-------------+ +-------------+

               +---------------------------+
               |PC/SC Lite API == SCard API|
               +---------------------------+

               +---------------------------+
               |     PC/SC Lite Daemon     |
               +---------------------------+


+----------+ +------------+ |IFDHandler| | IFDHandler | | for USB | | for serial | | reader | | reader | +----------+ +------------+

USER LAND
------------------------------------------------------
KERNEL LAND      +---------+    +------------+
                | USB API |    | Serial API |
                +---------+    +------------+

                +---------------------------+
                |         The KERNEL        |
                +---------------------------+

------------------------------------------------------
HARDWARE
                 +--------+      +--------+
                 |  USB   |      | Serial |
                 | reader |      | reader |
                 +--------+      +--------+


I hope this help you.


Regards,

--
Damien Sauveron
----------------------------------------
LaBRI, Universit� Bordeaux 1
351, cours de la Lib�ration
33405 Talence cedex
France
T�l. On demand - Fax. +33 5 40 00 66 69
----------------------------------------



_______________________________________________
Muscle mailing list
[EMAIL PROTECTED]
http://lists.musclecard.com/mailman/listinfo/muscle

Reply via email to