Setting up basic device connectivity
This file documents the procedure to set up basic device connectivity
(low-level communication) with the HP OfficeJet Linux driver (hpoj)
software, whether you're setting up the hpoj software for the first
time, upgrading from an older version, or adding a new device later.
In case of difficulty
If something goes wrong with these instructions, then refer to the separate
connectivity details and
troubleshooting document for more information.
Adding or removing devices
Connect and power on your device if you haven't already.
Log in as root and enter the command
"ptal-init setup".
This setup wizard is now used to set up hpoj-managed devices with all
supported connection types (parallel, USB, and JetDirect).
It asks you a few questions and guides you through the following steps:
- Deleting one or more devices that are already set up (possibly to
re-probe it in a later step)
- Probing for and setting up parallel-connected devices
- Probing for and setting up USB-connected devices
- Setting up JetDirect-connected devices
- Setting the default device
(only if more than one device is defined or a default device is already set)
Starting and stopping the hpoj driver
At any time as root, you may invoke the commands
"ptal-init start" and
"ptal-init stop" to start and stop
the hpoj daemons for the devices that have been previously set up using
"ptal-init setup".
Testing basic device connectivity
Here are some simple tests you can run to be sure you have basic connectivity
to the device, before you proceed to subsequent tasks such as setting up
printing,
scanning, or
photo-card access,
all of which depend on having a working I/O path to the device.
In the following examples, you may provide the optional
[devname] parameter to
specify the PTAL device name of the
desired device. (In general, square brackets indicate an optional
parameter and should not actually be typed.) If you omit it, then an
already configured device is arbitrarily picked. If you have set up
more than one device, then you should use
"ptal-init setup" as described
above to set the default device.
- ptal-devid [devname]
Displays the device ID string. For example, here is the device ID string
from an OfficeJet K80, with line breaks added between fields for clarity:
MFG:Hewlett-Packard;
MDL:OfficeJet K80;
CMD:MLC,PCL,PML;
CLASS:PRINTER;
DESCRIPTION:Hewlett-Packard OfficeJet K Series;
1284.3M:f7f,f7f;
1284.4DL:4d,4e,1;
SERN:000000000010;
VSTATUS:$HB0$NC0,ff,DN,IDLE,CUT,K0,C0,SM,NR,KP085,CP080;
AiO:0;
DW-PCL;
- ptal-print [devname] </dev/null
Tests ability to connect to the device's print service. If this fails and
you're connected via USB, then verify that hpoj
was built with libusb
support.
- ptal-hp [devname] device
Displays additional information about the device.
Note that some or all of the fields may be unsupported
on your model, in which case "(unavailable)" is displayed.
- ptal-hp [devname] clock
Displays the device clock, if your model is so equipped. In addition,
you may specify the -set switch to synchronize the device clock
with the PC clock. The -mmddyy, -ddmmyy, -yymmdd,
-12hour, and -24hour switches may be used to change the
device's date/time display format.
- ptal-hp [devname] display
xojpanel [devname] &
Displays the contents of the device's LCD (liquid crystal display), either
once on the command line (in the case of
"ptal-hp display") or in
more-or-less real time in a separate window (in the case of
xojpanel,
which requires the QT GUI toolkit library).
Note that some models do not support this feature; see the xojpanel
column on the
Supported devices page for more information.
- ptal-connect [devname] -service ECHO
Attempts to connect to the device's echo service. Each line you enter
should be echoed back to you. Press Control-C or Control-D to exit.
Optional: Reboot to make sure everything still works
As described in the main and
troubleshooting documents for
compiling and installing the software, you should ensure that the
ptal-init script is set up to start
when your computer boots, and most importantly, to start before
your print spooler.
If you'd like to verify that this is set up correctly before proceeding
to the next steps, then reboot your computer now. Watch the startup
messages very carefully for a message about starting
ptal-init or "the HP OfficeJet
Linux driver", and make sure it happens before your print
spooler is started.
Caution: If ptal-init does
not start before the print spooler, then you may experience problems
setting up printing (if using
CUPS), or
subsequent reboots may hang after you set up print queues (if using
LPRng). You should fix this
if possible, before proceeding to set up
printing.
After your system has come back up, you may also want to re-run the
connectivity tests suggested above, in order to verify that everything
still works after a reboot.
In case of difficulty
If something goes wrong with these instructions, then refer to the separate
connectivity details and
troubleshooting document for more information.
Next steps
Now you're ready to set up printing,
scanning, and/or
photo-card access (depending on your model),
or return to the index.