Initial commit
[platform/upstream/ccid.git] / INSTALL
1 INSTALLATION PROCEDURE
2 ======================
3
4 Installation from source:
5 """""""""""""""""""""""""
6
7 get the ccid-x.y.z.tar.gz archive and do:
8
9 $ tar xzvf ccid-x.y.z.tar.gz
10 $ cd ccid-x.y.z
11 $ ./configure
12 $ make
13 $ sudo make install
14
15 By default pcscd and my ccid driver use /usr/local/pcsc/drivers/ as
16 directory for hotplug drivers. The ./configure script try to get the
17 directory used by pcscd using 'pkg-config libpcsclite --variable=usbdropdir'
18 So you should not have to use the --enable-usbdropdir=DIR argument.
19
20
21 libusb not found
22 ~~~~~~~~~~~~~~~~
23
24 If the ./configure script says something like:
25   configure: error: usb.h not found, use --enable-libusb=PATH
26 You should use --enable-libusb=PATH to tell ./configure where to find
27 the usb.h and libusb.so files. The ./configure script will use
28 PATH/include/ to search for usb.h and PATH/lib/ to search for libusb.so
29
30
31 building serial reader driver
32 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33
34 A serial CCID reader can also be connected on a serial port. By default
35 the serial driver is not built. You must explicitely do:
36
37 $ ./configure --enable-twinserial
38 $ make
39 # make install
40
41
42 builing serial reader driver only
43 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
44
45 It is possible to generate the driver for the GemPC Twin using serial
46 communication only (for example on an embedded system without USB).
47 Just do:
48 $ ./configure --enable-twinserial --disable-libusb
49 $ make
50 # make install
51
52 By default ./configure try to get the directory used by pcscd using
53 'pkg-config libpcsclite --variable=usbdropdir' and add '/serial'.
54 You should not have to use --enable-ccidtwindir=DIR to specify the
55 target directory to use. 
56
57
58 configuring the driver for the serial reader
59 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60
61 You have to create or edit the file /etc/reader.conf. The file should
62 contain something like:
63
64 # Gemalto reader with serial communication
65 #  - n is the serial port to use n in [0..3]
66 #  - reader is the reader name. It is needed for multi-slot readers.
67 #    Possible reader values are: 
68 #     GemCorePOSPro
69 #     GemCoreSIMPro
70 #     GemCoreSIMPro2
71 #     GemPCPinPad
72 #     GemPCTwin (default value)
73 # example: /dev/ttyS0:GemPCPinPad
74 #DEVICENAME        /dev/ttySn[:reader]
75 #FRIENDLYNAME      "GemPCTwin serial"
76 #LIBPATH           /usr/lib/pcsc/drivers/serial/libccidtwin.so
77
78 FRIENDLYNAME      "GemPC Twin serial"
79 DEVICENAME        /dev/ttyS0
80 LIBPATH           /usr/lib/pcsc/drivers/serial/libccidtwin.so
81
82 You will have to adapt the library path to your configuration.
83
84 By default the GemPC Twin serial reader parameters are loaded by the
85 driver, if you use a GemPC PinPad, a GemCore POS Pro, a GemCore SIM
86 Pro or GemCore SIM Pro 2 (or IDBridge CR30) you have to indicate it in the
87 DEVICENAME field. Supported values are:
88 - GemCorePOSPro for GemCore POS Pro
89 - GemCoreSIMPro for GemCore SIM Pro
90 - GemCoreSIMPro2 for IDBridge CR30
91 - GemPCPinPad for GemPC PinPad
92 - GemPCTwin for GemPC Twin (default value)
93
94 You will then have something like:
95 DEVICENAME /dev/ttyS0:GemPCPinPad
96
97 /dev/ttyS0 (DEVICENAME field) is the first serial port under Linux
98 (known as COM1 under DOS/Windows). Of course if your reader is connected
99 to another serial port you have to adapt that.
100
101
102 Binary installation:
103 """"""""""""""""""""
104
105 Contact your distribution support.
106
107
108 Test procedure:
109 """""""""""""""
110
111 - check the reader is supported by the driver.
112   Get your reader USB identification using the lsusb(1) command:
113   $ lsusb
114   [...]
115   Bus 001 Device 048: ID 08e6:4433 Gemplus
116
117   Look for 08E6 (ifdVendorID) and 4433 (ifdProductID) in
118   /usr/local/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist
119   Of course your numbers will be different.
120
121   If you can't find them add them (if you know what you do) and/or mail me.
122
123 - (re)start pcscd with debug on stdout. Simply do 'pcscd --debug stdout'
124   (you will need to have root priviledges). And look for:
125   [...]
126   readerfactory.c:1319 RFInitializeReader: Attempting startup of ReaderName
127   readerfactory.c:1061 RFBindFunctions: Loading IFD Handler 2.0
128   ifdhandler.c:76 Entering IFDHCreateChannel (lun: 0)
129   ccid_usb.c:131 Manufacturer: Ludovic Rousseau (ludovic.rousseau@free.fr)
130   ccid_usb.c:139 ProductString: Generic CCID reader v0.1.0
131   ccid_usb.c:143 Copyright: This driver is protected by terms of the GNU General Public License version 2, or (at your option) any later version.
132   ccid_usb.c:223 Found Vendor/Product: 08E6/4433 (GemPC433 SL)
133   ccid_usb.c:224 Using USB bus/device: 001/047
134
135   If you don't see this the driver is not installed correctly or your
136   reader is not yet supported. Read https://ccid.apdu.fr/#CCID_compliant
137   to know what to do.