summaryrefslogtreecommitdiffstats
path: root/share/man/man4/cmx.4
blob: 6db6a1d2d18be5d5a03a399d4dfac766eacd415c (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
.\"
.\" $FreeBSD$
.\"
.Dd July 7, 2007
.Dt CMX 4
.Os
.Sh NAME
.Nm cmx
.Nd Omnikey CardMan 4040 smartcard reader device driver
.Sh SYNOPSIS
.Cd device cmx
.Sh DESCRIPTION
The
.Nm
driver provides support for the PCCARD based
.Em Omnikey CardMan 4040
smartcard reader.
The driver provides a character device special file based
.Em Chip/Smart Card Interface Devices (CCID)
interface.  The driver implements what the vendor calls the
.Em Synchronious API
onto the smartcard reader device.
.Pp
Reading and writing is synchronious, meaning that a call to
.Xr write 2
directly corresponds to a complete CCID command sent to the
device, while the following
.Xr read 2
will return the complete answer from the reader.  There is no
support for partial reads or writes.  There is no upper limit on
CCID request or response sizes, but the complete CCID request
must be sent to the driver in
.Xr write 2
and the complete CCID response must fit into the buffer
supplied to
.Xr read 2 .
.Pp
Non-blocking I/O,
.Xr select 2
and
.Xr poll 2
are supported and work as expected.  An open file descriptor
will always be ready for writing, but only ready for reading
if the device indicates that it has data available.
.Sh COMPATIBILITY
Userland smartcard code written for the vendor's Linux drivers
should work with the
.Nm
driver without modification.
.Sh FILES
.Bl -tag -width /usr/ports/security/openct -compact
.It Pa /dev/cmx\fBn\fP
Character device special file.
.It Pa /usr/ports/security/openct
OpenCT, a userspace smartcard daemon containing a
.Em CCID
driver which directly supports
.Nm
devices.
.\".It Pa /usr/ports/devel/pcsc-lite
.\"PC/SC-Lite, a userspace smartcard daemon.
.\".It Pa /usr/ports/devel/libccid
.\"libccid, a generic
.\".Em CCID
.\"driver for use by PC/SC-Lite to interface to
.\".Nm
.\"devices.
.El
.Sh SEE ALSO
.Xr pccard 4
.Sh HISTORY
The
.Nm cmx
driver first appeared in
.Fx 7.1 .
.Sh AUTHORS
.An -nosplit
The
.Nm
driver was written by
.An Daniel Roethlisberger Aq daniel@roe.ch ,
originally based on the Linux driver v1.1.0 by
.An Omnikey GmbH Aq www.omnikey.com .
Early testing and bug fixes by
.An Marcin Cieslak Aq saper@system.pl .
.Sh BUGS
.An -nosplit
The way the
.Nm
driver talks to the CardMan 4040 is a bit rough.  Due to the
complete lack of hardware documentation other than vendor drivers
for other operating systems, the gory details of the device's
I/O registers are not understood very well.  There may be error
conditions which can only be solved by physically reinserting the
reader.
OpenPOWER on IntegriCloud