Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"connecting" on windows 11 for brother printer, CUPS for windows or Samba? #6020

Open
ashkasto opened this issue Feb 11, 2022 · 4 comments
Open

Comments

@ashkasto
Copy link

ashkasto commented Feb 11, 2022

brother hl-l2320d
I have added CUPS to a RPi zero and configured and works with printing of my android phone. But the printer is visible to windows when i first add it to CUPS and then I try to add it and stays in the connecting mode, never connects and then I cannot find it again on windows unless I delete it from CUPS and re-add it. I added samba for windows and edited it for guest = ok. Is there a place I can read up on CUPS for windows or SAMBA? thank you

@lpm-nova
Copy link

I am literally having the exact same problem. I'm even using a raspi-zero. Were you able to figure it out?

@ValdikSS
Copy link

ValdikSS commented Jan 7, 2024

Windows 11 seem to be broken in some way or another.

First of all, what works:

  1. Devices & printer → add printer → add manually
  2. Add a printer using an IP address or hostname
  3. select "Device type: IPP device" enter ipps://hostname.local:631/printers/PRINTERNAME. Notice ipps, not ipp. Replace hostname with your zeroconf hostname (avahi name), and printer name with your printer, as seen in cups web interface URL
  4. Wait for "Printer has been successfully installed" dialog. The printer may require several tens of seconds to "install" (it first is shown as "No Data" device in "devices and printers" list of old control panel, only after that becomes listed as "printer").

Now, what does not work for some reason:

  • In modern control panel, automatic discovery & add printer - everlasting "connecting...". The connection to CUPS succeeds, CUPS returns the reply to Get-Printer-Attributes, but nothing happens next.
CUPS HTTP log
D [07/Jan/2024:23:11:57 +0300] cupsdSetBusyState: newbusy="Active clients", busy="Not busy"
D [07/Jan/2024:23:11:57 +0300] [Client 71] Server address is "192.168.69.110".
D [07/Jan/2024:23:11:57 +0300] [Client 71] Accepted from 192.168.69.114:49952 (IPv4)
D [07/Jan/2024:23:11:57 +0300] [Client 71] Waiting for request.
D [07/Jan/2024:23:11:57 +0300] [Client 71] Connection now encrypted.
D [07/Jan/2024:23:11:57 +0300] [Client 71] POST /printers/LBP1120 HTTP/1.1
D [07/Jan/2024:23:11:57 +0300] cupsdSetBusyState: newbusy="Active clients", busy="Active clients"
D [07/Jan/2024:23:11:57 +0300] [Client 71] Read: status=200, state=6
D [07/Jan/2024:23:11:57 +0300] [Client 71] No authentication data provided.
D [07/Jan/2024:23:11:57 +0300] cupsdNetIFUpdate: Ignoring "lo".
D [07/Jan/2024:23:11:57 +0300] cupsdNetIFUpdate: Ignoring "ifb0".
D [07/Jan/2024:23:11:57 +0300] cupsdNetIFUpdate: Ignoring "ifb1".
D [07/Jan/2024:23:11:57 +0300] cupsdNetIFUpdate: Ignoring "tunl0".
D [07/Jan/2024:23:11:57 +0300] cupsdNetIFUpdate: Ignoring "sit0".
D [07/Jan/2024:23:11:57 +0300] cupsdNetIFUpdate: Ignoring "ip6tnl0".
D [07/Jan/2024:23:11:57 +0300] cupsdNetIFUpdate: Ignoring "rndis0".
D [07/Jan/2024:23:11:57 +0300] cupsdNetIFUpdate: Ignoring "wlan0".
D [07/Jan/2024:23:11:57 +0300] cupsdNetIFUpdate: "lo" = localhost:631
D [07/Jan/2024:23:11:57 +0300] cupsdNetIFUpdate: "rndis0" = 192.168.54.1:631
D [07/Jan/2024:23:11:57 +0300] cupsdNetIFUpdate: "wlan0" = 192.168.69.110:631
D [07/Jan/2024:23:11:57 +0300] cupsdNetIFUpdate: "lo" = localhost:631
D [07/Jan/2024:23:11:57 +0300] cupsdNetIFUpdate: "wlan0" = [v1.2a05:a403:1:c003:208:22ff:fe2a:ec2a]:631
D [07/Jan/2024:23:11:57 +0300] cupsdNetIFUpdate: "wlan0" = [v1.fd83:bd69:5c05:0:208:22ff:fe2a:ec2a]:631
D [07/Jan/2024:23:11:57 +0300] cupsdNetIFUpdate: "wlan0" = [v1.fe80::208:22ff:fe2a:ec2a+wlan0]:631
D [07/Jan/2024:23:11:57 +0300] [Client 71] 2.0 Get-Printer-Attributes 2
D [07/Jan/2024:23:11:57 +0300] Get-Printer-Attributes ipps://192.168.69.110:631/printers/lbp1120
D [07/Jan/2024:23:11:57 +0300] [Client 71] Returning IPP successful-ok for Get-Printer-Attributes (ipps://192.168.69.110:631/printers/lbp1120) from 192.168.69.114.
D [07/Jan/2024:23:11:57 +0300] [Client 71] Content-Length: 1755
D [07/Jan/2024:23:11:57 +0300] [Client 71] cupsdSendHeader: code=200, type="application/ipp", auth_type=0
D [07/Jan/2024:23:11:57 +0300] [Client 71] con->http=0xb7cfa108
D [07/Jan/2024:23:11:57 +0300] [Client 71] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, data_remaining=1755, response=0xb7d023e8(IPP_STATE_DATA), pipe_pid=0, file=-1
D [07/Jan/2024:23:11:57 +0300] [Client 71] Writing IPP response, ipp_state=IPP_STATE_DATA, old wused=0, new wused=0
D [07/Jan/2024:23:11:57 +0300] [Client 71] bytes=0, http_state=0, data_remaining=1755

==> error_log <==
D [07/Jan/2024:23:11:57 +0300] [Client 71] Flushing write buffer.
D [07/Jan/2024:23:11:57 +0300] [Client 71] New state is HTTP_STATE_WAITING
D [07/Jan/2024:23:11:57 +0300] [Client 71] Waiting for request.
D [07/Jan/2024:23:11:57 +0300] [Client 71] Closing because Keep-Alive is disabled.
D [07/Jan/2024:23:11:57 +0300] [Client 71] Closing connection.
D [07/Jan/2024:23:11:57 +0300] cupsdSetBusyState: newbusy="Not busy", busy="Active clients"
D [07/Jan/2024:23:11:57 +0300] [Client 71] Waiting for socket close.
D [07/Jan/2024:23:11:57 +0300] [Client 71] HTTP_STATE_WAITING Closing for error 32 (Broken pipe)
D [07/Jan/2024:23:11:57 +0300] [Client 71] Closing connection.
D [07/Jan/2024:23:11:57 +0300] cupsdSetBusyState: newbusy="Not busy", busy="Not busy"
  • Adding printer manually via "Select a shared printer by name" → http://hostname.local:631/printers/printername: the connection to the server succeeds, but on Windows: "Can't add printer, error 0x00002ef3"
CUPS HTTP log
D [07/Jan/2024:23:14:18 +0300] cupsdSetBusyState: newbusy="Active clients", busy="Not busy"
D [07/Jan/2024:23:14:18 +0300] [Client 75] Server address is "192.168.69.110".
D [07/Jan/2024:23:14:18 +0300] [Client 75] Accepted from 192.168.69.114:49978 (IPv4)
D [07/Jan/2024:23:14:18 +0300] [Client 75] Waiting for request.
D [07/Jan/2024:23:14:18 +0300] [Client 75] POST /printers/LBP1120 HTTP/1.1
D [07/Jan/2024:23:14:18 +0300] cupsdSetBusyState: newbusy="Active clients", busy="Active clients"
D [07/Jan/2024:23:14:18 +0300] [Client 75] Read: status=200, state=6
D [07/Jan/2024:23:14:18 +0300] [Client 75] No authentication data provided.
D [07/Jan/2024:23:14:18 +0300] cupsdNetIFUpdate: Ignoring "lo".
D [07/Jan/2024:23:14:18 +0300] cupsdNetIFUpdate: Ignoring "ifb0".
D [07/Jan/2024:23:14:18 +0300] cupsdNetIFUpdate: Ignoring "ifb1".
D [07/Jan/2024:23:14:18 +0300] cupsdNetIFUpdate: Ignoring "tunl0".
D [07/Jan/2024:23:14:18 +0300] cupsdNetIFUpdate: Ignoring "sit0".
D [07/Jan/2024:23:14:18 +0300] cupsdNetIFUpdate: Ignoring "ip6tnl0".
D [07/Jan/2024:23:14:18 +0300] cupsdNetIFUpdate: Ignoring "rndis0".
D [07/Jan/2024:23:14:18 +0300] cupsdNetIFUpdate: Ignoring "wlan0".
D [07/Jan/2024:23:14:18 +0300] cupsdNetIFUpdate: "lo" = localhost:631
D [07/Jan/2024:23:14:18 +0300] cupsdNetIFUpdate: "rndis0" = 192.168.54.1:631
D [07/Jan/2024:23:14:18 +0300] cupsdNetIFUpdate: "wlan0" = 192.168.69.110:631
D [07/Jan/2024:23:14:18 +0300] cupsdNetIFUpdate: "lo" = localhost:631
D [07/Jan/2024:23:14:18 +0300] cupsdNetIFUpdate: "wlan0" = [v1.2a05:a403:1:c003:208:22ff:fe2a:ec2a]:631
D [07/Jan/2024:23:14:18 +0300] cupsdNetIFUpdate: "wlan0" = [v1.fd83:bd69:5c05:0:208:22ff:fe2a:ec2a]:631
D [07/Jan/2024:23:14:18 +0300] cupsdNetIFUpdate: "wlan0" = [v1.fe80::208:22ff:fe2a:ec2a+wlan0]:631
D [07/Jan/2024:23:14:18 +0300] [Client 75] Read: status=100, state=6
D [07/Jan/2024:23:14:18 +0300] [Client 75] Read: status=100, state=6
D [07/Jan/2024:23:14:18 +0300] [Client 75] Read: status=100, state=6
D [07/Jan/2024:23:14:18 +0300] [Client 75] Read: status=100, state=6
D [07/Jan/2024:23:14:18 +0300] [Client 75] Read: status=100, state=6
D [07/Jan/2024:23:14:18 +0300] [Client 75] 1.0 Get-Printer-Attributes 11
D [07/Jan/2024:23:14:18 +0300] Get-Printer-Attributes http://uowprint.local:631/printers/LBP1120
D [07/Jan/2024:23:14:18 +0300] [Client 75] Returning IPP successful-ok for Get-Printer-Attributes (http://uowprint.local:631/printers/LBP1120) from 192.168.69.114.
D [07/Jan/2024:23:14:18 +0300] [Client 75] Content-Length: 8339
D [07/Jan/2024:23:14:18 +0300] [Client 75] cupsdSendHeader: code=200, type="application/ipp", auth_type=0
D [07/Jan/2024:23:14:18 +0300] [Client 75] con->http=0xb7cfe378
D [07/Jan/2024:23:14:18 +0300] [Client 75] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, data_remaining=8339, response=0xb7d155e8(IPP_STATE_DATA), pipe_pid=0, file=-1
D [07/Jan/2024:23:14:18 +0300] [Client 75] Writing IPP response, ipp_state=IPP_STATE_DATA, old wused=0, new wused=0
D [07/Jan/2024:23:14:18 +0300] [Client 75] bytes=0, http_state=0, data_remaining=8339

==> access_log <==
192.168.69.114 - - [07/Jan/2024:23:14:18 +0300] "POST /printers/LBP1120 HTTP/1.1" 200 133 Get-Printer-Attributes successful-ok

==> error_log <==
D [07/Jan/2024:23:14:18 +0300] [Client 75] Flushing write buffer.
D [07/Jan/2024:23:14:18 +0300] [Client 75] New state is HTTP_STATE_WAITING
D [07/Jan/2024:23:14:18 +0300] [Client 75] Waiting for request.
D [07/Jan/2024:23:14:18 +0300] cupsdSetBusyState: newbusy="Not busy", busy="Active clients"
  • Add printer manually via "Select a shared printer by name" → http://192.168.69.110:631/printers/printername (IPv4 address instead of hostname), everything ok (driver selection dialog appears).
CUPS HTTP log
D [07/Jan/2024:23:17:31 +0300] cupsdSetBusyState: newbusy="Active clients", busy="Not busy"
D [07/Jan/2024:23:17:31 +0300] [Client 78] Server address is "192.168.69.110".
D [07/Jan/2024:23:17:31 +0300] [Client 78] Accepted from 192.168.69.114:49990 (IPv4)
D [07/Jan/2024:23:17:31 +0300] [Client 78] Waiting for request.
D [07/Jan/2024:23:17:31 +0300] [Client 78] POST /printers/LBP1120 HTTP/1.1
D [07/Jan/2024:23:17:31 +0300] cupsdSetBusyState: newbusy="Active clients", busy="Active clients"
D [07/Jan/2024:23:17:31 +0300] [Client 78] Read: status=200, state=6
D [07/Jan/2024:23:17:31 +0300] [Client 78] No authentication data provided.
D [07/Jan/2024:23:17:31 +0300] [Client 78] 1.0 Get-Printer-Attributes 11
D [07/Jan/2024:23:17:31 +0300] Get-Printer-Attributes http://192.168.69.110:631/printers/LBP1120
D [07/Jan/2024:23:17:31 +0300] [Client 78] Returning IPP successful-ok for Get-Printer-Attributes (http://192.168.69.110:631/printers/LBP1120) from 192.168.69.114.
D [07/Jan/2024:23:17:31 +0300] [Client 78] Content-Length: 8339
D [07/Jan/2024:23:17:31 +0300] [Client 78] cupsdSendHeader: code=200, type="application/ipp", auth_type=0
D [07/Jan/2024:23:17:31 +0300] [Client 78] con->http=0xb7d1c3d8
D [07/Jan/2024:23:17:31 +0300] [Client 78] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, data_remaining=8339, response=0xb7d02758(IPP_STATE_DATA), pipe_pid=0, file=-1
D [07/Jan/2024:23:17:31 +0300] [Client 78] Writing IPP response, ipp_state=IPP_STATE_DATA, old wused=0, new wused=0
D [07/Jan/2024:23:17:31 +0300] [Client 78] bytes=0, http_state=0, data_remaining=8339
D [07/Jan/2024:23:17:31 +0300] [Client 78] Flushing write buffer.
D [07/Jan/2024:23:17:31 +0300] [Client 78] New state is HTTP_STATE_WAITING
D [07/Jan/2024:23:17:31 +0300] [Client 78] Waiting for request.
D [07/Jan/2024:23:17:31 +0300] cupsdSetBusyState: newbusy="Not busy", busy="Active clients"

==> access_log <==
192.168.69.114 - - [07/Jan/2024:23:17:31 +0300] "POST /printers/LBP1120 HTTP/1.1" 200 133 Get-Printer-Attributes successful-ok

==> error_log <==
D [07/Jan/2024:23:17:31 +0300] cupsdSetBusyState: newbusy="Active clients", busy="Not busy"
D [07/Jan/2024:23:17:31 +0300] [Client 79] Server address is "192.168.69.110".
D [07/Jan/2024:23:17:31 +0300] [Client 79] Accepted from 192.168.69.114:49991 (IPv4)
D [07/Jan/2024:23:17:31 +0300] [Client 79] Waiting for request.
D [07/Jan/2024:23:17:31 +0300] [Client 79] POST /printers/LBP1120 HTTP/1.1
D [07/Jan/2024:23:17:31 +0300] cupsdSetBusyState: newbusy="Active clients", busy="Active clients"
D [07/Jan/2024:23:17:31 +0300] [Client 79] Read: status=200, state=6
D [07/Jan/2024:23:17:31 +0300] [Client 79] No authentication data provided.
D [07/Jan/2024:23:17:31 +0300] [Client 79] 1.0 Get-Printer-Attributes 11
D [07/Jan/2024:23:17:31 +0300] Get-Printer-Attributes http://192.168.69.110:631/printers/LBP1120
D [07/Jan/2024:23:17:31 +0300] [Client 79] Returning IPP successful-ok for Get-Printer-Attributes (http://192.168.69.110:631/printers/LBP1120) from 192.168.69.114.
D [07/Jan/2024:23:17:31 +0300] [Client 79] Content-Length: 8339
D [07/Jan/2024:23:17:31 +0300] [Client 79] cupsdSendHeader: code=200, type="application/ipp", auth_type=0
D [07/Jan/2024:23:17:31 +0300] [Client 79] con->http=0xb7d1f988
D [07/Jan/2024:23:17:31 +0300] [Client 79] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, data_remaining=8339, response=0xb7c7d518(IPP_STATE_DATA), pipe_pid=0, file=-1
D [07/Jan/2024:23:17:31 +0300] [Client 79] Writing IPP response, ipp_state=IPP_STATE_DATA, old wused=0, new wused=0
D [07/Jan/2024:23:17:31 +0300] [Client 79] bytes=0, http_state=0, data_remaining=8339

==> access_log <==
192.168.69.114 - - [07/Jan/2024:23:17:31 +0300] "POST /printers/LBP1120 HTTP/1.1" 200 133 Get-Printer-Attributes successful-ok

==> error_log <==
D [07/Jan/2024:23:17:31 +0300] [Client 79] Flushing write buffer.
D [07/Jan/2024:23:17:31 +0300] [Client 79] New state is HTTP_STATE_WAITING
D [07/Jan/2024:23:17:31 +0300] [Client 79] Waiting for request.
D [07/Jan/2024:23:17:31 +0300] cupsdSetBusyState: newbusy="Not busy", busy="Active clients"
  • Adding printer manually via "Add a printer using an IP address or hostname", "Device type: IPP device", ipp://192.168.69.110:631/printers/printername (plain ipp without s) (or by uowprint.local domain): 'Printer "printername" been successfully installed' (or sometimes 'Printer "" been successfully installed' with empty printer name) dialog, the printer flashes for a second in the installed list but then disappears forever.

  • In old control panel → printers → add printer → add automatically discovered printer. The installation succeeds, but the printer is always listed as "unknown device" and does not switch to "printer".

That's all with OpenPrinting (not Apple) CUPS 2.4.2.

@ValdikSS
Copy link

ValdikSS commented Jan 8, 2024

I found the issue: Windows 11 incorrectly handles integers in media-source-supported IPP field, which is controlled by InputSlot parameter in .ppd file.

Does NOT work (media-source-supported = 0)

*OpenUI *InputSlot/Paper Source: PickOne
*DefaultInputSlot: 0
*InputSlot 0/Auto : ""
*CloseUI: *InputSlot

Works fine (media-source-supported = auto)

*OpenUI *InputSlot/Paper Source: PickOne
*DefaultInputSlot: auto
*InputSlot auto/Auto : ""
*CloseUI: *InputSlot

Check your /etc/cups/ppd/ .ppd file whether it contains similar construction.

@mimik13
Copy link

mimik13 commented Sep 3, 2024

Windows 11 seem to be broken in some way or another.

First of all, what works:

1. Devices & printer → add printer → add manually

2. Add a printer using an IP address or hostname

3. select "Device type: IPP device" enter `ipps://hostname.local:631/printers/PRINTERNAME`. Notice `ipps`, not `ipp`. Replace `hostname` with your zeroconf hostname (avahi name), and printer name with your printer, as seen in cups web interface URL

4. Wait for "Printer has been successfully installed" dialog. The printer may require several tens of seconds to "install" (it first is shown as "No Data" device in "devices and printers" list of old control panel, only after that becomes listed as "printer").

Now, what does not work for some reason:

* In modern control panel, automatic discovery & add printer - everlasting "connecting...". The connection to CUPS succeeds, CUPS returns the reply to `Get-Printer-Attributes`, but nothing happens next.

CUPS HTTP log

* Adding printer manually via "Select a shared printer by name" → `http://hostname.local:631/printers/printername`: the connection to the server succeeds, but on Windows: "**Can't add printer, error 0x00002ef3**"

CUPS HTTP log

* Add printer manually via "Select a shared printer by name" → `http://192.168.69.110:631/printers/printername` (IPv4 address instead of hostname), everything ok (driver selection dialog appears).

CUPS HTTP log

* Adding printer manually via "Add a printer using an IP address or hostname", "Device type: IPP device", `ipp://192.168.69.110:631/printers/printername` (plain ipp without `s`) (or by uowprint.local domain): 'Printer "printername" been successfully installed' (or sometimes 'Printer "" been successfully installed' with empty printer name) dialog, the printer flashes for a second in the installed list **but then disappears forever**.

* In old control panel → printers → add printer → add automatically discovered printer. The installation succeeds, but the printer is always listed as "unknown device" and does not switch to "printer".

That's all with OpenPrinting (not Apple) CUPS 2.4.2.

This worked for me on Windows 11. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants