Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: ordep on July 02, 2012, 04:35:32 AM

Title: Unable to Print
Post by: ordep on July 02, 2012, 04:35:32 AM
I have seemingly everything going to make my printer print, yet it refuses to do so.
In cups /localhost:631/printers the printer is set-up and shows no errors.
cupsd is started on boot, however, command:
lpq gives:
Quote
error - no default destination availabe

I followed the instructions in the Wiki to set up my printer and all worked even putting a filter wrapper
in /usr/local/etc/cups/filter/brlpdwrapperdcp285c which is needed for this Brother printer as I know from
my working Linux box.

All settings are saved and return on booting.

I am at a loss.
Title: Re: Unable to Print
Post by: Juanito on July 02, 2012, 05:26:51 AM
How is the printer connected - usb, parallel port, ipp, or?

Does the cups error log show anything interesting?
Title: Re: Unable to Print
Post by: ordep on July 02, 2012, 10:29:06 PM
My 2 printers are USB connected. Only Brother is found by cups, Epson LQ300 is not found.

error log
 E [03/Jul/2012:02:55:00 +0800] Unable to open listen socket for address [v1.::1]:631  - Address family not supported by protocol.

access log
localhost - - [03/Jul/2012:02:57:28 +0800] "POST /printers/Brother_DCP-385C HTTP/1.1" 200 463 Print-Job successful-ok

Jobs in http://localhost:631/Jobs

show completed jobs:
Brother_DCP-385C-2      Test Page       anonymous       1k      Unknown         completed at Tue Jul 3 02:57:28 2012

Then there is no printing and "lpq" gives mentioned error.
Title: Re: Unable to Print
Post by: Rich on July 02, 2012, 10:39:28 PM
Hi ordep
Quote
E [03/Jul/2012:02:55:00 +0800] Unable to open listen socket for address [v1.::1]:631  - Address family not supported by protocol.
I don't know if that is the source of your problem, but that error is being caused because the program is
trying to use IP6, which is not on your system. Installing the  IPV6  extension should make that error go away.
Title: Re: Unable to Print
Post by: ordep on July 03, 2012, 03:18:18 AM
Thanks, I installed that IPV6 and now the error is gone. In cups I gave permission to user and now command "lpq" gives:
Brother is ready, no entries.
I thought that's it. Wrong, still does not print and cups log access gives:
Quote
access.log
localhost - - [03/Jul/2012:20:03:42 +0800] "POST /printers/Brother_DCP-385C HTTP/1.1" 200 352 Create-Job successful-ok
localhost - - [03/Jul/2012:20:03:42 +0800] "POST /printers/Brother_DCP-385C HTTP/1.1" 200 294 Send-Document successful-ok

That looks the same as in my working linux box, however, nothing is being printed.

Edit: I might to add that during boot an error messge shows saying:

"/usr/local/bin/dbus-daemon no such file or directory"

After booting that file is there.
Title: Re: Unable to Print
Post by: Juanito on July 03, 2012, 05:01:16 AM
It might be useful to change the log mode to "debug" in /usr/local/etc/cupsd.conf, restart cups, try to print and see if the error log gives any more detailed information.
Title: Re: Unable to Print
Post by: ordep on July 04, 2012, 12:15:42 AM
It might be useful to change the log mode to "debug" in /usr/local/etc/cupsd.conf, restart cups, try to print and see if the error log gives any more detailed information.

This is the error log filtered for "E"

Quote
E [04/Jul/2012:11:00:20 +0800] [CGI] smbclient not found!
E [04/Jul/2012:11:00:20 +0800] [CGI] rpcclient not found!
E [04/Jul/2012:11:01:54 +0800] [CGI] smbclient not found!
E [04/Jul/2012:11:01:54 +0800] [CGI] rpcclient not found!
E [04/Jul/2012:11:05:59 +0800] [CGI] smbclient not found!
E [04/Jul/2012:11:05:59 +0800] [CGI] rpcclient not found!
E [04/Jul/2012:11:06:20 +0800] [CGI] smbclient not found!
E [04/Jul/2012:11:06:20 +0800] [CGI] rpcclient not found!
E [04/Jul/2012:11:06:34 +0800] [CGI] smbclient not found!
E [04/Jul/2012:11:06:34 +0800] [CGI] rpcclient not found!
E [04/Jul/2012:11:07:10 +0800] [CGI] smbclient not found!
E [04/Jul/2012:11:07:10 +0800] [CGI] rpcclient not found!
E [04/Jul/2012:11:09:29 +0800] [CGI] smbclient not found!
E [04/Jul/2012:11:09:29 +0800] [CGI] rpcclient not found!
E [04/Jul/2012:11:16:14 +0800] [CGI] smbclient not found!
E [04/Jul/2012:11:16:14 +0800] [CGI] rpcclient not found!

This is really the first time in my many years with Linux in a number of distros that printing fails me.
Some distros would not read my Epson LQ300 usb connection, however, putting into printers.conf
Quote
Info Epson
MakeModel Epson 24-Pin Series
DeviceURI usb://Unknown/
.....
would make it show up in cups "add printer".
Not so in TCL.


Title: Re: Unable to Print
Post by: Rich on July 04, 2012, 12:44:07 AM
Hi ordep
Those two client programs are part of samba3.tcz, which is rather large. I'm not sure why they should be
needed for a local printer connected via USB.
Quote
Edit: I might to add that during boot an error messge shows saying:

"/usr/local/bin/dbus-daemon no such file or directory"

After booting that file is there.
Try opening your  onboot.lst file and moving the  dbus.tcz  line towards the beginning of the file.
Title: Re: Unable to Print
Post by: Juanito on July 04, 2012, 02:42:03 AM
The samba and dbus errors can be ignored.

The dbus error is caused by the daemon being restarted the first time the cups daemon starts, the samba error is caused by the smb backend symlink to smbspool in the samba extension.

Probably the best way to check for a usb printer is to plug it in and enter "/usr/local/lib/cups/backend/usb". If the printer is recognised, it will give you the uri to be used with the cups browser interface.

For example:
Code: [Select]
$ /usr/local/lib/cups/backend/usb
direct usb://HP/OfficeJet%20K80?serial=ES0911401VOH "HP OfficeJet K80" "HP OfficeJet K80" "MFG:Hewlett-Packard;MDL:OfficeJet K80;CMD:MLC,PCL,PML;CLASS:PRINTER;DESCRIPTION:Hewlett-Packard OfficeJet K Series;1284.3M:f7f,f7f;1284.4DL:4d,4e,1;SERN:ES0911401VOH;VSTATUS:$HB0$NC0,ff,DN,IDLE,CUT,K0,C0,SM,NR,KP035,CP011;AiO:0;DW-PCL;" ""
..i.e. the uri is "usb://HP/OfficeJet%20K80?serial=ES0911401VOH"

For the epson, this would most likely take the form "usb://usb/xxxxxxxx"
Title: Re: Unable to Print
Post by: ordep on July 05, 2012, 05:08:52 AM

I booted from the CD with norestore so I had a clean sled. Installed the drivers for my Brother printer,
did all the jazz with cups and it just will not print or better said no paper is printed since cups claims it did print.

/usr/local/lib/cups/backend/usb finds only the Brother printer which cups has found as well.

My Epson printer is not found even when Brother printer is disconnected.

I think I have exhausted all the tricks I know to get either one of my printers printing.
I give up, spending too much time already. Never had such a bad going.

Too bad, I do like TCL :(
Title: Re: Unable to Print
Post by: Juanito on July 05, 2012, 05:18:00 AM
I'd guess the brother/epson drivers have a dependency that is not satisfied, do you have the names of the files installed?
Title: Re: Unable to Print
Post by: SamK on July 05, 2012, 06:34:44 AM
Some distros would not read my Epson LQ300...

In the past I have also had difficulty with an Epson+TC combination and found only files from openprinting.org would work.  Browsing their site for your printer reveals the following which is not very encouraging
http://www.openprinting.org/printer/Epson/Epson-LQ_300plus2
   
Title: Re: Unable to Print
Post by: Rich on July 05, 2012, 09:35:50 AM
Hi ordep
Instead of using the Epson driver, is there a generic dot matrix driver you can try?
Title: Re: Unable to Print
Post by: ordep on July 05, 2012, 11:26:08 PM
Thanks all!
It does not matter so much if I can print with my Epson as long as I can print with the Brother printer which is still not possible.
In other Linux distros  that is slacks and knoppix the device for the Epson printer is always:  DeviceURI usb://Unknown/ in printers.conf. If in a distro cups does not read the printer I copy the data into printers.conf after which it shows up in cups and I can configure the printer. In TCL it does not show-up.

I have here the access-log of one printing with Brother in KNOPPIX which gave a printed page and one with TCL which did not print anything, the printer not even giving a burb.

Quote
Knoppix access-log
localhost - - [06/Jul/2012:10:21:06 +0000] “POST /admin/ HTTP/1.1“ 200 60 - -
localhost - - [06/Jul/2012:10:21:06 +0000] “POST / HTTP/1.1“ 200 1912 CUPS-Get-Devices -
localhost - - [06/Jul/2012:10:21:06 +0000] “POST /admin/ HTTP/1.1“ 200 5329 - -
localhost - - [06/Jul/2012:10:22:52 +0000] “POST /printers/Brother_DCP-385C HTTP/1.1“ 200 21406 Print-Job successful-ok
localhost - - [06/Jul/2012:10:22:52 +0000] “POST / HTTP/1.1“ 200 341 Create-Printer-Subscription successful-ok
localhost - - [06/Jul/2012:10:23:42 +0000] “GET /admin/log/error_log HTTP/1.1“ 200 311 - -

TCL access-log
ocalhost - - [06/Jul/2012:10:50:43 +0800] "GET /admin/log/access_log HTTP/1.1" 200 133 - -
localhost - - [06/Jul/2012:10:51:08 +0800] "GET /admin/log/error_log HTTP/1.1" 200 383 - -
localhost - - [06/Jul/2012:10:52:42 +0800] "POST /printers/Brother_DCP-385C HTTP/1.1" 200 244 Create-Job successful-ok
localhost - - [06/Jul/2012:10:52:42 +0800] "POST /printers/Brother_DCP-385C HTTP/1.1" 200 175853 Send-Document successful-ok

I do not know if someone can find from this why in TCL there is no page output.
 
Title: Re: Unable to Print
Post by: Juanito on July 06, 2012, 12:55:36 AM
As mentioned previously, you're possibly missing a dep for the brother printer driver - what sort of driver is it?

Do you have ghostscript and ghostscript_common loaded?
Title: Re: Unable to Print
Post by: ordep on July 06, 2012, 09:40:35 PM
The drivers are from the Brother website.

dcp385clpr-1.1.2-2.i386.rpm
dcp385ccupswrapper-1.1.2-2.i386.rpm

They work well in other distros.

ghostscript and ghostscript_common have been loaded from the beginning when I started cups.

I have the feeling the printer is just not really detected. Like when I try to print a large file of several
pages which takes some minutes to process then "lpq" should should show that printer is active, a job number
and the size of the file to be printed. There is nothing of that sort. Command lpq immediately tells

Brother is ready
no entries

That is the print command had not been passed to the printer, if you ask me.
Title: Re: Unable to Print
Post by: Juanito on July 07, 2012, 10:48:30 AM
dcp385clpr-1.1.2-2.i386.rpm
dcp385ccupswrapper-1.1.2-2.i386.rpm

Could you list the contents of these rpm - I have the feeling that one or more of the files will have a dep that is not met.
Title: Re: Unable to Print
Post by: ordep on July 07, 2012, 08:52:32 PM
dcp385clpr-1.1.2-2.i386.rpm

Quote
drwxr-xr-x root/root         0 2012-06-15 11:11 ./
drwxr-xr-x root/root         0 2012-06-15 11:11 usr/
drwxr-xr-x root/root         0 2012-06-15 11:11 usr/bin/
-rwxr-xr-x root/root     21560 2008-10-24 21:33 usr/bin/brprintconf_dcp385c
drwxr-xr-x root/root         0 2012-06-15 11:11 usr/local/
drwxr-xr-x root/root         0 2012-06-15 11:11 usr/local/Brother/
drwxr-xr-x root/root         0 2012-06-15 11:11 usr/local/Brother/Printer/
drwxr-xr-x root/root         0 2012-06-15 11:11 usr/local/Brother/Printer/dcp385c/
drwxr-xr-x root/root         0 2012-06-15 11:11 usr/local/Brother/Printer/dcp385c/inf/
-rw-r--r-- root/root       171 2008-10-24 21:33 usr/local/Brother/Printer/dcp385c/inf/brPrintListij2
-rw-r--r-- root/root      1253 2008-10-24 21:33 usr/local/Brother/Printer/dcp385c/inf/brdcp385cfunc
-rw-r--r-- root/root       363 2008-10-24 21:33 usr/local/Brother/Printer/dcp385c/inf/brdcp385crc
-rw-r--r-- root/root    245736 2008-10-24 21:33 usr/local/Brother/Printer/dcp385c/inf/brio08ba.bcm
-rw-r--r-- root/root    491176 2008-10-24 21:33 usr/local/Brother/Printer/dcp385c/inf/brio08bb.bcm
-rw-r--r-- root/root    491176 2008-10-24 21:33 usr/local/Brother/Printer/dcp385c/inf/brio08bc.bcm
-rw-r--r-- root/root    491176 2008-10-24 21:33 usr/local/Brother/Printer/dcp385c/inf/brio08be.bcm
-rw-r--r-- root/root    245736 2008-10-24 21:33 usr/local/Brother/Printer/dcp385c/inf/brio08bf.bcm
-rw-r--r-- root/root    491176 2008-10-24 21:33 usr/local/Brother/Printer/dcp385c/inf/brio08bg.bcm
-rw-r--r-- root/root    123016 2008-10-24 21:33 usr/local/Brother/Printer/dcp385c/inf/brio08bk.bcm
-rw-r--r-- root/root       536 2008-10-24 21:33 usr/local/Brother/Printer/dcp385c/inf/paperinfij2
-rwxr-xr-x root/root      1777 2008-10-24 21:33 usr/local/Brother/Printer/dcp385c/inf/setupPrintcapij
drwxr-xr-x root/root         0 2012-06-15 11:11 usr/local/Brother/Printer/dcp385c/lpd/
-rwxr-xr-x root/root    663956 2008-10-24 21:33 usr/local/Brother/Printer/dcp385c/lpd/brdcp385cfilter
-rwxr-xr-x root/root      1978 2008-10-24 21:33 usr/local/Brother/Printer/dcp385c/lpd/filterdcp385c
-rwxr-xr-x root/root      2457 2008-10-24 21:33 usr/local/Brother/Printer/dcp385c/lpd/psconvertij2

dcp385ccupswrapper-1.1.2-2.i386.rpm

Quote
drwxr-xr-x root/root         0 2012-06-15 11:11 ./
drwxr-xr-x root/root         0 2012-06-15 11:11 usr/
drwxr-xr-x root/root         0 2012-06-15 11:11 usr/local/
drwxr-xr-x root/root         0 2012-06-15 11:11 usr/local/Brother/
drwxr-xr-x root/root         0 2012-06-15 11:11 usr/local/Brother/Printer/
drwxr-xr-x root/root         0 2012-06-15 11:11 usr/local/Brother/Printer/dcp385c/
drwxr-xr-x root/root         0 2012-06-15 11:11 usr/local/Brother/Printer/dcp385c/cupswrapper/
-rwxr-xr-x root/root     11736 2008-10-24 21:31 usr/local/Brother/Printer/dcp385c/cupswrapper/brcupsconfpt1
-rwxr-xr-x root/root     31159 2008-10-24 21:31 usr/local/Brother/Printer/dcp385c/cupswrapper/cupswrapperdcp385c
Title: Re: Unable to Print
Post by: Juanito on July 07, 2012, 11:21:37 PM
-rwxr-xr-x root/root     21560 2008-10-24 21:33 usr/bin/brprintconf_dcp385c
What does "ldd /usr/bin/brprintconf_dcp385c" give?

Quote
-rwxr-xr-x root/root     11736 2008-10-24 21:31 usr/local/Brother/Printer/dcp385c/cupswrapper/brcupsconfpt1
-rwxr-xr-x root/root     31159 2008-10-24 21:31 usr/local/Brother/Printer/dcp385c/cupswrapper/cupswrapperdcp385c
If you look at these two scripts with a text editor, what does the first line say?
Title: Re: Unable to Print
Post by: ordep on July 08, 2012, 12:50:45 AM
ldd /usr/bin/brprintconf_dcp385c
Quote
        linux-gate.so.1 =>  (0xb7735000)
        libc.so.6 => /lib/libc.so.6 (0xb761f000)
        /lib/ld-linux.so.2 (0xb7736000)

first line of cupswrapperdcp385c
Quote
printer_model="dcp385c"

brcupsconfpt1 is encoded starting with ".ELF"
Title: Re: Unable to Print
Post by: Juanito on July 08, 2012, 08:47:40 AM
brcupsconfpt1 is encoded starting with ".ELF"

OK, what does "ldd /usr/local/Brother/Printer/dcp385c/cupswrapper/brcupsconfpt1" give?
Title: Re: Unable to Print
Post by: Juanito on July 08, 2012, 07:18:35 PM
Looking at /usr/local/Brother/Printer/dcp385c/cupswrapper/cupswrapperdcp385c from dcp385clpr-1.1.2-2.i386.rpm, I see that it expects cups to be in /usr, but tinycore extensions are in /usr/local - this alone will cause things not to work.

I also checked the deb versions on the brother web site and they have the same problem.
Title: Re: Unable to Print
Post by: ordep on July 08, 2012, 07:28:15 PM
Looking at /usr/local/Brother/Printer/dcp385c/cupswrapper/cupswrapperdcp385c from dcp385clpr-1.1.2-2.i386.rpm, I see that it expects cups to be in /usr, but tinycore extensions are in /usr/local - this alone will cause things not to work.

I also checked the deb versions on the brother web site and they have the same problem.

So, is there a way around it for my Brother printer

and if not

how then can I get my Epson LQ300 make to work or better being detected by cups?



Title: Re: Unable to Print
Post by: Juanito on July 08, 2012, 07:37:18 PM
So, is there a way around it for my Brother printer
You would need to edit the various scripts by hand to point to the correct locations for the cups extension - i.e. /usr/local - and hope none of the executables have these addresses hard coded.

Quote
how then can I get my Epson LQ300 make to work or better being detected by cups?
The Epson would first need to be recognised by tinycore when it is connected to the usb port - if I understand correctly, neither dmesg nor /usr/local/lib/cups/backend/usb show it as being connected? If this is the case, then there's no hope of getting it to work until it is recognised.

If it is recognised, there seem to be several ppd files out there that should work "out of the box" with cups
Title: Re: Unable to Print
Post by: ordep on July 08, 2012, 09:44:45 PM
Thanks for your efforts and patience!

I will see what I can do. I really like TCL and woud regret not really to use it since I can't print.

May be future versions will have a solution. ;)

Regards
Title: Re: Unable to Print
Post by: ordep on July 08, 2012, 11:30:23 PM
Happy to announce that I got my Epson-LQ300 printer printing.  ;D ;D ;D

That's in TCL-4.5.5
Title: Re: Unable to Print
Post by: curaga on July 09, 2012, 05:54:50 AM
Please post what you did, for the records and future searchers.
Title: Re: Unable to Print
Post by: ordep on July 09, 2012, 10:08:14 PM
Please post what you did, for the records and future searchers.

From my working Linux box I copied again /etc/cups/printers.conf to /usr/local/etc/cups. Before that I upgraded to
TCL-4.5.5 and to Firefox-13.0.1. Opening cups Add Printer, there, suddenly was "usb://Unknown/" which is my Epson printer DeviceUri.

From my experiences in other distros it does happen that this usb://Unknown/ will not show and then suddenly it does, however,
copying printers.conf with this DeviceUri usually works. Not so earlier in TCL.

EDIT: I almost will belive that the working of my Epson printer now has something to do with the TCL version.
I installed now on my flashdrive TCL-4.5.6 and there now as well the Epson printer is detected, whereas it was not with 4.5.4.