This driver is used for the Bull TLP3 serial smart card reader. Do not confuse this Plug and Play smart card reader with the Bull CP8 smart card reader which looks pretty much the same.
To build the bulltlp3.vxd driver simply select either the checked or free DDK environment, change to the directory bulltlp3 and type build. This driver uses services provided by the smart card driver library (smclib.vxd), which are explained in detail in the accompanied documentation.
To install the driver, simply plug the reader into a serial port, start the device manager (right click on ‘My Computer’, select ‘Properties’, select the ‘Hardware’ tab) and click on ‘Refresh’. The ‘Found new hardware’ wizard will pop up and you need to provide the inf-file (on a floppy) and the driver file, which will then be copied to your system directory. The driver will then be started automatically. To stop the driver, you can either unplug the reader or select the taskbar icon to stop the driver. Note: Unlike PCMCIA, the serial port was never designed for hot-plugging, so don’t expect the driver to unload automatically. You need to ‘Refresh’ in ‘Device Manager’, which will trigger unload of the device. You will also see a message that the device has been stopped. Also, the driver will not unload as long as you have ifdtest.exe running and connected to the driver.
Microsoft offers a test tool (ifdtest.exe), which allows you to directly use a smart card reader from the command line. Normally, the smart card resource manager is connected to a reader. In order to use ifdtest.exe, you must ‘kill’ the smart card resource manager (scardsvr.exe)..
Ifdtest.exe can be downloaded from
http://www.microsoft.com/hwtest (follow the links for smart cards). In order to get YOUR smart card reader logo’ed, you need to order special test smart cards. Information on how to obtain test smart cards can also be found on the above web page.
ISO 7816 part 3 describes smart cards and smart card protocols in detail. Also, please, refer to the PC99 handbook for smart card reader requirements.
The document ‘Plug and Play External COM Device Specification’ describes the requirements for serial device Plug and Play and can be downloaded from
http://www.microsoft.com/hwdev/respec/pnpspecs.htm
Files Description BULLTLP3.HTM The Sample Tour documentation for this sample (this file). SOURCES The generic file for building the code sample. MAKEFILE Makefile required to build the driver BULLTLP3.INF The INF file for installing the code sample. TLP3SCR.C The main source file TLP3CB.C Source file containing the callback functions for the smart card library BULLSCR.H Data definitions for the driver
The major topics covered in this tour are:
T=1 data transfers
The Bull TLP3 reader does not have firmware that handles the low-level protocols. The T=0 and T=1 protocols are implemented in software. The T=0 implementation is done in the driver, the T=1 protocol is implemented in the smart card library. It is very important for the driver not to make ‘own decisions’ about whether to cancel an unsuccessful data transfer or not. It should only be the smart card library (which implements the functions SmartcardT1Request(), SmartcardT1Reply()) that decides when to abort a transmission. Even if the driver does not receive any data from a smart card at all, the driver must pass this ‘result’ to the smart card library. Please, take a closer look at TLP3Transmit()
Plug and Play
Unlike the PCMCIA bus, the serial port was never designed for hot-plugging and device detection. This means, you can certainly plug or unplug a device while the system is running, but there is no real hardware support for detection of a device. But there is software support that implements serial device detection and it can be used in the following way:
Click ‘Refresh’ in the device manager as described previously.
This method makes use of a filter driver that implements serial Plug and Play. This filter driver ‘watches’ the serial port. But it has to do this actively by changing the control lines according to the serial Plug and Play specifications mentioned above.
This method does not support device removal detection. Once the driver opens a connection to a serial port, it ‘owns’ the port and therefor the serial enumerator can’t do device removal monitoring, because it would interfere with the smart card driver. This means that the smart card driver needs to do the work.
© 1998 Microsoft Corporation