This function is required to open a communications channel to the port listed by
Once the channel is opened the reader must be in a state in which it is possible to query IFDHICCPresence() for card status.
|[in]||Lun||Logical Unit Number|
Use this for multiple card slots or multiple readers. 0xXXXXYYYY - XXXX multiple readers, YYYY multiple slots. The resource manager will set these automatically. By default the resource manager loads a new instance of the driver so if your reader does not have more than one smart card slot then ignore the Lun in all the functions.
PC/SC supports the loading of multiple readers through one instance of the driver in which XXXX is important. XXXX identifies the unique reader in which the driver communicates to. The driver should set up an array of structures that asociate this XXXX with the underlying details of the particular reader.
|[in]||DeviceName||Filename to use by the driver.|
For drivers configured by
/etc/reader.conf this is the value of the field DEVICENAME.
For USB drivers the
DeviceName must start with
usb:VID/PID. VID is the Vendor ID and PID is the Product ID. Both are a 4-digits hex number.
Typically the string is generated by:
printf("usb:%04x/%04x", idVendor, idProduct);
DeviceName string may also contain a more specialised identification string. This additional information is used to differentiate between two identical readers connected at the same time. In this case the driver can't differentiate the two readers using VID and PID and must use some additional information identifying the USB port used by each reader.
For USB drivers using libusb http://libusb.sourceforge.net/ for USB abstraction the
DeviceName the string may be generated by:
So it is something like:
usb:08e6/3437:libusb:001:042 under GNU/Linux.
If pcscd is compiled with libudev support instead of libusb (default since pcsc-lite 1.6.8) the string will look like:
printf("usb:%04x/%04x:libudev:%d:%s", idVendor, idProduct,
bInterfaceNumber is the number of the interface on the device. It is only usefull for devices with more than one CCID interface.
devpath is the filename of the device on the file system.
So it is something like:
usb:08e6/3437:libudev:0:/dev/bus/usb/008/047 under GNU/Linux.
If the driver does not understand the
:libudev: scheme or if a new scheme is used, the driver should ignore the part it does not understand instead of failing.
The driver shall recognize the
usb:VID/PID part and, only if possible, the remaining of the DeviceName field.
It is the responsibility of the driver to correctly identify the reader.
- Error codes
- Return values:
Referenced by IFDOpenIFD().