Am 18.09.2014 um 11:55 schrieb Ludovic Rousseau: >> - how can I register them as new readers during runtime? >> - Is there a better point where I could start my server socket thread? >> Doing this in IFDHCreateChannel requires a "server reder" that will >> never connect to any card, which is a little ugly in my opinion. > The serial configuration interface may the best you can use. > > pcsc-lite implements RFReCheckReaderConf() to recheck the serial > configuration. This code is used in hotplug_libusb.c but has been > removed from hotplug_libudev.c. > > The idea is to send a signal SIGUSR1 to pcscd to tell it to reload the > serial configuration. > You may have 10 virtual readers configured as 10 serial devices. > IFDHCreateChannel() would fail for non existent readers. > On the next SIGUSR1 signal each configured serial driver should be > called again and IFDHCreateChannel() would succeed if the reader is > now available. > > You can experiment on that idea. > That sounds very good. I changed my code accordingly, configured some readers that return IFD_NO_SUCH_DEVICE on IFDHCreateChannel as long as no connection is present and change their behavor when a client is connect to return IFD_SUCCESS. Unfortunately I semm to be unable to trigger the rescaning of the reader configuration. I even tried sending SIGUSR1 manually from another shell or calling pcscd -H. But neither worked. At least my IFDHCreateChannel isn't called again. Am I missing something? (In case it matters, I'm using Ubuntu 12.04 LTS with default pcsc-lite 1.7.4)
Bye, -- BSc Alexander May, Senior Software Engineer HJP Consulting GmbH, Hauptstraße 35, 33178 Borchen, Germany Handelsregister HRB 7553, Amtsgericht Paderborn Geschäftsführer: Markus Hartmann fon +49-5251 4177634, fax +49-5251 4177666 www.hjp-consulting.com www.globaltester.org _______________________________________________ Pcsclite-muscle mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
