Re: CUPS on Bullseye and Bookworm

2023-05-20 Thread Charles Curley
On Sat, 20 May 2023 08:24:39 +0200
john doe  wrote:

> >
> > .home.arpa ? I had never heard of it until you mentioned it. You are
> > suggesting that I change every reference to localdomain to
> > .home.arpa? Implementing that change is going to be a major pain in
> > the arse.  
> 
> My idea was that .local and .localdomain could be an issue for the
> autodetection of the printer.
> That was simply a suggestion if you were not getting anywhere.

Ah, yes. I had wondered about that. Thanks for the clarification.

> 
> Granted, I should have phrased that in a better way (sorry about
> that).

No worries. That's what asking for clarification is for. :-)

> 
> I also want to point out that you have a domain name, I would use that
> instead of .home.arpa!

True. So any computer becomes foo.charlescurley.com instead of its
current foo.localdomain? That might work, but is still a huge PITA to
implement. I think I have a workable solution in the IP version of the
queue, and the Perl programmer's virtue of laziness suggests I use that.

> 
> Brian has done abetter job in trying to help you out than what I could
> have done!

He has done an excellent job. Thanks again, Brian.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: CUPS on Bullseye and Bookworm

2023-05-20 Thread john doe

On 5/17/23 21:56, Charles Curley wrote:

On Wed, 17 May 2023 19:21:23 +0200
john doe  wrote:


A few things, that I spotted while reading this thread and Im' not
sure if you got everything working!


Thank you. No, I don't have everything working.



- MDNS is using .local
- .localdomain should be moved to .home.arpa (see RFC)! :)


.home.arpa ? I had never heard of it until you mentioned it. You are
suggesting that I change every reference to localdomain to .home.arpa?
Implementing that change is going to be a major pain in the arse.


My idea was that .local and .localdomain could be an issue for the
autodetection of the printer.
That was simply a suggestion if you were not getting anywhere.

Granted, I should have phrased that in a better way (sorry about that).

I also want to point out that you have a domain name, I would use that
instead of .home.arpa!

Brian has done abetter job in trying to help you out than what I could
have done!

--
John Doe



Re: CUPS on Bullseye and Bookworm

2023-05-17 Thread Charles Curley
On Wed, 17 May 2023 19:21:23 +0200
john doe  wrote:

> A few things, that I spotted while reading this thread and Im' not
> sure if you got everything working!

Thank you. No, I don't have everything working.

> 
> - MDNS is using .local
> - .localdomain should be moved to .home.arpa (see RFC)! :)

.home.arpa ? I had never heard of it until you mentioned it. You are
suggesting that I change every reference to localdomain to .home.arpa?
Implementing that change is going to be a major pain in the arse.

> - 9100 (TCP) is LPD AKA LPR

Thanks.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: CUPS on Bullseye and Bookworm

2023-05-17 Thread john doe

On 5/15/23 16:46, Charles Curley wrote:

On Mon, 15 May 2023 07:31:29 -0600
Charles Curley  wrote:


I solved that one. I had closed TCP port 9100. Opening that up on the
server got me running. However, that did not solve the problem for the
other two protocols.


Correction. That didn't solve it. I realized that port 9100 on hawk is
irrelevant because the socket queue goes directly to the printer, not
via hawk. I closed the port on hawk and I can still print to the
printer via that queue.



A few things, that I spotted while reading this thread and Im' not sure
if you got everything working!

- MDNS is using .local
- .localdomain should be moved to .home.arpa (see RFC)! :)
- 9100 (TCP) is LPD AKA LPR

--
John Doe



Re: CUPS on Bullseye and Bookworm

2023-05-16 Thread Brian
On Mon 15 May 2023 at 18:29:12 +0100, Brian wrote:

> On Mon 15 May 2023 at 16:33:42 +0100, Brian wrote:
> 
> [...]
> 
> > Good. The issue is solved, but how do you feel about being adventurous?
> > 
> > Assuming you have deleted the three non-working queues,'lpstat -a' and
> > s-c-p should show only M234. On dragon do
> > 
> >   systemctl stop cups-browsed
> > 
> > Check that 'lpstat -l -e' still shows the printer as
> > 
> >HP_LaserJet_MFP_M234sdw_C0FB67
> > 
> > * Now print: 'lp -d HP_LaserJet_MFP_M234sdw_C0FB67 /etc/nsswitch.conf'.
> > * Immediately afterwards do 'lpstat -a'. What do you observe?
> > * Run 'lpstat -a' a minute or so later. What do you observe?
> 
> Thinking on: the test can be carried out withoit using papaer and ink.
> For the first step:
> 
> * Execute 'lpoptions -p HP_LaserJet_MFP_M234sdw_C0FB67 -l'.

For illustrative purposes on a machine without cups-browsed:

  brian@test-new:~$ lpstat -a
  lpstat: No destinations added.
  brian@test-new:~$ 

There aren't any local print queues.

  brian@test-new:~$ lpstat -e
  ENVY4500
  ENVY4500_USB
  RX420
  brian@test-new:~$

Shows all available destinations on the local network. These are the names
of prospective (on-demand) queues.

  brian@test-new:~$ lpoptions -p envy4500 -l
  PageSize/Media Size: 100x150mm 111.76x152.4mm 3.5x5 3.5x5.Borderless 3x5
  4x6 4x6.Borderless 5x7 5x7.Borderless 5x8 8x10 8x10.Borderless *A4
  A4.Borderless A5 A6 A6.Borderless B5 Env10 EnvA2 EnvC5 EnvC6 EnvChou3
  EnvChou4 EnvDL EnvMonarch EnvPersonal Executive ISOB5 Legal Letter
  Letter.Borderless Postcard Postcard.Borderless Statement Custom.WIDTHxHEIGHT
  MediaType/Media Type: *Stationery PhotographicGlossy
  cupsPrintQuality/cupsPrintQuality: Draft *Normal High
  ColorModel/Output Mode: *RGB Gray Gray16 DeviceGray DeviceRGB AdobeRGB
  Duplex/Duplex: *None DuplexNoTumble DuplexTumble
  OutputBin/OutputBin: *FaceUp
  brian@test-new:~$

The destination has been contacted and querued for the device's attributes.

  brian@test-new:~$ lpstat -a
  ENVY4500 accepting requests since Tue 16 May 2023 14:50:01 BST
  brian@test-new:~$

A local queue for the ENVY4500 destination has been created. Unlike a queue
created manually or with cups-browsed it is a *temporary* queue. Just over
a minute later:

  brian@test-new:~$ lpstat -a
  lpstat: No destinations added.
  brian@test-new:~$

This is the future of printing and it is here now. No manual queues. No
cups-browsed.

-- 
Brian.




Re: CUPS on Bullseye and Bookworm

2023-05-16 Thread Dan Ritter
Charles Curley wrote: 
> On Mon, 15 May 2023 20:30:38 -0400
> Timothy M Butterworth  wrote:
> 
> > > I also have an ancient i386 IBM R51 running Bookworm, dragon. On
> > > dragon, using system-config-printer, I can see the printer
> > > automagically discovered. I can open up the queue window for the
> > > printer, and request a test page.
> > >  
> > 
> > If you are trying to run Bullseye on an actual i386 CPU you will have
> > strange problems as the minimum hardware version is i686 Pentium II.
> > That change took place in Debian quite a while ago. The arch still
> > says i386 due to the large number of dependencies it did not make
> > sense to try to change it to i686.
> 
> root@dragon:~# uname -a
> Linux dragon 6.1.0-9-686 #1 SMP PREEMPT_DYNAMIC Debian 6.1.27-1 (2023-05-08) 
> i686 GNU/Linux
> root@dragon:~# 

The actually useful thing would be lscpu.

It's not necessary, because "IBM R51" is enough to locate it as
a ThinkPad R51, which has a Pentium M CPU, which is precisely an
i686 by the current nomenclature.

-dsr-



Re: CUPS on Bullseye and Bookworm

2023-05-16 Thread Charles Curley
On Mon, 15 May 2023 20:30:38 -0400
Timothy M Butterworth  wrote:

> > I also have an ancient i386 IBM R51 running Bookworm, dragon. On
> > dragon, using system-config-printer, I can see the printer
> > automagically discovered. I can open up the queue window for the
> > printer, and request a test page.
> >  
> 
> If you are trying to run Bullseye on an actual i386 CPU you will have
> strange problems as the minimum hardware version is i686 Pentium II.
> That change took place in Debian quite a while ago. The arch still
> says i386 due to the large number of dependencies it did not make
> sense to try to change it to i686.

root@dragon:~# uname -a
Linux dragon 6.1.0-9-686 #1 SMP PREEMPT_DYNAMIC Debian 6.1.27-1 (2023-05-08) 
i686 GNU/Linux
root@dragon:~# 


-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: CUPS on Bullseye and Bookworm

2023-05-15 Thread Timothy M Butterworth
On Sun, May 14, 2023 at 1:30 PM Charles Curley <
charlescur...@charlescurley.com> wrote:

> I have an HP HP_LaserJet_MFP_M234sdw_C0FB67_USB_, one of those modern
> "no driver" multifunction printers. It works fine on Bullseye. I have
> the printer hooked up via USB to a server, hawk, and it prints just
> fine.
>
> I have a client, ideapc, which sees the printer and prints to it just
> fine.
>
> I also have an ancient i386 IBM R51 running Bookworm, dragon. On dragon,
> using system-config-printer, I can see the printer automagically
> discovered. I can open up the queue window for the printer, and request
> a test page.
>

If you are trying to run Bullseye on an actual i386 CPU you will have
strange problems as the minimum hardware version is i686 Pentium II. That
change took place in Debian quite a while ago. The arch still says i386 due
to the large number of dependencies it did not make sense to try to change
it to i686.



> Alas, I see the test page in the queue briefly. The queue window says
> "processing - not connected?", then "Printer error". Then the print job
> disappears, leaving no error message. (This is a change in behavior from
> Bullseye. I do not like it.)
>
> The printer does come awake and report an error when I ask for the test
> page. I don't see anything in the printer's logs.
>
> Logging on both machines shows no errors. I am running firewalld on
> dragon, and did enable logging for unicast. firewalld-cmd reports the
> following, among other things:
>
>services: ipp ipp-client mdns samba-client smtp ssh
>
> --
> Does anybody read signatures any more?
>
> https://charlescurley.com
> https://charlescurley.com/blog/
>
>

-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀


Re: CUPS on Bullseye and Bookworm

2023-05-15 Thread gene heskett

On 5/15/23 14:32, Charles Curley wrote:

On Mon, 15 May 2023 12:18:56 -0400
gene heskett  wrote:


this is interesting Brian, but how do I adapt it to my brother
printers? All I can get by substituting the queue name M234 is
"printer or class does not exist".


Right. M234 is the name assigned previously. You get the URI(s) of
available printer(s) by running the program driverless. E.g.:

root@dragon:~# driverless
ipps://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipps._tcp.local/
root@dragon:~#

Then feed that into:

lpadmin -p M234 -v "URI" -E -m everywhere

But edit in a better (for you) name for the printer than M234.

You might get away with something like:

lpadmin -p heskett.printer -v "$(driverless)" -E -m everywhere

but I haven't experimented with that.


And the only printer that shows in the driverless output:
ipp://Brother%20MFC-J6920DW._ipp._tcp.local/
is I believe the only one of 3 references to that physical printer in 
cups, that does not work, it ignores the tray selection passed.  That is 
an expen$ive lack.


Thanks Charles.

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
Genes Web page 



Re: CUPS on Bullseye and Bookworm

2023-05-15 Thread Charles Curley
On Mon, 15 May 2023 12:18:56 -0400
gene heskett  wrote:

> this is interesting Brian, but how do I adapt it to my brother
> printers? All I can get by substituting the queue name M234 is
> "printer or class does not exist".

Right. M234 is the name assigned previously. You get the URI(s) of
available printer(s) by running the program driverless. E.g.:

root@dragon:~# driverless
ipps://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipps._tcp.local/
root@dragon:~# 

Then feed that into:

lpadmin -p M234 -v "URI" -E -m everywhere

But edit in a better (for you) name for the printer than M234.

You might get away with something like:

lpadmin -p heskett.printer -v "$(driverless)" -E -m everywhere

but I haven't experimented with that.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: CUPS on Bullseye and Bookworm

2023-05-15 Thread gene heskett

On 5/15/23 07:10, Brian wrote:

On Sun 14 May 2023 at 20:57:23 -0600, Charles Curley wrote:


On Sun, 14 May 2023 23:30:25 +0100
Brian  wrote:


On Sun 14 May 2023 at 14:04:51 -0600, Charles Curley wrote:





We take it that dragon, hawk and the printer are network connected.

Give what you get from dragon with

   avahi-browse -rt _ipp._tcp
   avahi-browse -rt _uscan._tcp
   driverless
   lpstat -l -e

avahi-browse is in the avahi-utils package.



root@dragon:~# avahi-browse -rt _ipp._tcp
+ wlp2s2 IPv4 HP LaserJet MFP M234sdw (C0FB67)  Internet Printer
 local
= wlp2s2 IPv4 HP LaserJet MFP M234sdw (C0FB67)  Internet Printer
 local
hostname = [hpm234ethernet.local]
address = [192.168.100.134]
port = [631]
txt = ["mopria-certified=2.1" "mac=6c:02:e0:c0:fb:67" "usb_MDL=HP LaserJet MFP M232-M237" "usb_MFG=HP" "TLS=1.2" "PaperMax=legal-A4" "kind=document,envelope,photo" "UUID=d532fa73-f559-43ca-9f8e-1eef16972345" 
"Fax=F" "Scan=T" "Duplex=T" "Color=F" "note=" "adminurl=http://hpm234ethernet.local./hp/device/info_config_AirPrint.html?tab=Networking=AirPrintStatus; "priority=10" "product=(HP LaserJet MFP M232-M237)" 
"ty=HP LaserJet MFP M232-M237" "URF=V1.4,CP99,W8,OB10,PQ3-4,DM1,IS1-4,MT1-3-5,RS300-600" "rp=ipp/print" "pdl=application/PCLm,application/octet-stream,image/pwg-raster" "qtotal=1" "txtvers=1"]


Useful data but an aside first:

The pdl= key lacks image/urf. HP claims AirPrint support for the device 
(URF=V1.4,...).
It looks like you have been sold a pup. A firmware update?


root@dragon:~# driverless
ipps://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipps._tcp.local/


This is the URI for the printer. You will need to substitute it later into an 
lpadmin
command.


root@dragon:~# lpstat -l -e
HP-HP-LaserJet-MFP-M232-M237 permanent 
ipp://localhost/printers/HP-HP-LaserJet-MFP-M232-M237 
dnssd://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipp._tcp.local/?uuid=d532fa73-f559-43ca-9f8e-1eef16972345
HP-HP-LaserJet-MFP-M232-M237-2 permanent 
ipp://localhost/printers/HP-HP-LaserJet-MFP-M232-M237-2 
ipps://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipps._tcp.local/
HP-LaserJet-MFP-M232-M237 permanent 
ipp://localhost/printers/HP-LaserJet-MFP-M232-M237 
socket://hpm234ethernet.localdomain:9100
HP_LaserJet_MFP_M234sdw_C0FB67 network none 
ipps://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipps._tcp.local/
root@dragon:~#


The first three entries are print queues (permanent) you have set up. The 
fourth is the
printer.

Execute

   lpadmin -p M234 -v "URI" -E -m everywhere

Test with

   lp -d M234 /etc/nsswitch.conf


this is interesting Brian, but how do I adapt it to my brother printers?
All I can get by substituting the queue name M234 is "printer or class 
does not exist".


Interestingly, a reboot of this machine to bring in a new kernel, seems 
to have fixed cups for armbian bullseye, not 100% tested yet for 
function but ff at localhost:631 on both of the bpi's now has a full 
list of shared printers that are now displayed by geany as target printers.


Thanks 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
Genes Web page 



Re: CUPS on Bullseye and Bookworm

2023-05-15 Thread Brian
On Mon 15 May 2023 at 08:24:28 -0600, Charles Curley wrote:

> On Mon, 15 May 2023 12:09:33 +0100
> Brian  wrote:

[...]

> Ah, OK. So can I get rid of the three queues and print directly to the
> printer?

Indeed you can! 'lpstat -l -e' should show only the printer on the network
and a working local queue, M234. 
 
> > Execute
> > 
> >   lpadmin -p M234 -v "URI" -E -m everywhere
> > 
> > Test with
> > 
> >   lp -d M234 /etc/nsswitch.conf
> 
> root@dragon:~# lp -d M234 /etc/nsswitch.conf
> lp: Error - The printer or class does not exist.
> root@dragon:~# lpadmin -p M234 -v "URI" -E -m everywhere
> lpadmin: Bad device-uri "URI".
> root@dragon:~# lpadmin -p M234 -v 
> "ipps://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipps._tcp.local/" -E -m 
> everywhere
> root@dragon:~# lp -d M234 /etc/nsswitch.conf
> request id is M234-25 (1 file(s))
> root@dragon:~# 
> 
> And that printed. And I see a new queue on dragon's
> system-config-printer.

Good. The issue is solved, but how do you feel about being adventurous?

Assuming you have deleted the three non-working queues,'lpstat -a' and
s-c-p should show only M234. On dragon do

  systemctl stop cups-browsed

Check that 'lpstat -l -e' still shows the printer as

   HP_LaserJet_MFP_M234sdw_C0FB67

* Now print: 'lp -d HP_LaserJet_MFP_M234sdw_C0FB67 /etc/nsswitch.conf'.
* Immediately afterwards do 'lpstat -a'. What do you observe?
* Run 'lpstat -a' a minute or so later. What do you observe?

-- 
Brian.



Re: CUPS on Bullseye and Bookworm

2023-05-15 Thread Charles Curley
On Mon, 15 May 2023 15:42:51 +0100
Brian  wrote:

> On Mon 15 May 2023 at 08:07:12 -0600, Charles Curley wrote:
> 
>  [...]  
>  [...]  
> > 
> > Possibly just legacy habits. I'm not accustomed to this automation.
> >  
>  
> Possibly. You are not alone in this. The thinking appears to be: "I
> have an HP printer; therefore I must use HPLIP". Oftern it is
> downhill from there. Unlees there are special needs, HPLIP is
> redundant with a modern MFP. 

Yup.

I have an older inkjet HP also on hawk, so I have it on hawk and
ideapc. However, I did not put HPLIP on dragon. I've had the inkjet
shut down during these exercises.

>  
>  [...]  
>  [...]  
>  [...]  
>  [...]  
> 
> cups-browsed works well for many users, but can be a little
> temperamental. 

It also can take its time. After this experience I would recommend
waiting three minutes or so to see if it does its magic. dragon is an
ancient IBM (not Lenovo, although manufactured by Lenovo) and on the
slow side these days, so three minutes may be a bit much.

>  [...]  
> 
> [...]
> 
>  [...]  
>  [...]  
> 
> avahi-browse shows hpm234ethernet.local for the hostname.

I conjecture that's an avahi-browse bug. Why would anyone have a 11
letter TLD name? So perhaps a-b truncates it.

> 
> BTW, is hpm234ethernet you setting or HP's?
> 

Mine, via DNS.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: CUPS on Bullseye and Bookworm

2023-05-15 Thread Charles Curley
On Mon, 15 May 2023 07:31:29 -0600
Charles Curley  wrote:

> I solved that one. I had closed TCP port 9100. Opening that up on the
> server got me running. However, that did not solve the problem for the
> other two protocols.

Correction. That didn't solve it. I realized that port 9100 on hawk is
irrelevant because the socket queue goes directly to the printer, not
via hawk. I closed the port on hawk and I can still print to the
printer via that queue.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: CUPS on Bullseye and Bookworm

2023-05-15 Thread Brian
On Mon 15 May 2023 at 08:07:12 -0600, Charles Curley wrote:

> On Mon, 15 May 2023 14:22:14 +0100
> Brian  wrote:
> > 
> > Consider: the printer can be discovered via mDNS/DNS-SD by all
> > machines on the network. ideapc does this and hasn't any difficulty
> > printing. So why set up a server when hawk will see the printer as
> > ideapc does? 
> 
> Possibly just legacy habits. I'm not accustomed to this automation.
 
Possibly. You are not alone in this. The thinking appears to be: "I have
an HP printer; therefore I must use HPLIP". Oftern it is downhill from
there. Unlees there are special needs, HPLIP is redundant with a modern
MFP. 
 
> > Additionally, assuming the printer provides the IPP-over-USB protocol,
> > the USB queue will not work. See
> > 
> >   https://wiki.debian.org/CUPSDriverlessPrinting
> > 
> >  [...]  
> > 
> > The two URIs are equivalent.
> > 
> >  [...]  
> > > 
> > > implicitclass://HP_LaserJet_MFP_M234sdw_C0FB67_/  
> > 
> > cups-browsed has automatically set up a queue. Unless it is having an
> > off-day, it should do the same on hawk and dragon.
> 
> I have no idea what's going on here. I now see such a queue on hawk but
> not dragon. Possibly the fact that I rebooted hawk yesterday had
> something to do with it? I will reboot dragon later today and see if
> that makes a difference.

cups-browsed works well for many users, but can be a little temperamental.
  
> >  [...]  
> >  [...]  
> >  [...]  

[...]

> > hpm234ethernet.local?
> 
> Again, the "localdomain" is correct.

avahi-browse shows hpm234ethernet.local for the hostname.

BTW, is hpm234ethernet you setting or HP's?

-- 
Brian.



Re: CUPS on Bullseye and Bookworm

2023-05-15 Thread Charles Curley
On Mon, 15 May 2023 12:09:33 +0100
Brian  wrote:

> Useful data but an aside first:
> 
> The pdl= key lacks image/urf. HP claims AirPrint support for the
> device (URF=V1.4,...). It looks like you have been sold a pup. A
> firmware update?

I will look into that later today.

> 
> > root@dragon:~# driverless
> > ipps://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipps._tcp.local/  
> 
> This is the URI for the printer. You will need to substitute it later
> into an lpadmin command.
> 
> > root@dragon:~# lpstat -l -e
> > HP-HP-LaserJet-MFP-M232-M237 permanent
> > ipp://localhost/printers/HP-HP-LaserJet-MFP-M232-M237
> > dnssd://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipp._tcp.local/?uuid=d532fa73-f559-43ca-9f8e-1eef16972345
> > HP-HP-LaserJet-MFP-M232-M237-2 permanent
> > ipp://localhost/printers/HP-HP-LaserJet-MFP-M232-M237-2
> > ipps://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipps._tcp.local/
> > HP-LaserJet-MFP-M232-M237 permanent
> > ipp://localhost/printers/HP-LaserJet-MFP-M232-M237
> > socket://hpm234ethernet.localdomain:9100
> > HP_LaserJet_MFP_M234sdw_C0FB67 network none
> > ipps://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipps._tcp.local/
> > root@dragon:~#   
> 
> The first three entries are print queues (permanent) you have set up.
> The fourth is the printer.

Ah, OK. So can I get rid of the three queues and print directly to the
printer?

> 
> Execute
> 
>   lpadmin -p M234 -v "URI" -E -m everywhere
> 
> Test with
> 
>   lp -d M234 /etc/nsswitch.conf

root@dragon:~# lp -d M234 /etc/nsswitch.conf
lp: Error - The printer or class does not exist.
root@dragon:~# lpadmin -p M234 -v "URI" -E -m everywhere
lpadmin: Bad device-uri "URI".
root@dragon:~# lpadmin -p M234 -v 
"ipps://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipps._tcp.local/" -E -m 
everywhere
root@dragon:~# lp -d M234 /etc/nsswitch.conf
request id is M234-25 (1 file(s))
root@dragon:~# 

And that printed. And I see a new queue on dragon's
system-config-printer.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: CUPS on Bullseye and Bookworm

2023-05-15 Thread Charles Curley
On Mon, 15 May 2023 14:22:14 +0100
Brian  wrote:

> > Not that I know of.  
> 
> Blocking port 5353 (mdns) is not unknown.

True. It is open (udp) on hawk (server) and ideapc, where I am running
shorewall (iptables). dragon has firewalld, which simply shows the
service, mdns, as open, but does not indicate the protocol. 

>  
>  [...]  
> > 
> > I shut the firewall down ("systemctl stop firewalld"), ran test
> > pages. Same non-results, except that system-control-printer now
> > reports:
> > 
> > Idle - Print job canceled at printer.
> > 
> > 
> > I tried increasing the logging, which involved stopping and
> > restarting the cups service. In the process of doing that, the
> > client and server both managed to forget the printer. I
> > re-installed it. On the server, I have one instance of the printer,
> > protocol:
> > 
> > hp:/usb/HP_LaserJet_MFP_M232-M237?serial=VNB4J02590  
> 
> Consider: the printer can be discovered via mDNS/DNS-SD by all
> machines on the network. ideapc does this and hasn't any difficulty
> printing. So why set up a server when hawk will see the printer as
> ideapc does? 

Possibly just legacy habits. I'm not accustomed to this automation.


> 
> Additionally, assuming the printer provides the IPP-over-USB protocol,
> the USB queue will not work. See
> 
>   https://wiki.debian.org/CUPSDriverlessPrinting
> 
>  [...]  
> 
> The two URIs are equivalent.
> 
>  [...]  
> > 
> > implicitclass://HP_LaserJet_MFP_M234sdw_C0FB67_/  
> 
> cups-browsed has automatically set up a queue. Unless it is having an
> off-day, it should do the same on hawk and dragon.

I have no idea what's going on here. I now see such a queue on hawk but
not dragon. Possibly the fact that I rebooted hawk yesterday had
something to do with it? I will reboot dragon later today and see if
that makes a difference.

>  
>  [...]  
>  [...]  
>  [...]  
> >  
> > I tried setting up a printer manually on the non-working client.
> > 
> > ipp://hawk.localdomain/printers/HP_LaserJet_MFP_M232-M237  
> 
> hawk.local would be the correct hostname.

Nope, it's localdomain. It's all set up in DNS.

> 
> > No test page, and I got:
> > 
> > Processing - The printer may not exist or is unavailable at this
> > time.
> > 
> > However, I checked the CUPS on-line documentation, and did not find
> > any documentation on how to set up a URI, so it's possible I did
> > that incorrectly.
> > 
> > I also enabled "port 9100" printing on the printer, and went
> > directly to it:  
> 
> That had to be explicitly done?

Yes. I may have shut it off back when I first took delivery of the
printer. In any case, there is a page on the printer's web server where
one enables or disables all sorts of things.

>  
> > socket://hpm234ethernet.localdomain:9100  
> 
> hpm234ethernet.local?

Again, the "localdomain" is correct.

As mentioned in another email, I opened that port in the firewall
(doh!), and that now works.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: CUPS on Bullseye and Bookworm

2023-05-15 Thread Charles Curley
On Sun, 14 May 2023 14:04:51 -0600
Charles Curley  wrote:

> I also enabled "port 9100" printing on the printer, and went directly
> to it:
> 
> socket://hpm234ethernet.localdomain:9100
> 
> The printer spun its wheels, reported an error and stopped without
> printing. Nothing in the event log.

I solved that one. I had closed TCP port 9100. Opening that up on the
server got me running. However, that did not solve the problem for the
other two protocols.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: CUPS on Bullseye and Bookworm

2023-05-15 Thread Brian
On Sun 14 May 2023 at 14:04:51 -0600, Charles Curley wrote:

> On Sun, 14 May 2023 19:48:07 +0200
> john doe  wrote:
> 
> > On 5/14/23 19:29, Charles Curley wrote:
> >  [...]  
> > 
> > The below, is what I would try:
> > 
> > - On the non-working client, Are you restricting outbound traffic at
> > all
> 
> Not that I know of.

Blocking port 5353 (mdns) is not unknown.
 
> > or for testing  purposes can you disable the FW?
> 
> I shut the firewall down ("systemctl stop firewalld"), ran test pages.
> Same non-results, except that system-control-printer now reports:
> 
> Idle - Print job canceled at printer.
> 
> 
> I tried increasing the logging, which involved stopping and restarting
> the cups service. In the process of doing that, the client and server
> both managed to forget the printer. I re-installed it. On the server, I
> have one instance of the printer, protocol:
> 
> hp:/usb/HP_LaserJet_MFP_M232-M237?serial=VNB4J02590

Consider: the printer can be discovered via mDNS/DNS-SD by all machines
on the network. ideapc does this and hasn't any difficulty printing. So
why set up a server when hawk will see the printer as ideapc does? 

Additionally, assuming the printer provides the IPP-over-USB protocol,
the USB queue will not work. See

  https://wiki.debian.org/CUPSDriverlessPrinting

> On the non-working client, cups discovered two versions of the printer:
> 
> dnssd://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipp._tcp.local/?uuid=d532fa73-f559-43ca-9f8e-1eef16972345
> 
> ipps://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipps._tcp.local/
> 
> I have been testing both and getting the same results.

The two URIs are equivalent.

> > - How are the working clients connected to the printer (protocol
> > wise)?
> 
> implicitclass://HP_LaserJet_MFP_M234sdw_C0FB67_/

cups-browsed has automatically set up a queue. Unless it is having an off-day,
it should do the same on hawk and dragon.
 
> > - Is the non-working client using that same protocol?
> 
> Clearly not.
> 
> So I had the working client discover the printer again. It offered the
> same two as I have on the non-working client. Both printed test pages.
> 
> ipps://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipps._tcp.local/
> 
> dnssd://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipp._tcp.local/?uuid=d532fa73-f559-43ca-9f8e-1eef16972345
> 
> 
> > - If you do not use MDNS and point manually to the server, does it
> > work any better?
>  
> I tried setting up a printer manually on the non-working client.
> 
> ipp://hawk.localdomain/printers/HP_LaserJet_MFP_M232-M237

hawk.local would be the correct hostname.

> No test page, and I got:
> 
> Processing - The printer may not exist or is unavailable at this time.
> 
> However, I checked the CUPS on-line documentation, and did not find any
> documentation on how to set up a URI, so it's possible I did that
> incorrectly.
> 
> I also enabled "port 9100" printing on the printer, and went directly to
> it:

That had to be explicitly done?
 
> socket://hpm234ethernet.localdomain:9100

hpm234ethernet.local?

-- 
Brian.



Re: CUPS on Bullseye and Bookworm

2023-05-15 Thread Brian
On Sun 14 May 2023 at 20:57:23 -0600, Charles Curley wrote:

> On Sun, 14 May 2023 23:30:25 +0100
> Brian  wrote:
> 
> > On Sun 14 May 2023 at 14:04:51 -0600, Charles Curley wrote:
> 
> 
> > 
> > We take it that dragon, hawk and the printer are network connected.
> > 
> > Give what you get from dragon with
> > 
> >   avahi-browse -rt _ipp._tcp
> >   avahi-browse -rt _uscan._tcp
> >   driverless
> >   lpstat -l -e
> > 
> > avahi-browse is in the avahi-utils package.
> > 
> 
> root@dragon:~# avahi-browse -rt _ipp._tcp
> + wlp2s2 IPv4 HP LaserJet MFP M234sdw (C0FB67)  Internet Printer  
>local
> = wlp2s2 IPv4 HP LaserJet MFP M234sdw (C0FB67)  Internet Printer  
>local
>hostname = [hpm234ethernet.local]
>address = [192.168.100.134]
>port = [631]
>txt = ["mopria-certified=2.1" "mac=6c:02:e0:c0:fb:67" "usb_MDL=HP LaserJet 
> MFP M232-M237" "usb_MFG=HP" "TLS=1.2" "PaperMax=legal-A4" 
> "kind=document,envelope,photo" "UUID=d532fa73-f559-43ca-9f8e-1eef16972345" 
> "Fax=F" "Scan=T" "Duplex=T" "Color=F" "note=" 
> "adminurl=http://hpm234ethernet.local./hp/device/info_config_AirPrint.html?tab=Networking=AirPrintStatus;
>  "priority=10" "product=(HP LaserJet MFP M232-M237)" "ty=HP LaserJet MFP 
> M232-M237" "URF=V1.4,CP99,W8,OB10,PQ3-4,DM1,IS1-4,MT1-3-5,RS300-600" 
> "rp=ipp/print" 
> "pdl=application/PCLm,application/octet-stream,image/pwg-raster" "qtotal=1" 
> "txtvers=1"]

Useful data but an aside first:

The pdl= key lacks image/urf. HP claims AirPrint support for the device 
(URF=V1.4,...).
It looks like you have been sold a pup. A firmware update?

> root@dragon:~# driverless
> ipps://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipps._tcp.local/

This is the URI for the printer. You will need to substitute it later into an 
lpadmin
command.

> root@dragon:~# lpstat -l -e
> HP-HP-LaserJet-MFP-M232-M237 permanent 
> ipp://localhost/printers/HP-HP-LaserJet-MFP-M232-M237 
> dnssd://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipp._tcp.local/?uuid=d532fa73-f559-43ca-9f8e-1eef16972345
> HP-HP-LaserJet-MFP-M232-M237-2 permanent 
> ipp://localhost/printers/HP-HP-LaserJet-MFP-M232-M237-2 
> ipps://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipps._tcp.local/
> HP-LaserJet-MFP-M232-M237 permanent 
> ipp://localhost/printers/HP-LaserJet-MFP-M232-M237 
> socket://hpm234ethernet.localdomain:9100
> HP_LaserJet_MFP_M234sdw_C0FB67 network none 
> ipps://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipps._tcp.local/
> root@dragon:~# 

The first three entries are print queues (permanent) you have set up. The 
fourth is the
printer.

Execute

  lpadmin -p M234 -v "URI" -E -m everywhere

Test with

  lp -d M234 /etc/nsswitch.conf

-- 
Brian.



Re: CUPS on Bullseye and Bookworm

2023-05-14 Thread Charles Curley
On Sun, 14 May 2023 23:30:25 +0100
Brian  wrote:

> On Sun 14 May 2023 at 14:04:51 -0600, Charles Curley wrote:


> 
> We take it that dragon, hawk and the printer are network connected.
> 
> Give what you get from dragon with
> 
>   avahi-browse -rt _ipp._tcp
>   avahi-browse -rt _uscan._tcp
>   driverless
>   lpstat -l -e
> 
> avahi-browse is in the avahi-utils package.
> 

root@dragon:~# avahi-browse -rt _ipp._tcp
+ wlp2s2 IPv4 HP LaserJet MFP M234sdw (C0FB67)  Internet Printer
 local
= wlp2s2 IPv4 HP LaserJet MFP M234sdw (C0FB67)  Internet Printer
 local
   hostname = [hpm234ethernet.local]
   address = [192.168.100.134]
   port = [631]
   txt = ["mopria-certified=2.1" "mac=6c:02:e0:c0:fb:67" "usb_MDL=HP LaserJet 
MFP M232-M237" "usb_MFG=HP" "TLS=1.2" "PaperMax=legal-A4" 
"kind=document,envelope,photo" "UUID=d532fa73-f559-43ca-9f8e-1eef16972345" 
"Fax=F" "Scan=T" "Duplex=T" "Color=F" "note=" 
"adminurl=http://hpm234ethernet.local./hp/device/info_config_AirPrint.html?tab=Networking=AirPrintStatus;
 "priority=10" "product=(HP LaserJet MFP M232-M237)" "ty=HP LaserJet MFP 
M232-M237" "URF=V1.4,CP99,W8,OB10,PQ3-4,DM1,IS1-4,MT1-3-5,RS300-600" 
"rp=ipp/print" "pdl=application/PCLm,application/octet-stream,image/pwg-raster" 
"qtotal=1" "txtvers=1"]
root@dragon:~# avahi-browse -rt _uscan._tcp
+ wlp2s2 IPv4 HP LaserJet MFP M234sdw (C0FB67)  _uscan._tcp 
 local
= wlp2s2 IPv4 HP LaserJet MFP M234sdw (C0FB67)  _uscan._tcp 
 local
   hostname = [hpm234ethernet.local]
   address = [192.168.100.134]
   port = [8080]
   txt = ["mopria-certified-scan=1.3" "note=" "duplex=F" "is=platen,adf" 
"cs=color,grayscale" "pdl=application/pdf,image/jpeg" 
"uuid=d532fa73-f559-43ca-9f8e-1eef16972345" "rs=eSCL" 
"representation=http://hpm234ethernet.local./ipp/images/printer.png; 
"vers=2.63" "usb_MDL=HP LaserJet MFP M232-M237" "usb_MFG=HP" "mdl=LaserJet MFP 
M232-M237" "mfg=HP" "ty=HP LaserJet MFP M232-M237" 
"adminurl=http://hpm234ethernet.local.; "txtvers=1"]
root@dragon:~# driverless
ipps://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipps._tcp.local/
root@dragon:~# lpstat -l -e
HP-HP-LaserJet-MFP-M232-M237 permanent 
ipp://localhost/printers/HP-HP-LaserJet-MFP-M232-M237 
dnssd://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipp._tcp.local/?uuid=d532fa73-f559-43ca-9f8e-1eef16972345
HP-HP-LaserJet-MFP-M232-M237-2 permanent 
ipp://localhost/printers/HP-HP-LaserJet-MFP-M232-M237-2 
ipps://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipps._tcp.local/
HP-LaserJet-MFP-M232-M237 permanent 
ipp://localhost/printers/HP-LaserJet-MFP-M232-M237 
socket://hpm234ethernet.localdomain:9100
HP_LaserJet_MFP_M234sdw_C0FB67 network none 
ipps://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipps._tcp.local/
root@dragon:~# 




-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: CUPS on Bullseye and Bookworm

2023-05-14 Thread Brian
On Sun 14 May 2023 at 14:04:51 -0600, Charles Curley wrote:

> On Sun, 14 May 2023 19:48:07 +0200
> john doe  wrote:
> 
> > On 5/14/23 19:29, Charles Curley wrote:
> >  [...]  
> > 
> > The below, is what I would try:
> > 
> > - On the non-working client, Are you restricting outbound traffic at
> > all
> 
> Not that I know of.
> 
> > or for testing  purposes can you disable the FW?
> 
> I shut the firewall down ("systemctl stop firewalld"), ran test pages.
> Same non-results, except that system-control-printer now reports:
> 
> Idle - Print job canceled at printer.
> 
> 
> I tried increasing the logging, which involved stopping and restarting
> the cups service. In the process of doing that, the client and server
> both managed to forget the printer. I re-installed it. On the server, I
> have one instance of the printer, protocol:
> 
> hp:/usb/HP_LaserJet_MFP_M232-M237?serial=VNB4J02590
> 
> On the non-working client, cups discovered two versions of the printer:
> 
> dnssd://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipp._tcp.local/?uuid=d532fa73-f559-43ca-9f8e-1eef16972345
> 
> ipps://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipps._tcp.local/
> 
> I have been testing both and getting the same results.
> 
> > 
> > - How are the working clients connected to the printer (protocol
> > wise)?
> 
> implicitclass://HP_LaserJet_MFP_M234sdw_C0FB67_/
> 
> 
> > - Is the non-working client using that same protocol?
> 
> Clearly not.
> 
> So I had the working client discover the printer again. It offered the
> same two as I have on the non-working client. Both printed test pages.
> 
> ipps://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipps._tcp.local/
> 
> dnssd://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipp._tcp.local/?uuid=d532fa73-f559-43ca-9f8e-1eef16972345
> 
> 
> > - If you do not use MDNS and point manually to the server, does it
> > work any better?
> 
> 
> 
> I tried setting up a printer manually on the non-working client.
> 
> ipp://hawk.localdomain/printers/HP_LaserJet_MFP_M232-M237
> 
> No test page, and I got:
> 
> Processing - The printer may not exist or is unavailable at this time.
> 
> However, I checked the CUPS on-line documentation, and did not find any
> documentation on how to set up a URI, so it's possible I did that
> incorrectly.
> 
> I also enabled "port 9100" printing on the printer, and went directly to
> it:
> 
> socket://hpm234ethernet.localdomain:9100
> 
> The printer spun its wheels, reported an error and stopped without
> printing. Nothing in the event log.

We take it that dragon, hawk and the printer are network connected.

Give what you get from dragon with

  avahi-browse -rt _ipp._tcp
  avahi-browse -rt _uscan._tcp
  driverless
  lpstat -l -e

avahi-browse is in the avahi-utils package.

-- 
Brian.



Re: CUPS on Bullseye and Bookworm

2023-05-14 Thread Charles Curley
On Sun, 14 May 2023 19:48:07 +0200
john doe  wrote:

> On 5/14/23 19:29, Charles Curley wrote:
>  [...]  
> 
> The below, is what I would try:
> 
> - On the non-working client, Are you restricting outbound traffic at
> all

Not that I know of.

> or for testing  purposes can you disable the FW?

I shut the firewall down ("systemctl stop firewalld"), ran test pages.
Same non-results, except that system-control-printer now reports:

Idle - Print job canceled at printer.


I tried increasing the logging, which involved stopping and restarting
the cups service. In the process of doing that, the client and server
both managed to forget the printer. I re-installed it. On the server, I
have one instance of the printer, protocol:

hp:/usb/HP_LaserJet_MFP_M232-M237?serial=VNB4J02590

On the non-working client, cups discovered two versions of the printer:

dnssd://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipp._tcp.local/?uuid=d532fa73-f559-43ca-9f8e-1eef16972345

ipps://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipps._tcp.local/

I have been testing both and getting the same results.

> 
> - How are the working clients connected to the printer (protocol
> wise)?

implicitclass://HP_LaserJet_MFP_M234sdw_C0FB67_/


> - Is the non-working client using that same protocol?

Clearly not.

So I had the working client discover the printer again. It offered the
same two as I have on the non-working client. Both printed test pages.

ipps://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipps._tcp.local/

dnssd://HP%20LaserJet%20MFP%20M234sdw%20(C0FB67)._ipp._tcp.local/?uuid=d532fa73-f559-43ca-9f8e-1eef16972345


> - If you do not use MDNS and point manually to the server, does it
> work any better?



I tried setting up a printer manually on the non-working client.

ipp://hawk.localdomain/printers/HP_LaserJet_MFP_M232-M237

No test page, and I got:

Processing - The printer may not exist or is unavailable at this time.

However, I checked the CUPS on-line documentation, and did not find any
documentation on how to set up a URI, so it's possible I did that
incorrectly.

I also enabled "port 9100" printing on the printer, and went directly to
it:

socket://hpm234ethernet.localdomain:9100

The printer spun its wheels, reported an error and stopped without
printing. Nothing in the event log.


> 
> --
> John Doe
> 



-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: CUPS on Bullseye and Bookworm

2023-05-14 Thread john doe

On 5/14/23 19:29, Charles Curley wrote:

I have an HP HP_LaserJet_MFP_M234sdw_C0FB67_USB_, one of those modern
"no driver" multifunction printers. It works fine on Bullseye. I have
the printer hooked up via USB to a server, hawk, and it prints just
fine.

I have a client, ideapc, which sees the printer and prints to it just
fine.

I also have an ancient i386 IBM R51 running Bookworm, dragon. On dragon,
using system-config-printer, I can see the printer automagically
discovered. I can open up the queue window for the printer, and request
a test page.

Alas, I see the test page in the queue briefly. The queue window says
"processing - not connected?", then "Printer error". Then the print job
disappears, leaving no error message. (This is a change in behavior from
Bullseye. I do not like it.)

The printer does come awake and report an error when I ask for the test
page. I don't see anything in the printer's logs.

Logging on both machines shows no errors. I am running firewalld on
dragon, and did enable logging for unicast. firewalld-cmd reports the
following, among other things:

services: ipp ipp-client mdns samba-client smtp ssh



The below, is what I would try:

- On the non-working client, Are you restricting outbound traffic at all
or for testing  purposes can you disable the FW?

- How are the working clients connected to the printer (protocol wise)?
- Is the non-working client using that same protocol?
- If you do not use MDNS and point manually to the server, does it work
any better?

--
John Doe



CUPS on Bullseye and Bookworm

2023-05-14 Thread Charles Curley
I have an HP HP_LaserJet_MFP_M234sdw_C0FB67_USB_, one of those modern
"no driver" multifunction printers. It works fine on Bullseye. I have
the printer hooked up via USB to a server, hawk, and it prints just
fine.

I have a client, ideapc, which sees the printer and prints to it just
fine.

I also have an ancient i386 IBM R51 running Bookworm, dragon. On dragon,
using system-config-printer, I can see the printer automagically
discovered. I can open up the queue window for the printer, and request
a test page.

Alas, I see the test page in the queue briefly. The queue window says
"processing - not connected?", then "Printer error". Then the print job
disappears, leaving no error message. (This is a change in behavior from
Bullseye. I do not like it.)

The printer does come awake and report an error when I ask for the test
page. I don't see anything in the printer's logs.

Logging on both machines shows no errors. I am running firewalld on
dragon, and did enable logging for unicast. firewalld-cmd reports the
following, among other things:

   services: ipp ipp-client mdns samba-client smtp ssh

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/