summaryrefslogtreecommitdiff
path: root/README
blob: c495d1124020e26803f36116f292325083878c90 (plain)
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
96
97
98
99
100
101
102
103
104
105
106
107
librfid - low-level RFID access library
(C) 2005-2006 by Harald Welte <laforge@gnumonks.org>
======================================================================

This library intends to provide a reader- and (as much as possible)
PICC / tag independent API for RFID applications.

1. Supported Prodocols:

At this early stage of implementaition, it offers only ISO 14443-2, ISO 14443-3
A and B as well as ISO 14443-4 (T=CL) support.  Other protocols, both open
(such as ISO 15693) and proprietary are to be added as soon as I find some
more time.

2. Supported Readers:

At this time, the Omnikey Cardman 5121 and the OpenPCD readers are supported. 

2.1 Omnikey Cardman 5121 RFID (http://www.omnikey.de/)

The cm5121 is a relatively stupid piece of hardware.  Basically a contact-based
cm3121 that was enhanced by putting a Philips CL RC632 reader ASIC next to it.
There is no RFID protocol implementation on the cm5121, everything is done on
the host (PC) software.  Four primitives (read/write byte/fifo) are provided
via simple PC_to_RDR_Escape CCID messages.

2.2 OpenPCD (http://www.openpcd.org/)

The OpenPCD reader is completely free.  You get the full schematics, the PCB
design, the source code to the device firmware (written in C, to be compiled
with the free GNU toolchain).

Also, it has various headers for access to the intermediate signal processing
steps.

This makes it the ideal device to learn and play with RFID, since you don't
have any (proprietary) software interfere and puts you in full control of
everything.

2.3 Philips Pegoda

This reader is not yet supported.


2.x Further Readers

Support for more devices shouldn't be too difficult to add, provided the
devices are stupid enough.  More sophisticated readers like Integrated
Engineering or Philips Pegoda do much of the protocol handling in firmware on a
Microcontroller.  This makes them (at least till now) faster, but also of
limited use, especially in education and research.

So if you happen to run into any other dumb RFID readers, especially those
based on Philips CL RC622, RC531 and RC632, adding support should be very
straightforward.  If you want to contract me for implementing a driver
backend, don't hesitate to contact me.


3. Building / Installing

In the default configuration, librfid only includes the driver for the OpenPCD
dumbreader firmware.

If you want support for Omnikey Cardman 5121/5321, you have to add
'--enable-reader-cm5x21' to the './configure' comannd, _and_ choose the backend
you want to use, either:

3.1 (new) native CCID backend

If you add the '--enable-ccid' option to the './configure' command, then the new
native CCID driver (courtesy of Werner Koch) will be linked into the library.
This requires a working libusb with development headers.  

In order to use the reader, you will need to set the permissions of the
respective /proc/bus/usb or /sys/bus/usb files (or run the application as
root, if you trust my code, which you shouldn't).

If you run udev, just use the 'etc/udev/librfid.rules' udev rulefile, which should
change the group of the usb device to 'users'.

3.2 (old) OpenCT backend

This backend has the advantage that it will allow you to use the contact-based
part and the contactless part of the CM5121 simultaneously.  However, it requires
a patched version of OpenCT.

A patch against openct-0.6.7 is available as openct-0.6.7-librfid.patch.

Please note that while librfid in this configuration _uses_ OpenCT as a
lower-layer transport interface, it doesn't actually provide a virtual reader
interface to it, i.e. you can't use CT-API/OpenCT/PCSC API's to access RFID
transponders.

In order to use this backend, you need to use the
'--with-openct=/path/to/openct' option.


4. Testing

In the 'utils' directory, you will get a 'librfid-tool' binary.  It is very
minimalistic, and mainly an example on how to use the librfid api. For an ICAO
compliant passport, you may try "--layer2 iso14443a --protocol tcl".  For a
mifare ultralight transponder, "--layer2 iso14443a --protocol
mifare-ultralight" will give you a full dump of the transponder.

-- Harald Welte <laforge@gnumonks.org>

personal git repositories of Harald Welte. Your mileage may vary