-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
95 lines (63 loc) · 2.42 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
IFDHandler for the I2C-attached secure elements
===============================================
This library contains an IFD handler for PCSC lite [1], which allows
to access I2C-attached secure elements via the PCSC lite daemon.
The library currently supports the following I2C protocols:
* "kerkey": used by ST Kerkey or STSAFE-J100
* "se05x": used by ST SE05x (UM11225)
The low level interaction with the I2C bus master and an
optional reset GPIO supports the following APIs:
* I2C "kernel": access via /dev/i2c-N (see [2])
* GPIO "kernel": access via /dev/gpiochipN (see [3])
* GPIO "sysfs": access via /sys/class/gpio/ (see [4])
Building
========
To build the library simply use this command:
make
Cross-compilation is supported by setting the CROSS_COMPILE environment
variable.
Installation
============
To install the library you can copy the built library to a location
of your choice. E.g.:
sudo cp src/libifdse.so /usr/local/pcsc/drivers/i2c/libifdse.so
Integration and configuration
=============================
The integration of the IFDHandler library in PCSC lite
can be achieved by storing configuration files in
the reader configuration directory
(typically /etc/reader.conf.d).
Details about the PCSC lite configuration file
syntax can be found in the corresponding man page
(man 5 reader.conf).
Besides the PCSC lite integration, the configuration
file also provides parameters to libifdse, that
set the communication properties (I2C and GPIO settings).
Details about the libifdse specific configuration
can be found in the file libifdse.
A good approach is to copy that into
/etc/reader.conf.d/ and edit as needed:
sudo cp libifdse /etc/reader.conf.d/
After changing the configuration file a restart
of PCSC lite is required:
sudo systemctl restart pcscd
Debugging
=========
In case of issues the following commands can help
to isolate the problem.
Checking the status of PCSC lite:
systemctl status pcscd
To start PCSC lite manually on the command line:
systemctl stop pcscd.socket
systemctl stop pcscd
pcscd -d -f
Checking if the reader has been found:
pcsc_scan
Checking logs (continuously):
journalctl -f
Configuration
=============
[1] https://pcsclite.alioth.debian.org/
[2] https://www.kernel.org/doc/Documentation/i2c/dev-interface
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/gpio.h
[4] https://www.kernel.org/doc/Documentation/gpio/sysfs.txt