1c4bf625eSHasso Tepper.\" 2c4bf625eSHasso Tepper.\" Copyright (c) 2006-2007 Daniel Roethlisberger <daniel@roe.ch> 3c4bf625eSHasso Tepper.\" All rights reserved. 4c4bf625eSHasso Tepper.\" 5c4bf625eSHasso Tepper.\" Redistribution and use in source and binary forms, with or without 6c4bf625eSHasso Tepper.\" modification, are permitted provided that the following conditions 7c4bf625eSHasso Tepper.\" are met: 8c4bf625eSHasso Tepper.\" 1. Redistributions of source code must retain the above copyright 9c4bf625eSHasso Tepper.\" notice unmodified, this list of conditions, and the following 10c4bf625eSHasso Tepper.\" disclaimer. 11c4bf625eSHasso Tepper.\" 2. Redistributions in binary form must reproduce the above copyright 12c4bf625eSHasso Tepper.\" notice, this list of conditions and the following disclaimer in the 13c4bf625eSHasso Tepper.\" documentation and/or other materials provided with the distribution. 14c4bf625eSHasso Tepper.\" 15c4bf625eSHasso Tepper.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16c4bf625eSHasso Tepper.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17c4bf625eSHasso Tepper.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18c4bf625eSHasso Tepper.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19c4bf625eSHasso Tepper.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20c4bf625eSHasso Tepper.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21c4bf625eSHasso Tepper.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22c4bf625eSHasso Tepper.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23c4bf625eSHasso Tepper.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24c4bf625eSHasso Tepper.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25c4bf625eSHasso Tepper.\" SUCH DAMAGE. 26c4bf625eSHasso Tepper.\" 27c4bf625eSHasso Tepper.\" $FreeBSD: src/share/man/man4/cmx.4,v 1.2 2008/03/06 08:47:16 rink Exp $ 28c4bf625eSHasso Tepper.\" 29c4bf625eSHasso Tepper.Dd July 7, 2007 30c4bf625eSHasso Tepper.Dt CMX 4 31c4bf625eSHasso Tepper.Os 32c4bf625eSHasso Tepper.Sh NAME 33c4bf625eSHasso Tepper.Nm cmx 34c4bf625eSHasso Tepper.Nd Omnikey CardMan 4040 smartcard reader device driver 35c4bf625eSHasso Tepper.Sh SYNOPSIS 36c4bf625eSHasso Tepper.Cd device cmx 37c4bf625eSHasso Tepper.Sh DESCRIPTION 38c4bf625eSHasso TepperThe 39c4bf625eSHasso Tepper.Nm 40c4bf625eSHasso Tepperdriver provides support for the PCCARD based 41c4bf625eSHasso Tepper.Em Omnikey CardMan 4040 42c4bf625eSHasso Teppersmartcard reader. 43c4bf625eSHasso TepperThe driver provides a character device special file based 44c4bf625eSHasso Tepper.Em Chip/Smart Card Interface Devices (CCID) 45c4bf625eSHasso Tepperinterface. The driver implements what the vendor calls the 46c4bf625eSHasso Tepper.Em Synchronious API 47c4bf625eSHasso Tepperonto the smartcard reader device. 48c4bf625eSHasso Tepper.Pp 49c4bf625eSHasso TepperReading and writing is synchronious, meaning that a call to 50c4bf625eSHasso Tepper.Xr write 2 51c4bf625eSHasso Tepperdirectly corresponds to a complete CCID command sent to the 52c4bf625eSHasso Tepperdevice, while the following 53c4bf625eSHasso Tepper.Xr read 2 54c4bf625eSHasso Tepperwill return the complete answer from the reader. There is no 55c4bf625eSHasso Teppersupport for partial reads or writes. There is no upper limit on 56c4bf625eSHasso TepperCCID request or response sizes, but the complete CCID request 57c4bf625eSHasso Teppermust be sent to the driver in 58c4bf625eSHasso Tepper.Xr write 2 59c4bf625eSHasso Tepperand the complete CCID response must fit into the buffer 60c4bf625eSHasso Teppersupplied to 61c4bf625eSHasso Tepper.Xr read 2 . 62c4bf625eSHasso Tepper.Pp 63c4bf625eSHasso TepperNon-blocking I/O, 64c4bf625eSHasso Tepper.Xr select 2 65c4bf625eSHasso Tepperand 66c4bf625eSHasso Tepper.Xr poll 2 67c4bf625eSHasso Tepperare supported and work as expected. An open file descriptor 68c4bf625eSHasso Tepperwill always be ready for writing, but only ready for reading 69c4bf625eSHasso Tepperif the device indicates that it has data available. 70c4bf625eSHasso Tepper.Sh FILES 71c4bf625eSHasso Tepper.Bl -tag -width /dev/cmxn -compact 72c4bf625eSHasso Tepper.It Pa /dev/cmx\fBn\fP 73c4bf625eSHasso TepperCharacter device special file. 74c4bf625eSHasso Tepper.\".It Pa /usr/ports/security/openct 75c4bf625eSHasso Tepper.\"OpenCT, a userspace smartcard daemon containing a 76c4bf625eSHasso Tepper.\".Em CCID 77c4bf625eSHasso Tepper.\"driver which directly supports 78c4bf625eSHasso Tepper.\".Nm 79c4bf625eSHasso Tepper.\"devices. 80c4bf625eSHasso Tepper.\".It Pa /usr/ports/devel/pcsc-lite 81c4bf625eSHasso Tepper.\"PC/SC-Lite, a userspace smartcard daemon. 82c4bf625eSHasso Tepper.\".It Pa /usr/ports/devel/libccid 83c4bf625eSHasso Tepper.\"libccid, a generic 84c4bf625eSHasso Tepper.\".Em CCID 85c4bf625eSHasso Tepper.\"driver for use by PC/SC-Lite to interface to 86c4bf625eSHasso Tepper.\".Nm 87c4bf625eSHasso Tepper.\"devices. 88c4bf625eSHasso Tepper.El 89a68e0df0SSascha Wildner.Sh COMPATIBILITY 90a68e0df0SSascha WildnerUserland smartcard code written for the vendor's Linux drivers 91a68e0df0SSascha Wildnershould work with the 92a68e0df0SSascha Wildner.Nm 93a68e0df0SSascha Wildnerdriver without modification. 94c4bf625eSHasso Tepper.Sh SEE ALSO 95c4bf625eSHasso Tepper.Xr pccard 4 96c4bf625eSHasso Tepper.Sh HISTORY 97c4bf625eSHasso TepperThe 9865a99157SSascha Wildner.Nm 99c4bf625eSHasso Tepperdriver first appeared in 100c4bf625eSHasso Tepper.Fx 7.1 101c4bf625eSHasso Tepperand was imported into 102c4bf625eSHasso Tepper.Dx 1.13 . 103c4bf625eSHasso Tepper.Sh AUTHORS 104c4bf625eSHasso Tepper.An -nosplit 105c4bf625eSHasso TepperThe 106c4bf625eSHasso Tepper.Nm 107c4bf625eSHasso Tepperdriver was written by 108*b2a6f486SFranco Fichtner.An Daniel Roethlisberger Aq Mt daniel@roe.ch , 109c4bf625eSHasso Tepperoriginally based on the Linux driver v1.1.0 by 110*b2a6f486SFranco FichtnerOmnikey GmbH, 111*b2a6f486SFranco Fichtner.Pa www.omnikey.com . 112c4bf625eSHasso TepperEarly testing and bug fixes by 113*b2a6f486SFranco Fichtner.An Marcin Cieslak Aq Mt saper@system.pl . 114c4bf625eSHasso Tepper.Sh BUGS 115c4bf625eSHasso TepperThe way the 116c4bf625eSHasso Tepper.Nm 117c4bf625eSHasso Tepperdriver talks to the CardMan 4040 is a bit rough. Due to the 118c4bf625eSHasso Teppercomplete lack of hardware documentation other than vendor drivers 119c4bf625eSHasso Tepperfor other operating systems, the gory details of the device's 120c4bf625eSHasso TepperI/O registers are not understood very well. There may be error 121c4bf625eSHasso Tepperconditions which can only be solved by physically reinserting the 122c4bf625eSHasso Tepperreader. 123