Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #247046 > unrolled thread

CUPS - how to match autodetected printers to physical ones

Started byGreg Wooledge <greg@wooledge.org>
First post2022-04-08 18:20 +0200
Last post2022-04-08 21:30 +0200
Articles 20 on this page of 75 — 12 participants

Back to article view | Back to linux.debian.user


Contents

  CUPS - how to match autodetected printers to physical ones Greg Wooledge <greg@wooledge.org> - 2022-04-08 18:20 +0200
    Re: CUPS - how to match autodetected printers to physical ones Tixy <tixy@yxit.co.uk> - 2022-04-08 19:00 +0200
      Re: CUPS - how to match autodetected printers to physical ones Tixy <tixy@yxit.co.uk> - 2022-04-08 19:10 +0200
        Re: CUPS - how to match autodetected printers to physical ones Greg Wooledge <greg@wooledge.org> - 2022-04-08 19:30 +0200
          Re: CUPS - how to match autodetected printers to physical ones didier gaumet <didier.gaumet@gmail.com> - 2022-04-08 20:30 +0200
            Re: CUPS - how to match autodetected printers to physical ones Brian <ad44@cityscape.co.uk> - 2022-04-08 21:30 +0200
              Re: CUPS - how to match autodetected printers to physical ones Greg Wooledge <greg@wooledge.org> - 2022-04-08 22:10 +0200
              Re: CUPS - how to match autodetected printers to physical ones Stefan Monnier <monnier@iro.umontreal.ca> - 2022-04-08 23:10 +0200
            Re: CUPS - how to match autodetected printers to physical ones Greg Wooledge <greg@wooledge.org> - 2022-04-08 21:40 +0200
              Re: CUPS - how to match autodetected printers to physical ones David Wright <deblis@lionunicorn.co.uk> - 2022-04-08 21:40 +0200
          Re: CUPS - how to match autodetected printers to physical ones Fred <fred@blakemfg.com> - 2022-04-08 21:40 +0200
          Re: CUPS - how to match autodetected printers to physical ones Brian <ad44@cityscape.co.uk> - 2022-04-09 17:40 +0200
          Re: CUPS - how to match autodetected printers to physical ones Brian <ad44@cityscape.co.uk> - 2022-04-10 14:50 +0200
            Re: CUPS - how to match autodetected printers to physical ones gene heskett <gheskett@shentel.net> - 2022-04-10 15:30 +0200
              Re: CUPS - how to match autodetected printers to physical ones Brian <ad44@cityscape.co.uk> - 2022-04-10 16:00 +0200
                Re: CUPS - how to match autodetected printers to physical ones The Wanderer <wanderer@fastmail.fm> - 2022-04-10 16:10 +0200
                  Re: CUPS - how to match autodetected printers to physical ones Brian <ad44@cityscape.co.uk> - 2022-04-10 16:40 +0200
                Re: CUPS - how to match autodetected printers to physical ones gene heskett <gheskett@shentel.net> - 2022-04-10 23:00 +0200
            Re: CUPS - how to match autodetected printers to physical ones <tomas@tuxteam.de> - 2022-04-10 15:50 +0200
              Re: CUPS - how to match autodetected printers to physical ones Brian <ad44@cityscape.co.uk> - 2022-04-10 19:50 +0200
                Re: CUPS - how to match autodetected printers to physical ones <tomas@tuxteam.de> - 2022-04-10 20:40 +0200
                  Re: CUPS - how to match autodetected printers to physical ones <tomas@tuxteam.de> - 2022-04-10 21:30 +0200
                    Re: CUPS - how to match autodetected printers to physical ones Brian <ad44@cityscape.co.uk> - 2022-04-10 21:50 +0200
                  Re: CUPS - how to match autodetected printers to physical ones Brian <ad44@cityscape.co.uk> - 2022-04-10 21:30 +0200
          Re: CUPS - how to match autodetected printers to physical ones Brian <ad44@cityscape.co.uk> - 2022-04-11 16:50 +0200
            Re: CUPS - how to match autodetected printers to physical ones Greg Wooledge <greg@wooledge.org> - 2022-04-11 18:00 +0200
              Re: CUPS - how to match autodetected printers to physical ones Brian <ad44@cityscape.co.uk> - 2022-04-11 18:50 +0200
                Re: CUPS - how to match autodetected printers to physical ones Greg Wooledge <greg@wooledge.org> - 2022-04-11 19:10 +0200
                  Re: CUPS - how to match autodetected printers to physical ones Brian <ad44@cityscape.co.uk> - 2022-04-11 19:50 +0200
                    Re: CUPS - how to match autodetected printers to physical ones Greg Wooledge <greg@wooledge.org> - 2022-04-11 20:00 +0200
                      Re: CUPS - how to match autodetected printers to physical ones Brian <ad44@cityscape.co.uk> - 2022-04-11 20:30 +0200
                        Re: CUPS - how to match autodetected printers to physical ones "Gareth Evans" <donotspam@fastmail.fm> - 2022-04-11 21:10 +0200
      Re: CUPS - how to match autodetected printers to physical ones Brian <ad44@cityscape.co.uk> - 2022-04-08 21:20 +0200
        Re: CUPS - how to match autodetected printers to physical ones Tixy <tixy@yxit.co.uk> - 2022-04-08 22:10 +0200
          Re: CUPS - how to match autodetected printers to physical ones Brian <ad44@cityscape.co.uk> - 2022-04-09 01:10 +0200
            Re: CUPS - how to match autodetected printers to physical ones Greg Wooledge <greg@wooledge.org> - 2022-04-09 01:40 +0200
            Re: CUPS - how to match autodetected printers to physical ones Tixy <tixy@yxit.co.uk> - 2022-04-09 09:20 +0200
    Re: CUPS - how to match autodetected printers to physical ones Brian <ad44@cityscape.co.uk> - 2022-04-08 21:10 +0200
      Re: CUPS - how to match autodetected printers to physical ones Greg Wooledge <greg@wooledge.org> - 2022-04-08 21:30 +0200
        Re: CUPS - how to match autodetected printers to physical ones David Wright <deblis@lionunicorn.co.uk> - 2022-04-08 21:40 +0200
        Re: CUPS - how to match autodetected printers to physical ones Brian <ad44@cityscape.co.uk> - 2022-04-08 22:00 +0200
          Re: CUPS - how to match autodetected printers to physical ones The Wanderer <wanderer@fastmail.fm> - 2022-04-08 22:30 +0200
            Re: CUPS - how to match autodetected printers to physical ones Brian <ad44@cityscape.co.uk> - 2022-04-09 00:50 +0200
              Re: CUPS - how to match autodetected printers to physical ones The Wanderer <wanderer@fastmail.fm> - 2022-04-09 01:50 +0200
                Re: CUPS - how to match autodetected printers to physical ones Brian <ad44@cityscape.co.uk> - 2022-04-09 14:00 +0200
                  Re: CUPS - how to match autodetected printers to physical ones Greg Wooledge <greg@wooledge.org> - 2022-04-09 15:40 +0200
                  Re: CUPS - how to match autodetected printers to physical ones The Wanderer <wanderer@fastmail.fm> - 2022-04-10 02:30 +0200
                    Re: CUPS - how to match autodetected printers to physical ones Teemu Likonen <tlikonen@iki.fi> - 2022-04-10 07:00 +0200
                    Re: CUPS - how to match autodetected printers to physical ones <tomas@tuxteam.de> - 2022-04-10 08:40 +0200
                      Re: CUPS - how to match autodetected printers to physical ones gene heskett <gheskett@shentel.net> - 2022-04-10 11:50 +0200
                        Re: CUPS - how to match autodetected printers to physical ones <tomas@tuxteam.de> - 2022-04-10 12:10 +0200
                          Re: CUPS - how to match autodetected printers to physical ones gene heskett <gheskett@shentel.net> - 2022-04-10 13:10 +0200
                            Re: CUPS - how to match autodetected printers to physical ones The Wanderer <wanderer@fastmail.fm> - 2022-04-10 13:20 +0200
                              Re: CUPS - how to match autodetected printers to physical ones <tomas@tuxteam.de> - 2022-04-10 14:00 +0200
                              Re: CUPS - how to match autodetected printers to physical ones The Wanderer <wanderer@fastmail.fm> - 2022-04-10 14:20 +0200
                              Re: CUPS - how to match autodetected printers to physical ones gene heskett <gheskett@shentel.net> - 2022-04-10 14:20 +0200
                                Re: CUPS - how to match autodetected printers to physical ones Brian <ad44@cityscape.co.uk> - 2022-04-10 15:40 +0200
                            Re: CUPS - how to match autodetected printers to physical ones <tomas@tuxteam.de> - 2022-04-10 14:00 +0200
                          Re: CUPS - how to match autodetected printers to physical ones gene heskett <gheskett@shentel.net> - 2022-04-10 13:50 +0200
                            Re: CUPS - how to match autodetected printers to physical ones <tomas@tuxteam.de> - 2022-04-10 14:10 +0200
                              Re: CUPS - how to match autodetected printers to physical ones gene heskett <gheskett@shentel.net> - 2022-04-10 14:50 +0200
                        Re: CUPS - how to match autodetected printers to physical ones Brian <ad44@cityscape.co.uk> - 2022-04-10 15:00 +0200
                          Re: CUPS - how to match autodetected printers to physical ones gene heskett <gheskett@shentel.net> - 2022-04-10 15:40 +0200
                            Re: CUPS - how to match autodetected printers to physical ones Brian <ad44@cityscape.co.uk> - 2022-04-10 16:50 +0200
                    Re: CUPS - how to match autodetected printers to physical ones Brian <ad44@cityscape.co.uk> - 2022-04-10 14:40 +0200
                      Re: CUPS - how to match autodetected printers to physical ones The Wanderer <wanderer@fastmail.fm> - 2022-04-10 15:00 +0200
                        Re: CUPS - how to match autodetected printers to physical ones Brian <ad44@cityscape.co.uk> - 2022-04-10 20:30 +0200
                          Re: CUPS - how to match autodetected printers to physical ones The Wanderer <wanderer@fastmail.fm> - 2022-04-10 21:10 +0200
              Re: CUPS - how to match autodetected printers to physical ones David Wright <deblis@lionunicorn.co.uk> - 2022-04-09 03:00 +0200
                Re: CUPS - how to match autodetected printers to physical ones Brian <ad44@cityscape.co.uk> - 2022-04-09 14:10 +0200
          Re: CUPS - how to match autodetected printers to physical ones Greg Wooledge <greg@wooledge.org> - 2022-04-08 22:30 +0200
          On IP addresses and bus tripe [was: CUPS - how to match autodetected  printers to physical ones] <tomas@tuxteam.de> - 2022-04-09 08:40 +0200
            Re: On IP addresses and bus tripe [was: CUPS - how to match  autodetected printers to physical ones] Brian <ad44@cityscape.co.uk> - 2022-04-09 13:50 +0200
              Re: On IP addresses and bus tripe [was: CUPS - how to match  autodetected printers to physical ones] <tomas@tuxteam.de> - 2022-04-09 14:10 +0200
      Re: CUPS - how to match autodetected printers to physical ones David Wright <deblis@lionunicorn.co.uk> - 2022-04-08 21:30 +0200

Page 1 of 4  [1] 2 3 4  Next page →


#247046 — CUPS - how to match autodetected printers to physical ones

FromGreg Wooledge <greg@wooledge.org>
Date2022-04-08 18:20 +0200
SubjectCUPS - how to match autodetected printers to physical ones
Message-ID<E9Zv3-7mSc-1@gated-at.bofh.it>
If you don't want to read the background information, the question is:

How is one *supposed* to figure out which autodetected printer is the
correct one, apart from trial and error?

==========================================================================

Today I had to print something at work (on site).  This happens roughly
once a year.

There is one physical printer in my work area.  That I know of.  However,
the network is much larger than my single work area.  It spans many
floors of many buildings.

So, when I got there, I logged into my Debian 11 box, and ran "lpstat -t"
to see if I already had a default printer set up.  I did not.  However,
lpstat -t gave me a list of several autodetected printers.

"Aha," I thought.  "All I have to do is figure out which one of the
autodetected printers on this list has the same IP address as the printer
that I can see and touch over there."

Unfortunately, I was not able to find ANY way to determine the IP
addresses of the autodetected printers that were presented to me.
I tried a few Google searches, but almost all of the results I got were
ass-backwards.  They kept trying to teach me how to learn the IP address
of my printer.  (The other search results simply didn't work.)

But I already KNEW the IP address of the printer.  It's on a piece of
paper that's attached to the front of the printer.  I could ping the IP
address.  I could look up the IP address in /usr/sbin/arp and get the
MAC address of the printer too.  I even had an entry in *my* DNS subdomain
that mapped a name to this IP address.

None of that helped me in any way.

Next, I Googled the port number for the CUPS web interface, because for
some reason "grep cups /etc/services" gives nothing.  (Turns out it's 631.
I can never remember it, because I only have to deal with it once every
year or two or three.)

I went into the CUPS web interface, and tried to get *it* to tell me
the IP addresses of the autodetected printers that it clearly knows about.

I could not find anything in the CUPS web interface that would show me
an IP address for a single printer.

Some of the printers had three hex bytes in their names, like
"Canon_LBP712Cdn_db_c0_d3_".

"Perhaps," I thought, "these hex digits are the right-hand side of a MAC
address."

Unfortunately, no, none of the hex digits on the ends of these printer
names matched any part of the MAC address of the printer.  I have no
idea *what* they are.

"Perhaps," I thought, "this printer name is an entry in one of the
corporate DNS domains."

Unfortunately, no, I could not find Canon_LBP712Cdn_db_c0_d3_ with or
without the trailing _ in either of the two corporate DNS domains that
I know of.

So the next thing I tried was matching the printer's brand and model
against the names in the list, to see which one was the closest match.
According to the piece of paper on the front of the printer, it was
a Canon LBP 712 Cdn printer.  So, naturally, I thought that the
autodetected printer named Canon_LBP712Cdn_db_c0_d3_ might be the
right one.

So I sent a test page to it.

Nothing happened, that I could see.  Certainly no paper emerged from the
physical printer.

One of the light-buttons on top of the printer was lit up.  Sticking my
head into the cabinet so that I could see what the hell the button labels
said, it turns out the printer was in energy saving mode.  I found some
buttons and pressed them and eventually got it into "ready mode", or
whatever it's called.

Still, nothing happened.

I sent a second test page to it.

And still, nothing happened.

At this point I was starting to get really frustrated.  I kept searching
Google and typing random commands and clicking random things in the CUPS
web interface, trying to figure out HOW TO FIGURE OUT which printer is
which.

Nothing worked.  There was NO WAY to tell which printer was which!

There is simply no way, discoverable by me, that I can tell CUPS "Hey, I
have the IP address of a printer that you should already know about.
Tell me which printer that you already know about has this IP address."

I even tried ADDING a new printer to CUPS, using the IP address.  I
have no idea how to do this, so I clicked random shit trying to make it
work.  I selected "ipp" because it sounded like the least-frills
option.  It said that I had to construct a URL for my printer, and it
gave many examples, like ipp://hostname/port1 and so on, but it did not
tell me HOW TO FIGURE OUT what URL I should give.

So I gave it ipp://10.76.172.100 and tried to print a test page to it.

It didn't work.  No paper came out of the printer.

It kept saying the job was being processed, and that it was "connecting
to printer" (or "connected"?).  It kept giving me a larger and larger
page count for the single test page.  After it told me the page count
was 300-something, I canceled the job.

At this point, I had completely run out of ideas.  All I was left with
was TRIAL AND ERROR.

Since the autodetected printer whose name precisely matched the physical
printer's brand and model didn't work, I went with the printer that
was the second closest match.  I sent a test page to it.

THAT one worked.  A piece of paper emerged from the printer, with ink
markings on it.  They looked reasonably correct.

So I told CUPS to make this printer the system default, and printed
the single-page document I needed to print, and left.

After I left, I pondered whether I could have determined which printer
it was by disconnecting the network cable from it, waiting a bit, and
seeing which printer showed up as "not working" in the CUPS list.  But
I didn't try that, and it sounds a bit risky.

After all this, I have two final comments:

1) To whomever received two surprise printer test pages: sorry.
2) I FUCKING HATE PRINTERS!

And I have one question:

How is one *supposed* to figure out which autodetected printer is the
correct one, apart from trial and error?

[toc] | [next] | [standalone]


#247049

FromTixy <tixy@yxit.co.uk>
Date2022-04-08 19:00 +0200
Message-ID<Ea07L-7n5M-1@gated-at.bofh.it>
In reply to#247046
On Fri, 2022-04-08 at 12:10 -0400, Greg Wooledge wrote:
> Unfortunately, I was not able to find ANY way to determine the IP
> addresses of the autodetected printers that were presented to me.

If I go to http://localhost:631/printers/ and click on my printer it
shows amongst other information:

Connection:	socket://192.168.2.3:9100

In case it got that IP address because I configured it that way, I just
tried it on another computer that didn't previously have CUPS on until
I just installed it and it shows the same for an auto discovered
printer.

-- 
Tixy

[toc] | [prev] | [next] | [standalone]


#247050

FromTixy <tixy@yxit.co.uk>
Date2022-04-08 19:10 +0200
Message-ID<Ea0hr-7noo-5@gated-at.bofh.it>
In reply to#247049
On Fri, 2022-04-08 at 17:59 +0100, Tixy wrote:
> On Fri, 2022-04-08 at 12:10 -0400, Greg Wooledge wrote:
> > Unfortunately, I was not able to find ANY way to determine the IP
> > addresses of the autodetected printers that were presented to me.
> 
> If I go to http://localhost:631/printers/

I should say I got to that URL from the CUPs interface at
http://localhost:631/ then clicking the 'Admininitation' tab at the top
followed by the 'Manage Printers' button on the page that showed.

-- 
Tixy

[toc] | [prev] | [next] | [standalone]


#247051

FromGreg Wooledge <greg@wooledge.org>
Date2022-04-08 19:30 +0200
Message-ID<Ea0AN-7nuV-3@gated-at.bofh.it>
In reply to#247050
On Fri, Apr 08, 2022 at 06:03:47PM +0100, Tixy wrote:
> On Fri, 2022-04-08 at 17:59 +0100, Tixy wrote:
> > On Fri, 2022-04-08 at 12:10 -0400, Greg Wooledge wrote:
> > > Unfortunately, I was not able to find ANY way to determine the IP
> > > addresses of the autodetected printers that were presented to me.
> > 
> > If I go to http://localhost:631/printers/
> 
> I should say I got to that URL from the CUPs interface at
> http://localhost:631/ then clicking the 'Admininitation' tab at the top
> followed by the 'Manage Printers' button on the page that showed.

Here is what I have on that page:

=====================================================================
Showing 7 of 7 printers.

Queue Name	Description	Location	Make and Model	Status
Canon_LBP351dn_f9_7a_4a_			CNLBP712C CNLBP712C, driverless, cups-filters 1.28.7	Idle
Canon_LBP712Cdn_db_c0_d3_	Canon_LBP712Cdn_db_c0_d3_		CNLBP712C CNLBP712C, driverless, cups-filters 1.28.7	Idle
Cups_PDF_oc3261540276	Cups_PDF_oc3261540276		Local Raw Printer	Paused
HP_LaserJet_4100_Series_0001E6A68D3D_	HP_LaserJet_4100_Series_0001E6A68D3D_		HP LaserJet 4100 Series , driverless, cups-filters 1.28.7	Idle
hp_LaserJet_4250_621E13_	hp_LaserJet_4250_621E13_		hp LaserJet 4250, driverless, cups-filters 1.28.7	Idle
HP_LaserJet_P3010_Series_0FCDD7_	HP_LaserJet_P3010_Series_0FCDD7_		HP LaserJet P3010 Series, driverless, cups-filters 1.28.7	Idle
PostScript_oc3261540276	PostScript_oc3261540276		Local Raw Printer	Paused
=====================================================================

Of course it looks like crap when I just paste the text from the web
page into an email.  But if you ignore the horrible formatting, you
can see there are NO IP addresses here.

If I go to a single printer's page, I get text like this:

=====================================================================
Canon_LBP351dn_f9_7a_4a_
Canon_LBP351dn_f9_7a_4a_ (Idle, Accepting Jobs, Not Shared, Server Default)

Maintenance
 
Administration
Description:	
Location:	
Driver:	CNLBP712C CNLBP712C, driverless, cups-filters 1.28.7 (color, 2-sided printing)
Connection:	implicitclass://Canon_LBP351dn_f9_7a_4a_/
Defaults:	job-sheets=none, none media=na_letter_8.5x11in sides=one-sided
=====================================================================

Maybe I need to amend the question to "How is one supposed to figure out
which autodetected printer is which IN A CORPORATE NETWORK OF UNKNOWN
PROVENANCE?"  I don't know what I need to say to convey to you that
my workplace's network DOES NOT work like what you see on yours.

Looking at the stuff that I pasted here, how am I supposed to know whether
this corresponds to the physical printer with IP address 10.76.172.100?

[toc] | [prev] | [next] | [standalone]


#247053

Fromdidier gaumet <didier.gaumet@gmail.com>
Date2022-04-08 20:30 +0200
Message-ID<Ea1wR-7o5L-3@gated-at.bofh.it>
In reply to#247051
Hello Greg,

Perhaps, try: 

GUI:

avahi-discover from the avahi-discover package presents a network tree:
you can find the IP adresses of the printers

CLI:

# avahi-browse -r _print-caps._tcp
(from the avahi-utils package) 
In my case it's sufficient to detect my network printer but I do not
know well avahi service types (here: _print-caps._tcp, seems to be
printer capabilities at the TCP level)
if you do not find your printers try a more general search:
# avahi-browse -avr
and explore the results

[toc] | [prev] | [next] | [standalone]


#247059

FromBrian <ad44@cityscape.co.uk>
Date2022-04-08 21:30 +0200
Message-ID<Ea2sV-7oFy-11@gated-at.bofh.it>
In reply to#247053
On Fri 08 Apr 2022 at 20:28:31 +0200, didier gaumet wrote:

> Hello Greg,
> 
> Perhaps, try: 
> 
> GUI:
> 
> avahi-discover from the avahi-discover package presents a network tree:
> you can find the IP adresses of the printers
> 
> CLI:
> 
> # avahi-browse -r _print-caps._tcp
> (from the avahi-utils package) 
> In my case it's sufficient to detect my network printer but I do not
> know well avahi service types (here: _print-caps._tcp, seems to be
> printer capabilities at the TCP level)
> if you do not find your printers try a more general search:
> # avahi-browse -avr
> and explore the results

  avahi-browse -rt _ipp._tcp

is better.

This also gives the location of a printer if a highly paid sys admin
can be arsed to supply it.

-- 
Brian.

[toc] | [prev] | [next] | [standalone]


#247067

FromGreg Wooledge <greg@wooledge.org>
Date2022-04-08 22:10 +0200
Message-ID<Ea35E-7p8u-17@gated-at.bofh.it>
In reply to#247059
On Fri, Apr 08, 2022 at 08:24:00PM +0100, Brian wrote:
>   avahi-browse -rt _ipp._tcp
> 
> is better.

That one actually works.  It completes in under 1 second, and it
includes IP addresses in its output.

Out of curiosity, I tried omitting the -r option, to try to figure out
what "resolve" means in this context.  The result was simply a list of
the top-level names, without any of the associated details such as
their IP addresses.  So it seems "resolve services" means "provide
details about each thing found, instead of simply reporting its name".

(I find that confusing, because "resolve" usually means "report a
human-readable name rather than a number", but so be it.)

[toc] | [prev] | [next] | [standalone]


#247071

FromStefan Monnier <monnier@iro.umontreal.ca>
Date2022-04-08 23:10 +0200
Message-ID<Ea41H-7pHd-3@gated-at.bofh.it>
In reply to#247059
>   avahi-browse -rt _ipp._tcp

Thanks!


        Stefan

[toc] | [prev] | [next] | [standalone]


#247062

FromGreg Wooledge <greg@wooledge.org>
Date2022-04-08 21:40 +0200
Message-ID<Ea2CB-7oIL-3@gated-at.bofh.it>
In reply to#247053
On Fri, Apr 08, 2022 at 08:28:31PM +0200, didier gaumet wrote:
> CLI:
> 
> # avahi-browse -r _print-caps._tcp
> (from the avahi-utils package) 

I tried this with and without the -r (which according to the man page
asks to "resolve services", but it doesn't say what kind of resolution
it's doing).

In both cases, after waiting a few minutes and seeing no output, I
simply terminated the process.  I don't know what it's doing, or why
it takes so long, but I'm afraid that if it happens to be generating a
packet storm, I might get in trouble.

[toc] | [prev] | [next] | [standalone]


#247063

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2022-04-08 21:40 +0200
Message-ID<Ea2CB-7oIL-13@gated-at.bofh.it>
In reply to#247062
On Fri 08 Apr 2022 at 15:30:13 (-0400), Greg Wooledge wrote:
> On Fri, Apr 08, 2022 at 08:28:31PM +0200, didier gaumet wrote:
> > CLI:
> > 
> > # avahi-browse -r _print-caps._tcp
> > (from the avahi-utils package) 
> 
> I tried this with and without the -r (which according to the man page
> asks to "resolve services", but it doesn't say what kind of resolution
> it's doing).
> 
> In both cases, after waiting a few minutes and seeing no output, I
> simply terminated the process.  I don't know what it's doing, or why
> it takes so long, but I'm afraid that if it happens to be generating a
> packet storm, I might get in trouble.

If your position is secure, that might be the way to get things
changed: trouble.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#247061

FromFred <fred@blakemfg.com>
Date2022-04-08 21:40 +0200
Message-ID<Ea2CB-7oIL-1@gated-at.bofh.it>
In reply to#247051
On 4/8/22 10:22, Greg Wooledge wrote:
> On Fri, Apr 08, 2022 at 06:03:47PM +0100, Tixy wrote:
>> On Fri, 2022-04-08 at 17:59 +0100, Tixy wrote:
>>> On Fri, 2022-04-08 at 12:10 -0400, Greg Wooledge wrote:
>>>> Unfortunately, I was not able to find ANY way to determine the IP
>>>> addresses of the autodetected printers that were presented to me.
>>>
>>> If I go to http://localhost:631/printers/
>>
>> I should say I got to that URL from the CUPs interface at
>> http://localhost:631/ then clicking the 'Admininitation' tab at the top
>> followed by the 'Manage Printers' button on the page that showed.
> 
> Here is what I have on that page:
> 
> =====================================================================
> Showing 7 of 7 printers.
> 
> Queue Name	Description	Location	Make and Model	Status
> Canon_LBP351dn_f9_7a_4a_			CNLBP712C CNLBP712C, driverless, cups-filters 1.28.7	Idle
> Canon_LBP712Cdn_db_c0_d3_	Canon_LBP712Cdn_db_c0_d3_		CNLBP712C CNLBP712C, driverless, cups-filters 1.28.7	Idle
> Cups_PDF_oc3261540276	Cups_PDF_oc3261540276		Local Raw Printer	Paused
> HP_LaserJet_4100_Series_0001E6A68D3D_	HP_LaserJet_4100_Series_0001E6A68D3D_		HP LaserJet 4100 Series , driverless, cups-filters 1.28.7	Idle
> hp_LaserJet_4250_621E13_	hp_LaserJet_4250_621E13_		hp LaserJet 4250, driverless, cups-filters 1.28.7	Idle
> HP_LaserJet_P3010_Series_0FCDD7_	HP_LaserJet_P3010_Series_0FCDD7_		HP LaserJet P3010 Series, driverless, cups-filters 1.28.7	Idle
> PostScript_oc3261540276	PostScript_oc3261540276		Local Raw Printer	Paused
> =====================================================================
> 
> Of course it looks like crap when I just paste the text from the web
> page into an email.  But if you ignore the horrible formatting, you
> can see there are NO IP addresses here.
> 
> If I go to a single printer's page, I get text like this:
> 
> =====================================================================
> Canon_LBP351dn_f9_7a_4a_
> Canon_LBP351dn_f9_7a_4a_ (Idle, Accepting Jobs, Not Shared, Server Default)
> 
> Maintenance
>   
> Administration
> Description:	
> Location:	
> Driver:	CNLBP712C CNLBP712C, driverless, cups-filters 1.28.7 (color, 2-sided printing)
> Connection:	implicitclass://Canon_LBP351dn_f9_7a_4a_/
> Defaults:	job-sheets=none, none media=na_letter_8.5x11in sides=one-sided
> =====================================================================
> 
> Maybe I need to amend the question to "How is one supposed to figure out
> which autodetected printer is which IN A CORPORATE NETWORK OF UNKNOWN
> PROVENANCE?"  I don't know what I need to say to convey to you that
> my workplace's network DOES NOT work like what you see on yours.
> 
> Looking at the stuff that I pasted here, how am I supposed to know whether
> this corresponds to the physical printer with IP address 10.76.172.100?
> 
Have you tried asking the IT dept.?

Best regards,
Fred

[toc] | [prev] | [next] | [standalone]


#247094

FromBrian <ad44@cityscape.co.uk>
Date2022-04-09 17:40 +0200
Message-ID<EallU-7Bhp-9@gated-at.bofh.it>
In reply to#247051
On Fri 08 Apr 2022 at 13:22:26 -0400, Greg Wooledge wrote:

> On Fri, Apr 08, 2022 at 06:03:47PM +0100, Tixy wrote:
> > On Fri, 2022-04-08 at 17:59 +0100, Tixy wrote:
> > > On Fri, 2022-04-08 at 12:10 -0400, Greg Wooledge wrote:
> > > > Unfortunately, I was not able to find ANY way to determine the IP
> > > > addresses of the autodetected printers that were presented to me.
> > > 
> > > If I go to http://localhost:631/printers/
> > 
> > I should say I got to that URL from the CUPs interface at
> > http://localhost:631/ then clicking the 'Admininitation' tab at the top
> > followed by the 'Manage Printers' button on the page that showed.
> 
> Here is what I have on that page:
> 
> =====================================================================
> Showing 7 of 7 printers.
> 
> Queue Name	Description	Location	Make and Model	Status
> Canon_LBP351dn_f9_7a_4a_			CNLBP712C CNLBP712C, driverless, cups-filters 1.28.7	Idle
> Canon_LBP712Cdn_db_c0_d3_	Canon_LBP712Cdn_db_c0_d3_		CNLBP712C CNLBP712C, driverless, cups-filters 1.28.7	Idle
> Cups_PDF_oc3261540276	Cups_PDF_oc3261540276		Local Raw Printer	Paused
> HP_LaserJet_4100_Series_0001E6A68D3D_	HP_LaserJet_4100_Series_0001E6A68D3D_		HP LaserJet 4100 Series , driverless, cups-filters 1.28.7	Idle
> hp_LaserJet_4250_621E13_	hp_LaserJet_4250_621E13_		hp LaserJet 4250, driverless, cups-filters 1.28.7	Idle
> HP_LaserJet_P3010_Series_0FCDD7_	HP_LaserJet_P3010_Series_0FCDD7_		HP LaserJet P3010 Series, driverless, cups-filters 1.28.7	Idle
> PostScript_oc3261540276	PostScript_oc3261540276		Local Raw Printer	Paused
> =====================================================================

[...]

> Looking at the stuff that I pasted here, how am I supposed to know whether
> this corresponds to the physical printer with IP address 10.76.172.100?

Let's eliminate Cups_PDF_oc3261540276 and PostScript_oc3261540276
first. These are local, manually set up print queues (not discovered).
The queue name doe not end with an underscore, indicating they are not
physical printers. (oc3261540276 identifies the host, but why that
format?)

The remaining five entries are printers. The "driverless, cups-filters"
indicates that cups-browsed has automatically set up local print queues
for them. They are on the same subnet as your device. 10/10 up to now
for the printing system.

This leaves two Canons and three HPs. What make is the printer in the
room? Canon? Still don't want to guess? Then

  avahi-browse -rt _ipp._tcp | grep -B 2 "10.76.172.100"

Another 10/10 fot the printing system and the tools it uses.

Of course, knowing the queue name in advance would be more desirable and
lead to less frustration.

-- 
Brian.

[toc] | [prev] | [next] | [standalone]


#247141

FromBrian <ad44@cityscape.co.uk>
Date2022-04-10 14:50 +0200
Message-ID<EaFaV-7NLf-1@gated-at.bofh.it>
In reply to#247051
On Fri 08 Apr 2022 at 13:22:26 -0400, Greg Wooledge wrote:

> On Fri, Apr 08, 2022 at 06:03:47PM +0100, Tixy wrote:
> > On Fri, 2022-04-08 at 17:59 +0100, Tixy wrote:
> > > On Fri, 2022-04-08 at 12:10 -0400, Greg Wooledge wrote:
> > > > Unfortunately, I was not able to find ANY way to determine the IP
> > > > addresses of the autodetected printers that were presented to me.
> > > 
> > > If I go to http://localhost:631/printers/
> > 
> > I should say I got to that URL from the CUPs interface at
> > http://localhost:631/ then clicking the 'Admininitation' tab at the top
> > followed by the 'Manage Printers' button on the page that showed.
> 
> Here is what I have on that page:
> 
> =====================================================================
> Showing 7 of 7 printers.
> 
> Queue Name	Description	Location	Make and Model	Status
> Canon_LBP351dn_f9_7a_4a_			CNLBP712C CNLBP712C, driverless, cups-filters 1.28.7	Idle
> Canon_LBP712Cdn_db_c0_d3_	Canon_LBP712Cdn_db_c0_d3_		CNLBP712C CNLBP712C, driverless, cups-filters 1.28.7	Idle
> Cups_PDF_oc3261540276	Cups_PDF_oc3261540276		Local Raw Printer	Paused
> HP_LaserJet_4100_Series_0001E6A68D3D_	HP_LaserJet_4100_Series_0001E6A68D3D_		HP LaserJet 4100 Series , driverless, cups-filters 1.28.7	Idle
> hp_LaserJet_4250_621E13_	hp_LaserJet_4250_621E13_		hp LaserJet 4250, driverless, cups-filters 1.28.7	Idle
> HP_LaserJet_P3010_Series_0FCDD7_	HP_LaserJet_P3010_Series_0FCDD7_		HP LaserJet P3010 Series, driverless, cups-filters 1.28.7	Idle
> PostScript_oc3261540276	PostScript_oc3261540276		Local Raw Printer	Paused
> =====================================================================

[...]

> Looking at the stuff that I pasted here, how am I supposed to know whether
> this corresponds to the physical printer with IP address 10.76.172.100?

Another idea that may or may not grip you. It's not guaranteed to
work ( whereas the avahi-browse command should be reliable) but it
could be worth a try.

Many printers provide an snmp (Simple Network Management Protocol)
service on port 9100. Check with

  nmap 10.76.172.100

It would be unusual for the service not to be offered because it
dates from the dawn of time and is very simple to implement. There
isn't any reliance on avahi-daemon (just TCP/IP) and it works with
non-ipp printers.

Execute

  /usr/lib/cups/backend/snmp

The output should include an IP address and a printer make and model.

Thanks to The Wanderer for sparking this thought.

-- 
Brian.

[toc] | [prev] | [next] | [standalone]


#247145

Fromgene heskett <gheskett@shentel.net>
Date2022-04-10 15:30 +0200
Message-ID<EaFND-7Odc-3@gated-at.bofh.it>
In reply to#247141
On Sunday, 10 April 2022 08:40:29 EDT Brian wrote:
>   /usr/lib/cups/backend/snmp
The only machine I have here that has that file installed, an rpi4, does 
not expose the printers address, only:
pi@rpi4:~ $ sudo  /usr/lib/cups/backend/snmp
network lpd://BRN30055C8A2DC8/BINARY_P1 "Brother MFC-J6920DW" "Brother 
MFC-J6920DW" "MFG:Brother;CMD:HBP,BRPJL,URF;MDL:MFC-
J6920DW;CLS:PRINTER;CID:Brother IJ 
Type3;URF:SRGB24,W8,CP1,IS1-13,MT1-8-11,OB9,PQ4-5,RS200-300,OFU0,V1.2,DM4;" 
"coyote.coyote.den"

The only location identifier is the resolved "coyote.coyote.den" which is 
this machine.

None of the buster boxes have it, so they all report file not found. BUT 
they were all installed from a buster respin by the linuxcnc folks. But 
geany the editor, can drive that printer from any locatiom my cat5 cable 
reaches.

And I just checked because there is a 2nd printer, another brother HL2320 
B&W duplex capable laser, on this machine, and although the above command 
only shows one printer, I can feed both printers from geany running on 
any machine, all 6 of the profiles I have defined are available for geany 
to use as an output device. I suspect the laser doesn't do snmp, its a 
$120 printer. Probably some brother version of plc5 since its running on 
brothers own drivers.

Cheers Brian, Gene Heskett.
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis

[toc] | [prev] | [next] | [standalone]


#247149

FromBrian <ad44@cityscape.co.uk>
Date2022-04-10 16:00 +0200
Message-ID<EaGgF-7On0-3@gated-at.bofh.it>
In reply to#247145
On Sun 10 Apr 2022 at 09:19:43 -0400, gene heskett wrote:

> On Sunday, 10 April 2022 08:40:29 EDT Brian wrote:
> >   /usr/lib/cups/backend/snmp
> The only machine I have here that has that file installed, an rpi4, does 
> not expose the printers address, only:
> pi@rpi4:~ $ sudo  /usr/lib/cups/backend/snmp
> network lpd://BRN30055C8A2DC8/BINARY_P1 "Brother MFC-J6920DW" "Brother 
> MFC-J6920DW" "MFG:Brother;CMD:HBP,BRPJL,URF;MDL:MFC-
> J6920DW;CLS:PRINTER;CID:Brother IJ 
> Type3;URF:SRGB24,W8,CP1,IS1-13,MT1-8-11,OB9,PQ4-5,RS200-300,OFU0,V1.2,DM4;" 
> "coyote.coyote.den"
> 
> The only location identifier is the resolved "coyote.coyote.den" which is 
> this machine.
> 
> None of the buster boxes have it, so they all report file not found. BUT 
> they were all installed from a buster respin by the linuxcnc folks. But 
> geany the editor, can drive that printer from any locatiom my cat5 cable 
> reaches.
> 
> And I just checked because there is a 2nd printer, another brother HL2320 
> B&W duplex capable laser, on this machine, and although the above command 
> only shows one printer, I can feed both printers from geany running on 
> any machine, all 6 of the profiles I have defined are available for geany 
> to use as an output device. I suspect the laser doesn't do snmp, its a 
> $120 printer. Probably some brother version of plc5 since its running on 
> brothers own drivers.

Thank you, Gene. Your investigations are vey useful and point to my
forgetfulness.

The snmp backend is not installed in the location I gave but has
to be moved there. Do either

  mv /usr/lib/cups/backend-available/snmp /usr/lib/cups/backend/snmp

or

  dpkg-reconfigure cups

-- 
Brian.

[toc] | [prev] | [next] | [standalone]


#247150

FromThe Wanderer <wanderer@fastmail.fm>
Date2022-04-10 16:10 +0200
Message-ID<EaGql-7OG0-3@gated-at.bofh.it>
In reply to#247149

[Multipart message — attachments visible in raw view] — view raw

On 2022-04-10 at 09:54, Brian wrote:

> The snmp backend is not installed in the location I gave but has
> to be moved there. Do either
> 
>   mv /usr/lib/cups/backend-available/snmp /usr/lib/cups/backend/snmp
> 
> or
> 
>   dpkg-reconfigure cups

I've never taken specific action in either of these directions, but on
my machine, this file exists in both of those locations. I suspect that
they're actually hardlinked together.

I imagine that this is probably the result of my choosing a particular
option when configuring CUPS in the first place, but I have no
recollection of what option that might have been, nor even specifically
of having been given any CUPS-related prompts when installing this system.

The point of which is: it's possible that the default for this might
actually now be to have this enabled.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

[toc] | [prev] | [next] | [standalone]


#247153

FromBrian <ad44@cityscape.co.uk>
Date2022-04-10 16:40 +0200
Message-ID<EaGTn-7OPF-3@gated-at.bofh.it>
In reply to#247150
On Sun 10 Apr 2022 at 10:05:09 -0400, The Wanderer wrote:

> On 2022-04-10 at 09:54, Brian wrote:
> 
> > The snmp backend is not installed in the location I gave but has
> > to be moved there. Do either
> > 
> >   mv /usr/lib/cups/backend-available/snmp /usr/lib/cups/backend/snmp
> > 
> > or
> > 
> >   dpkg-reconfigure cups
> 
> I've never taken specific action in either of these directions, but on
> my machine, this file exists in both of those locations. I suspect that
> they're actually hardlinked together.
> 
> I imagine that this is probably the result of my choosing a particular
> option when configuring CUPS in the first place, but I have no
> recollection of what option that might have been, nor even specifically
> of having been given any CUPS-related prompts when installing this system.
> 
> The point of which is: it's possible that the default for this might
> actually now be to have this enabled.

TBH, I am not in the mood for deciphering postinst files for cups and
cups-daemon. If the snmp backend file is not where it is on ny stable
and unstable machines, it is easy enough to adjust.

OTOH, reports of the technique I suggested are more than welcome.

-- 
Brian.

[toc] | [prev] | [next] | [standalone]


#247171

Fromgene heskett <gheskett@shentel.net>
Date2022-04-10 23:00 +0200
Message-ID<EaMP8-7SlB-5@gated-at.bofh.it>
In reply to#247149
On Sunday, 10 April 2022 09:54:34 EDT Brian wrote:
> On Sun 10 Apr 2022 at 09:19:43 -0400, gene heskett wrote:
> > On Sunday, 10 April 2022 08:40:29 EDT Brian wrote:
> > >   /usr/lib/cups/backend/snmp
> > 
> > The only machine I have here that has that file installed, an rpi4,
> > does not expose the printers address, only:
> > pi@rpi4:~ $ sudo  /usr/lib/cups/backend/snmp
> > network lpd://BRN30055C8A2DC8/BINARY_P1 "Brother MFC-J6920DW"
> > "Brother
> > MFC-J6920DW" "MFG:Brother;CMD:HBP,BRPJL,URF;MDL:MFC-
> > J6920DW;CLS:PRINTER;CID:Brother IJ
> > Type3;URF:SRGB24,W8,CP1,IS1-13,MT1-8-11,OB9,PQ4-5,RS200-300,OFU0,V1.2
> > ,DM4;" "coyote.coyote.den"
> > 
> > The only location identifier is the resolved "coyote.coyote.den"
> > which is this machine.
> > 
> > None of the buster boxes have it, so they all report file not found.
> > BUT they were all installed from a buster respin by the linuxcnc
> > folks. But geany the editor, can drive that printer from any
> > locatiom my cat5 cable reaches.
> > 
> > And I just checked because there is a 2nd printer, another brother
> > HL2320 B&W duplex capable laser, on this machine, and although the
> > above command only shows one printer, I can feed both printers from
> > geany running on any machine, all 6 of the profiles I have defined
> > are available for geany to use as an output device. I suspect the
> > laser doesn't do snmp, its a $120 printer. Probably some brother
> > version of plc5 since its running on brothers own drivers.
> 
> Thank you, Gene. Your investigations are vey useful and point to my
> forgetfulness.
> 
Your forgetfullness Brian? I'm 87, so it is std proceedure for me to 
either repeat the experiment or spend a couple weeks sorting thru the 
sometimmes decades old stuff in my mental attic, and FWIW I also claim 
any references to oldtimers too. Surely you aren't that ancient. ;-)

> The snmp backend is not installed in the location I gave but has
> to be moved there. Do either
> 
>   mv /usr/lib/cups/backend-available/snmp /usr/lib/cups/backend/snmp
> 
> or
> 
>   dpkg-reconfigure cups
> 
> --
> Brian.
> 
> .


Cheers, Gene Heskett.
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis

[toc] | [prev] | [next] | [standalone]


#247148

From<tomas@tuxteam.de>
Date2022-04-10 15:50 +0200
Message-ID<EaG6Z-7OjD-3@gated-at.bofh.it>
In reply to#247141

[Multipart message — attachments visible in raw view] — view raw

On Sun, Apr 10, 2022 at 01:40:29PM +0100, Brian wrote:

[...]

> Many printers provide an snmp (Simple Network Management Protocol)
> service on port 9100. Check with
> 
>   nmap 10.76.172.100

I know a corporate network or two which would get you disconnected
if you do that :)

Then you've got to go to the firewall admin and beg for being reconnected.
So if you try it, first make sure you are on speaking terms with the
network/firewall admins (a good idea, regardless...)

So careful.

Cheers
-- 
t

[toc] | [prev] | [next] | [standalone]


#247161

FromBrian <ad44@cityscape.co.uk>
Date2022-04-10 19:50 +0200
Message-ID<EaJRf-7QzT-5@gated-at.bofh.it>
In reply to#247148
On Sun 10 Apr 2022 at 15:40:28 +0200, tomas@tuxteam.de wrote:

> On Sun, Apr 10, 2022 at 01:40:29PM +0100, Brian wrote:
> 
> [...]
> 
> > Many printers provide an snmp (Simple Network Management Protocol)
> > service on port 9100. Check with
> > 
> >   nmap 10.76.172.100
> 
> I know a corporate network or two which would get you disconnected
> if you do that :)
> 
> Then you've got to go to the firewall admin and beg for being reconnected.
> So if you try it, first make sure you are on speaking terms with the
> network/firewall admins (a good idea, regardless...)

Strange world we live in! One looks at a shop window and the heavy mob
appear to harass you. Survellance capitalism in action? Or the sysadmin
is so unsure of the network security in place that it requires drastic
and immediate action to prevent a peep at services being offered? :)

I was once reprimamaned by Amazon for nmapping my own network. That's
what I call real devotion to stamping out network discovery.

-- 
Brian.

[toc] | [prev] | [next] | [standalone]


Page 1 of 4  [1] 2 3 4  Next page →

Back to top | Article view | linux.debian.user


csiph-web