[cups.general] ipp/port#, how does one determine # without actually printing?
Kurt Pfeifle
kpfeifle at danka.de
Fri Jul 28 09:55:21 PDT 2006
wtautz <wtautz at cs.uwaterloo.ca> wrote (Friday 28 July 2006 17:07):
>> However, that one HP 4000 I found nearby did not support IPP at
>> all:
>>
>> ./ipptest -v ipp://10.162.4.65:631/ipp get-printer-attributes.test
>> Unable to connect to 10.162.4.65 on port 631 - Connection refused
>>
>>
> Perhaps it has to be turned on.
I know. But that's a different issue. :-)
The point I was trying to make was that "ipptest" can be used to
query IPP printers about their supported attributes & get a fairly
reliable feedback about their supported device URIs. And if they
refuse connection, their IPP support is disabled or non-existent
altogether :-)
> I have found foomatic-getpjloptions
> pretty handy
> for determining printer capabilities
PJL options don't tell you about IPP support.
> albeit looking at the output I
> don't see anything
> about enabled protocols.
Right.
> Nmap helps.
No. If you mean to test if port 631 is open... it won't be open if
the printer has its IPP support disbled by the admin.
You could use nmap to poke a printer and probe ports like 515, 631
and 9100 (and even some more -- some vendors put their AppSocket
support behind other ports than 9100) to see if they are open; but
it will only be a first indication.
If port 631 is open, suggesting IPP is supported, you still do not
know the "printer-uri-supported" attribute.
> Of course one can connect via web
> browser.
> Perhaps the tests you mention are independent of it being enabled.
No. For the test to succeed, IPP needs to be enabled. But *if* it
is enabled, it will tell you the "printer-uri-supported" attribute.
Otherwise you'd know you found a bug, either in the printer's IPP
implementation, or in CUPS and/or the ipptest utility with the *.test
file you was running.
See this example. It shows you that you could even use "http://..."
(and port 80) to print to this device, and it shows you that it is
not necessarily that there is an "/ipp/port#" template to be used
for the printer-uri attribute, some vendors do simply use "/ipp":
./ipptest -v ipp://10.162.2.94:631/ipp get-printer-attributes.test
------------------------------------------------------------------
"get-printer-attributes.test":
Get-Printer-Attributes:
attributes-charset (charset) = "utf-8"
attributes-natural-language (language) = "en"
printer-uri (uri) = "ipp://10.162.2.94:631/ipp"
Get printer attributes using get-printer-attributes [FAIL]
RECEIVED: 889 bytes in response
status-code = 0000 (successful-ok)
EXPECTED: printer-info
EXPECTED: printer-more-info
EXPECTED: printer-state-reasons
attributes-charset (charset) = "utf-8"
attributes-natural-language (language) = "en"
printer-uri-supported (uri) = "http://10.162.2.94/ipp" "ipp://10.162.2.94/ipp"
uri-security-supported (keyword) = "none" "none"
uri-authentication-supported (keyword) = "none" "none"
printer-name (namelang) = "IS_1050",de
printer-location (textlang) = "",de
printer-make-and-model (textlang) = "Canon iR5000-6000",de
printer-state (enum) = 3
ipp-versions-supported (keyword) = "1.0" "1.1"
operations-supported (enum) = 2 10 8 9 11 4
charset-configured (charset) = "utf-8"
charset-supported (charset) = "utf-8"
natural-language-configured (language) = "de"
generated-natural-language-supported (language) = "de"
document-format-default (mimetype) = "application/octet-stream"
document-format-supported (mimetype) = "application/octet-stream" "application/vnd.hp-PCL"
printer-is-accepting-jobs (boolean) = true
queued-job-count (integer) = 0
pdl-override-supported (keyword) = "not-attempted"
printer-up-time (integer) = 539641
compression-supported (keyword) = "none"
The ipptest utility uses a *.test file as parameter, which specifies
the set of actual IPP queries or operations to run against a given IPP
URI. You can write your own *.test file(s) as well. They are also
very useful and enlightening to run against various CUPS server
"locations". Some *.test files in CUPS source "test" subdirectory are:
*.test file name # run against this CUPS URI paths
---------------------------------------------------------------
create-job-sheets.test # /printers/my_printername
create-job.test # /printers/my_printername
get-printer-attributes.test # /printers/my_printername
print-job.test # /printers/my_printername
get-job-attributes.test # /jobs/1234
get-jobs.test # /jobs
get-devices.test # /
get-ppds.test # /
get-printers.test # /
get-printer-attributes.test (some other tests as well, depending on
how compliant their IPP implementation is) you can also run against
an IPP device, not just against a CUPS server...
Cheers,
Kurt
More information about the cups
mailing list