hpoj reference: ptal-connect and ptal-print
The ptal-connect command-line utility provides access to the
various stream services on the peripheral. ptal-print is an
alias for ptal-connect that defaults to connecting to the
print service. It is similar to a telnet client, in that
once connected to the service on the peripheral, data on standard input
is sent to the peripheral over the open channel as "forward" data, and
any "reverse" data received from the peripheral over the open channel
is sent to standard output.
Syntax
The syntax of ptal-connect and ptal-print is as follows:
ptal-connect devname action [options...]
ptal-print devname [options...]
Where:
- devname is the PTAL device name
- action specifies the remote service and is one of:
- -print -- the print service (the default for ptal-print)
- -scan -- the scan service
- -socket socketID -- a particular remote socket ID
- -service serviceName -- a particular remote service name
- options... is zero or more of:
- -eoftimeout seconds -- Idle timeout before exiting
after an end-of-file condition is encountered on standard input
- -fwdlen maxForwardDatalen -- Forward data packet size
requested to be negotiated with the peripheral
- -revlen maxReverseDatalen -- Reverse data packet size
requested to be negotiated with the peripheral
Notes
Service name lookup is part of the 1284.4 protocol, and is simulated by
ptal-mlcd and by the JetDirect
firmware for MLC mode. Therefore, you should usually be able to specify
the service name for well-known services. For other services, you may
need to specify both -service for 1284.4 mode and -socket
for MLC mode.
-print, "-service ECHO", and possibly -scan are the
most common peripheral services one would typically want to connect to.
ECHO and -scan are mainly useful for testing and debugging
connectivity.
ptal-mlcd supports several "virtual"
services which do not involve the peripheral in any way.
Most if not all peripherals have a limit of one connection to each service
at any given time. Subsequent connections will fail.
The "datalen" parameters to -fwdlen and -revlen do not
include the 6-byte header inherent in the MLC and 1284.4 protocols. The
requested sizes are not guaranteed to be honored, because the peripheral
is permitted to reduce either or both sizes. For MLC mode, the negotiated
packet sizes for a given service are fixed after the first negotiation,
and subsequent requests are ignored. For 1284.4 mode, different sizes
may be honored each time. Some combinations of sizes may have erroneous
results on some peripherals.
If you're connecting through an HP JetDirect print server (i.e. with a
PTAL device name prefix of hpjd:), then the following limitations
exist:
- -scan, -socket, and -service require a
JetDirect model with multi-function peripheral support:
- Parallel-port JetDirects: 70X, 170X, 300X, or 500X only
- USB JetDirects: 175X and probably later models
- -scan requires firmware x.07.xx or later.
- -socket and -service require firmware x.08.xx or
later.
- For parallel-port JetDirects, -socket and -service
are only supported for peripherals running in 1284.4 (not MLC) mode.
For USB JetDirects, they are supported in both modes.
- A limited number of clients may have -socket and
-service connections to the same peripheral at any given time,
even if they are to different services.
- -fwdlen and -revlen requests are ignored.