remove timestamp and then parse dmesg
[librfid] / README
1 librfid - low-level RFID access library
2 (C) 2005-2008 by Harald Welte <laforge@gnumonks.org>
3 ======================================================================
4
5 This library intends to provide a reader and (as much as possible)
6 PICC / tag independent API for RFID applications.
7
8 1. Supported Protocols:
9
10 At this stage of implementation, it offers only ISO 14443-2, ISO 14443-3 A and
11 B as well as ISO 14443-4 (T=CL) support.  ISO15693 is only partiall
12 implemented. Other protocols are to be added as soon as I find some more time.
13
14 2. Supported Readers:
15
16 At this time, the Omnikey Cardman 5121/5321 and the OpenPCD readers are supported. 
17
18 2.1 Omnikey Cardman 5121/5321 RFID (http://www.omnikey.de/)
19
20 The cm5121 is a relatively stupid piece of hardware.  Basically a contact-based
21 cm3121 that was enhanced by putting a Philips CL RC632 reader ASIC next to it.
22 There is no RFID protocol implementation on the cm5121, everything is done on
23 the host (PC) software.  Four primitives (read/write byte/fifo) are provided
24 via simple PC_to_RDR_Escape CCID messages.
25
26 The cm5321 seems to be an improved version of the 5121, mainly with different
27 antenna geometrics for better communications reliability.
28
29 2.2 OpenPCD (http://www.openpcd.org/)
30
31 The OpenPCD reader is completely free.  You get the full schematics, the PCB
32 design, and the source code to the device firmware (written in C, to be
33 compiled with the free GNU toolchain).  Also, all required development tools
34 are available under Free Software licenses!
35
36 In addition, it has various headers for access to the intermediate signal
37 processing steps.
38
39 This makes it the ideal device to learn and play with RFID, since you don't
40 have any (proprietary) software interfere and puts you in full control of
41 everything.
42
43 This is now the primary development target for librfid.  However, this doesn't
44 mean that we don't want to support as many readers as possible.
45
46 Another interesting new option is to cross-compile librfid to fit it _inside_
47 the OpenPCD firmware, enabling a fully autonomous RFID stack (and RFID
48 applications) on the reader, without any requirement for a host PC!
49
50 2.3 Philips Pegoda
51
52 This reader is not yet supported.  Some initial experiments have shown that
53 adding support for it is feasible.
54
55 2.4 spidev RC632
56
57 This is not actually a specific reader, but a generic implementation of a 
58 CL RC632 based redaer attached to a SPI bus supported by the standard Linux
59 SPI kernel driver architecture and it's spidev userspace interface.
60
61 If you want to build this reader driver, use the '--enable-spidev' option
62 to the './configure' command.
63
64 2.x Further Readers
65
66 Support for more devices shouldn't be too difficult to add, provided the
67 devices are stupid enough.  More sophisticated readers like Integrated
68 Engineering or Philips Pegoda do much of the protocol handling in firmware on a
69 microcontroller.  This makes them (at least till now) faster, but also of
70 limited use, especially in education and research.
71
72 So if you happen to run into any other dumb RFID readers, especially those
73 based on Philips CL RC622, RC531 and RC632, adding support should be very
74 straightforward.  If you want to contract me for implementing a driver
75 backend, don't hesitate to contact me.
76
77
78 3. Building / Installing
79
80 In the default configuration, librfid only includes the driver for the OpenPCD
81 dumbreader firmware.
82
83 If you want support for Omnikey Cardman 5121/5321, you have to choose the
84 backend you want to use, either:
85
86 3.1 (new) native CCID backend
87
88 If you add the '--enable-ccid' option to the './configure' command, then the new
89 native CCID driver (courtesy of Werner Koch) will be linked into the library.
90 This requires a working libusb with development headers.  
91
92 In order to use the reader, you will need to set the permissions of the
93 respective /proc/bus/usb or /sys/bus/usb files (or run the application as
94 root, if you trust my code, which you shouldn't).
95
96 If you run udev, just use the 'etc/udev/librfid.rules' udev rulefile, which should
97 change the group of the usb device to 'users'.
98
99 3.2 (old) OpenCT backend
100
101 This backend has the advantage that it will allow you to use the contact-based
102 part and the contactless part of the CM5121 simultaneously.  
103
104 Please note that while librfid in this configuration _uses_ OpenCT as a
105 lower-layer transport interface, it doesn't actually provide a virtual reader
106 interface to it, i.e. you can't use CT-API/OpenCT/PCSC API's to access RFID
107 transponders.
108
109 In order to use this backend, you need to use the
110 '--enable-openct' option and - if it is not installed in a default
111 location like /usr or /usr/local - set the environment variables
112 PATH, LD_LIBRARY_PATH and PKG_CONFIG_PATH so all files are found.
113
114
115 4. Testing
116
117 In the 'utils' directory, you will get a 'librfid-tool' binary.  It is very
118 minimalist, and mainly an example on how to use the librfid API. For an ICAO
119 compliant passport, you may try "--layer2 iso14443a --protocol tcl".  For a
120 mifare ultralight transponder, "--layer2 iso14443a --protocol
121 mifare-ultralight" will give you a full dump of the transponder.
122
123 The most basic command to get started is "librfid-tool --scan" to make it
124 auto-detect the first available (and supported) transponder
125
126
127 5. Help and Support
128
129 If you run into any problems using librfid, the primary contact address is the
130 mailinglist of librfid developers at librfid-devel@lists.gnumonks.org.  Please
131 note that while the development community is trying to provide the best level
132 of support, response times might vary.
133
134 You can subscribe to this list at 
135         https://lists.gnumonks.org/mailman/listinfo/librfid-devel
136
137 If you are interested in commercial grade support of librfid, feel free to
138 contact me privately to discuss your requirements and provide you with a quote.
139
140 6. Licensing
141
142 Pleas read the file LICENSING.
143
144 -- Harald Welte <laforge@gnumonks.org>
145