lptctl.8 revision 1.5
$NetBSD: lptctl.8,v 1.5 2004/01/28 17:54:03 jdolecek Exp $

Copyright (c) 2004 The NetBSD Foundation, Inc.
All rights reserved.

This code is derived from software contributed to The NetBSD Foundation
by Gary Thorpe.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by the NetBSD
Foundation, Inc. and its contributors.
4. Neither the name of The NetBSD Foundation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

.Dd January 28, 2004 .Dt LPTCTL 8 .Os .Sh NAME .Nm lptctl .Nd manipulate lpt devices .Sh SYNOPSIS .Nm lptctl .Ar /dev/device .Oo .Op Ar command arg .Ar ... .Oc .Sh DESCRIPTION .Nm is used to manipulate lpt devices so that a user can change how a printer that is attached to a parallel port works. If no command-argument pairs are specified, the status of the device is printed to standard output using the following format:

p dma=[on|off] mode=[standard|nibble|ps2|fast|ecp|epp] ieee=[yes|no]

p The status information is also output after commands are carried out. .Sh DEVICE COMMANDS Multiple command-argument pairs can be specified up to a maximum of the total number of distinct commands possible. Available commands are: l -item t .Cm dma .Ar on | off

p Enables or disables DMA. t .Cm mode .Ar standard | nibble | ps2 | fast | ecp .Ar | epp

p Sets port to use a mode of operation: standard centronics mode (standard), nibble mode, bidirectional mode (ps2), fast centronics mode (fast), enhanced capabilities port mode (ecp), or enhanced parallel port mode (epp). t .Cm ieee .Ar yes | no

p Enables or disables the use of .Tn IEEE 1284 negotiations during mode changes and channel direction changes. .El .Sh EXIT STATUS .Nm returns 0 on success, \*[Gt]0 on failure. .Sh FILES l -item t

a /dev/lpt? - interrupt-driven printer ports t

a /dev/lpa? - polled printer ports .El .Sh SEE ALSO .Xr ioctl 2 , .Xr lpt 4 , .Xr ppbus 4 .Sh HISTORY A similar utility called .Nm lptcontrol exists in .Fx to control the .Xr lpt 4 device. While similar in concept, the implementations are independent. .Nm was added in .Nx 2.0 . .Sh AUTHORS This man page and the .Nm utility were written by Gary Thorpe. .Sh BUGS .Nm opens the printer device and causes device initialization if

a /dev/lpa? or

a /dev/lpt? are used. Therefore, a printer must be connected and functioning to use this utility or you will have to create a lpt device with an appropriate minor number (see .Xr lpt 4 for more details).