Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
driverless CUPS and Canon printer [RESOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
marinheiro
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jan 2004
Posts: 140

PostPosted: Fri Oct 15, 2021 5:27 pm    Post subject: driverless CUPS and Canon printer [RESOLVED] Reply with quote

I have a Canon PIXMA G6050. It once worked with the Canon drivers, but for some unknown reason stopped doing so. So, I'm trying to set it up with the CUPS driverless settings.

To do that I:

1. Enabled Bonjour on the printer. The single option was to give it a name, which is 'mycanon'.
2. Enable ipp on the printer. No options: enabled or disabled only

Then recompiled CUPS with the zeroconf use flag on and restarted CUPS, deleted all existing printers, and searched for new printers. The menu gives me 3 options:

Quote:
mycanon (Canon G6000 series)
Canon G6000 series (driverless) (Canon G6000 series)
Canon G6000 series 1.020 (Canon G6000 series)


The first option gives me the connection
Code:
dnssd://mycanon._ipp._tcp.local/?uuid=00000000-0000-1000-8000-001865030e5f
. I select the model as
Code:
G6000 series - IPP Everywhere
. The CUPS error log shows
Code:
[CGI] Unable to connect to \"000000774FA7.local:631\": Name or service not known


The second option gives me the connection
Code:
ipps://mycanon._ipps._tcp.local/
and I select
Code:
current make and model - IPP everywhere
, but the error message is the same.

The third option gives me the connection
Code:
socket://192.168.0.63
(this is the correct IP address). I select the driver as
Code:
Canon G6000 series, driverless, cups-filters 1.2.87(en)
and get the error:
Code:
[CGI] Unable to create PPD file: Could not poll sufficient capability info from the printer (ipps://mycanon._ipps._tcp.local/, ipps://000000774FA7.local:631/ipp/print) via IPP!
.

If with the third option I select instead the standard G6000 series driver, I get my original error that pushed me into trying to get driverless to work: after a lot of communication with the printer, getting print levels and so forth, CUPS fails to actually print with the error message
Code:
 [rastertocanonij] pstocanonij write error,32.
.

I have no idea where to go from here. I don't know where the mysterious 00000..0074A7.local address is being generated or how to override it (the ideal solution if CUPS is dropping all filters in the future), or failing that how to fix pstocanonij.

Thanks for any advice

Graham

PS lpstat -le

Code:

mycanon network none ipps://applecanonn._ipps._tcp.local/
Canon_G6000_series_1.020 permanent ipp://localhost/printers/Canon_G6000_series_1.020 socket://192.168.0.63


Last edited by marinheiro on Wed Oct 20, 2021 10:31 am; edited 1 time in total
Back to top
View user's profile Send private message
user
Apprentice
Apprentice


Joined: 08 Feb 2004
Posts: 202

PostPosted: Fri Oct 15, 2021 9:20 pm    Post subject: Reply with quote

Hi marinheiro
CUPS and sisters are always fun.

My usuable routine without "zeroconf" is one time cups printer configuation via IPP protocol.

1) verify IPP is supported and active on printer (ipptool from net-print/cups)
# ipptool -tv ipp://<printer-ip>:631/ get-printer-attributes.test
# ipptool -tv ipp://<printer-ip>:631/ get-printer-attributes-2.0.test
(not supported by printers with older IPP versions)

2) manual printer add ("everywhere" means "driverless" in CUPS terminology)
# lpadmin -E -p <desirable-cups-printer-name> -v ipp://<printer-ip>:631/binary_p1 -m everywhere
(/binary_p1 may differ by each printer manufacturer)

3) verify working CUPS printer "communication"
# lpoptions -p <desirable-cups-printer-name> -l

Then the fun with supported content formats and correct/desirable printed documents can begin.
Back to top
View user's profile Send private message
marinheiro
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jan 2004
Posts: 140

PostPosted: Sat Oct 16, 2021 12:18 pm    Post subject: Reply with quote

Thanks for the help!

Code:
 ipptool -tv ipp://<printer-ip>:631/ get-printer-attributes.test 
returns pages of stuff - all seems ok.

Code:
ipptool -tv ipp://<printer-ip>:631/ get-printer-attributes-2.0.test
returns nothing at all.

Code:
lpadmin -E -p office-printer -v ipp://<printer-ip>:631/binary_p1 -m everywhere
(with the same ip address used for ipptool) returns
Code:
 lpadmin: Unable to query printer: Not Found


Things that look relevant from the get-printer-attributes command include:
Code:

ipp-versions-supported (1setOf keyword) = 1.1,2.0
ipp-features-supported (keyword) = airprint-1.8
operations-supported (1setOf enum) = Print-Job,Validate-Job,Create-Job,Send-Document,Cancel-Job,Get-Job-Attributes,Get-Jobs,Get-Printer-Attributes,Close-Job,Identify-Printer


I tried without the binary_p1, and the lpadmin command returns silently;
Code:
lpoptions -p office-printer -l
then works. The office-printer shows up in the CUPS web interface as 'G6000 series - IPP Everywhere'. However, it always shows as 'Idle, Rejecting Jobs, Not Shared', and if I try to print a test page the log shows "Returning IPP server-error-not-accepting-jobs for Print-Job (ipp://localhost:631/printers/office-printer) from localhost". I don't know if this has anything to do with not having used 'binary_p1'.

'lpstat -p office-printer -t' gives:
Code:

printer office-printer is idle.  enabled since Sat 16 Oct 2021 12:49:48 BST
scheduler is running
no system default destination
device for office-printer: ipp://192.168.xxx.xxx:631/
office-printer not accepting requests since Sat 16 Oct 2021 12:49:48 BST -
   reason unknown


The printer itself is fine, and I can print to it from Windows (using WSD), but I can't find a way to get it to 'accept requests' over ipp. Googling mostly gives discussions about a bug in CUPS handling of error messages.

Graham
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54234
Location: 56N 3W

PostPosted: Sat Oct 16, 2021 1:26 pm    Post subject: Reply with quote

marinheiro,

Code:
lpadmin -E -p office-printer -v ipp://<printer-ip>:631/binary_p1 -m everywhere

The binary_p1 part is not a literal. It can vary from printer to printer.

You may be able to use the CUPS admin interface to find out why the printer is not accepting jobs and fix it.
Browse to localhost:631 and log in as root, so you can do admin things.

/var/log/cups/error_log may contain some hints too.

-- edit --

There is no need to hide IP address in one of the private ranges.
They are not allowed on the internet.
When you try, your ISP will silently drop such packets. They may send you a nastygram to tell you not to do that too..
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
marinheiro
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jan 2004
Posts: 140

PostPosted: Sat Oct 16, 2021 8:03 pm    Post subject: Reply with quote

Neddy


Quote:
Code:
lpadmin -E -p office-printer -v ipp://<printer-ip>:631/binary_p1 -m everywhere

The binary_p1 part is not a literal. It can vary from printer to printer.


I've got that. However, I not know what the purpose of binary_p1 or whatever text-string is equivalent for this printer is. I have tried grepping through the IPP RFCs, and not found it. I also don't know what the Canon version of it is. There is nothing I can find in the Canon documentation, and I've talked to Canon help who told me I didn't need to know about it as 'Linux doesn't use ipp'!!

Quote:
You may be able to use the CUPS admin interface to find out why the printer is not accepting jobs and fix it.
Browse to localhost:631 and log in as root, so you can do admin things.

/var/log/cups/error_log may contain some hints too.


The office-printer shows up in the CUPS web interface as 'G6000 series - IPP Everywhere'. However, it always shows as 'Idle, Rejecting Jobs, Shared'. I can't see any way to change this from the admin interface (I can pause and resume the printer, but that is independent of this problem). If I try to print a test page the log shows "Returning IPP server-error-not-accepting-jobs for Print-Job (ipp://localhost:631/printers/office-printer) from localhost". I've tried varying the log level and not got anything more helpful.

Graham
Back to top
View user's profile Send private message
marinheiro
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jan 2004
Posts: 140

PostPosted: Wed Oct 20, 2021 10:31 am    Post subject: Reply with quote

The lpadmin command to add the printer to CUPS should have been:

Quote:
lpadmin -p <printername> -E -v ipp://<ip address>/ipp/print -m everywhere


ie. instead of /binary_p1 append /ipp/print to the ip address of the printer. This string is the name of the print queue.

This works for my Canon G6050 printer, and according to https://openprinting.github.io/cups/ is actually the generic solution.

Graham
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2964
Location: Edge of marsh USA

PostPosted: Thu Oct 21, 2021 3:37 am    Post subject: Reply with quote

Amazing. I used it just now on my Samsung SL-M332ND mono laser printer and it works fine. It doesn't register the left and bottom margin as accurately as Samsung's own driver collection dated December 15, 2016, uld_V1.00.39_01.17.tar.gz. The ipp everywhere driver cuts off a bit on the left and bottom margin, which may be a non-issue in typical use.

The results of this ipadmin command appear to be identical to the results setup using the CUPS web interface via localhost:631.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
marinheiro
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jan 2004
Posts: 140

PostPosted: Thu Oct 21, 2021 8:39 am    Post subject: Reply with quote

andy

Quote:
The results of this ipadmin command appear to be identical to the results setup using the CUPS web interface via localhost:.


Though they weren't for me - see the original post in this thread. Are you using the default CUPS? OR maybe there's a difference in what the printer itself broadcasts?

Graham
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2964
Location: Edge of marsh USA

PostPosted: Thu Oct 21, 2021 3:30 pm    Post subject: Reply with quote

Graham, what do you mean by "default CUPS?" I use CUPS. I have many printers, local but mostly network. I don't have printing problems. I was just commenting on the superiority of the registration of the drivers downloaded from Samsung. That particular printer also works well with PCL and PostScript drivers.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
marinheiro
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jan 2004
Posts: 140

PostPosted: Fri Oct 22, 2021 8:54 am    Post subject: Reply with quote

Andy,

I was just wondering whether my inability to set up ipp for my printer directly from the CUPS web interface was a problem on the CUPS side or the printer side - as you got it to work from the web interface, I wondered if you might have a later version of CUPS installed direct from github, rather than the stock gentoo package, As you don't then the problem must be something specific to my printer. I guess its not all Canon printers with the problem - the G6050 seems to be an uncommon one, which may be why I couldn't find any similar error reports.

Anyway, lpadmin solves it for me so I'm happy now.

Graham
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2964
Location: Edge of marsh USA

PostPosted: Fri Oct 22, 2021 4:39 pm    Post subject: Reply with quote

Unfortunately for this thread, I'm running bog-standard, stable net-print/cups-2.3.3_p2-r2. My use flags are: X acl dbus pam ssl threads usb -debug -kerberos -selinux -static-libs -systemd -xinetd -zeroconf

I also have installed:

net-print/foomatic-db
net-print/foomatic-db-ppds
net-print/gutenprint
net-print/hplip
net-print/splix
net-print/cups-pdf
net-print/cups-filters (a dependency)

as well as the Samsung driver package noted above.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum