ptal-connect [devname] action [options...] ptal-print [devname] [options...]Where:
-print is used by ptal-cups (the PTAL CUPS backend) to pass printer-ready data to the device.
"-service ECHO" is useful for verifying basic device connectivity, because text you send in the forward direction is echoed in the reverse direction. (However, this service may not work properly on the OfficeJet LX and 300 series.)
-scan only connects to the scan service on the device and doesn't in an of itself start a scan operation; use libsane-hpoj for that. It is not recommended to call "ptal-connect -scan" directly, because in certain cases it may make the scan service unusable for subsequent actual scans (due to improper negotiated packet sizes) until the device is power-cycled or ptal-mlcd is restarted.
ptal-mlcd supports several "virtual" services which do not involve the device in any way.
Most if not all devices 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 device is permitted to reduce either or both sizes. For MLC mode, the negotiated packet sizes set a e peripheral, you must:
int ptalPmlRequestGet(ptalPmlObject_t obj,ptalPmlObject_t next);
int ptalPmlGetValue(ptalPmlObject_t obj,int *pType,char *buffer,int maxlen);
int ptalPmlGetStringValue(ptalPmlObject_t obj,int *pSymbolSet,
char *buffer,int maxlen);
int ptalPmlGetIntegerValue(ptalPmlObject_t obj,int *pType,int *pValue);
int ptalPmlDoLastValuesDiffer(ptalPmlObject_t obj);
ptalPmlGetValue() gets the binary value for any type, which
probably is not what you want for any type other than binary. However,
it can be a useful starting point for determine what data type the value
is.ptalPmlGetStringValue() and ptalPmlGetIntegerValue() get string and integer data types, respectively. They succeed even if the actual value has an incompatible data type, but the result may not be meaningful.
ptalPmlDoLastValuesDiffer() returns nonzero if the last two cached values of the PML object differ, for example, between two GETs.
int ptalPmlGetStatus(ptalPmlObject_t obj);ptalPmlGetStatus() returns that PML status code from the last ptalPmlRequestSet() or ptalPm