WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Tinycore Parallel port printing problem  (Read 19303 times)

Offline Shyam24689

  • Newbie
  • *
  • Posts: 25
  • Programmer
Tinycore Parallel port printing problem
« on: April 30, 2013, 06:13:48 AM »
Does any one had faced Problems with printing using Tinycore over Parallel port.
I installed my printer using: lpadmin -p AMTECH -R -v parallel:/dev/lp0 -m amt_tif.ppd
And then made the printer system default using: lpadmin -d AMTECH

When i send a file to print or even a testprint it gives no output although status given is Ready to print

No errors are logged in the error_log file of cups. Please help if any one had come out through this situation using 3.0.21-tinycore.....

Thanks in advance......

aus9

  • Guest
Re: Tinycore Parallel port printing problem
« Reply #1 on: April 30, 2013, 08:01:19 AM »
Hi

sorry your first post is an error. Sorry if my next bit is telling a programmer how to suck eggs.

Juanito is current maintainer of CUPS but I am attempting to upgrade it......currently a fail.

When you get a chance, as its not clear to me, can you edit with sudo or root powers the
/usr/local/etc/cups/cupsd.conf

change to debug, then you need to restart the daemon with

Code: [Select]
sudo /usr/local/etc/init.d/cups restart

OR   --- If you can use a web browser then create a root password with

Code: [Select]
sudo passwdopen web browser to http://localhost:631/admin
click edit the file, change to debug, when you attempt to save, it must bring up the root passwd screen
--if not seen, backtrack and click on ADD printer and that should bring up the passwd dialog box

Then which ever way you used, can you upload all debug log somewhere and post a link to it.
I am not sure if your post count allows you to post a link tho.
If not pm me the link and I can broadcast it, or pm Juanito the link. but I will hang around an hour or so

good luck

EDIT

do you have the module loaded?

Code: [Select]
sudo modprobe parport
« Last Edit: April 30, 2013, 08:17:40 AM by aus9 »

Offline Shyam24689

  • Newbie
  • *
  • Posts: 25
  • Programmer
Re: Tinycore Parallel port printing problem
« Reply #2 on: May 02, 2013, 02:31:32 AM »
Hi,

First of all Thanks for ur reply

I have the parport module loaded
lsmod gives me the following result:
parport_pc             24576  1
parport                24576  3 lp,ppdev,parport_pc


Offline Shyam24689

  • Newbie
  • *
  • Posts: 25
  • Programmer
Re: Tinycore Parallel port printing problem
« Reply #3 on: May 02, 2013, 03:05:58 AM »
Hi ,

Go to the link and click sign in
Enter username: shyamchaturvedi99@yahoo.in
Password: Shyam24689

Then got to Cups error log folder. You can then have a look over the error log which is generated after changing cups.confd to debug

https://dl-web.dropbox.com/get/Cups%20Error%20log/error_log?w=AACGfK1ta87sFTk4GmmTh6jxdt2Ufk3FTvaAGQfusGKW5w

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14812
Re: Tinycore Parallel port printing problem
« Reply #4 on: May 02, 2013, 04:00:53 AM »
From the error log:
Code: [Select]
I [01/May/2013:18:49:53 +0000] [Job 2] Started backend /usr/local/lib/cups/backend/parallel (PID 8426)
...
I [01/May/2013:18:49:53 +0000] [Job 2] Printer not connected; will retry in 30 seconds...
D [01/May/2013:18:49:53 +0000] [Job 2] Set job-printer-state-message to "Printer not connected; will retry in 30 seconds...", current level=INFO
...
I [01/May/2013:18:49:54 +0000] [Job 2] Printing page 1, 96% complete...
D [01/May/2013:18:49:54 +0000] [Job 2] Set job-printer-state-message to "Printing page 1, 96% complete...", current level=INFO
D [01/May/2013:18:49:54 +0000] Discarding unused job-progress event...
D [01/May/2013:18:49:54 +0000] Discarding unused printer-state-changed event...
I [01/May/2013:18:49:54 +0000] [Job 2] Rendering completed
D [01/May/2013:18:49:54 +0000] [Job 2] Set job-printer-state-message to "Rendering completed", current level=INFO
...
D [01/May/2013:19:10:23 +0000] [CGI] python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
...
D [01/May/2013:19:10:23 +0000] [CGI] hp: error while loading shared libraries: libhpmud.so.0: cannot open shared object file: No such file or directory

It looks like cups is trying to use the parallel backend, but does not find a parallel printer - if you search the forums on "cups" and "parallel" you'll find a post where Roberts prints to a parallel printer without using cups - you could try this to see if your machine actually recognises that a parallel printer is connected to it.

What does "ldd /usr/local/lib/cups/backend/parallel" give?

Further down the error log, it looks like cups believes it has printed 96% of a document and then completed it - I take it that nothing was printed?

What printer are you using? The errors about missing libpython and libhpmud make me think that the ppd file expects hplip to be installed?

Offline Shyam24689

  • Newbie
  • *
  • Posts: 25
  • Programmer
Re: Tinycore Parallel port printing problem
« Reply #5 on: May 02, 2013, 05:11:14 AM »
"ldd /usr/local/lib/cups/backend/parallel" gives the following output
        linux-gate.so.1 =>  (0xb779a000)
        libcups.so.2 => /usr/local/lib/libcups.so.2 (0xb7754000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb7730000)
        libm.so.6 => /lib/libm.so.6 (0xb770d000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0xb76de000)
        libc.so.6 => /lib/libc.so.6 (0xb75d2000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb75c1000)
        /lib/ld-linux.so.2 (0xb779b000)

I'm using AMTECH 120 Thermal printer ,I already have hplip installed so I tried adding a symbolic link
 ln -s /usr/local/lib/libhpmud.so.0  /usr/lib/libhpmud.so.0 & ln -s /usr/local/lib/libpython2.7.so.1.0 /usr/lib/libpython2.7.so.1.0
and then restarted cups the error regarding shared object library disappeared but still no Prinitng.

Can you please provide me the link about printing to a parallel printer without using cups...?

Can you please suggest if it is the problem with tinycore Kernel not detecting parallel port or it might be a system issue? I'm using 3.0.21-tinycore

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14812
Re: Tinycore Parallel port printing problem
« Reply #6 on: May 02, 2013, 05:26:32 AM »
"ldd /usr/local/lib/cups/backend/parallel" gives the following output
        linux-gate.so.1 =>  (0xb779a000)
...
That looks OK

Quote
I'm using AMTECH 120 Thermal printer ,I already have hplip installed so I tried adding a symbolic link
 ln -s /usr/local/lib/libhpmud.so.0  /usr/lib/libhpmud.so.0 & ln -s /usr/local/lib/libpython2.7.so.1.0 /usr/lib/libpython2.7.so.1.0
and then restarted cups the error regarding shared object library disappeared but still no Prinitng.
I doubt that an Amtech printer would require hplip, which I thought was for HP printers only. Maybe you have the wrong ppd for your printer and it is that ppd that is looking for hplip.

Quote
Can you please provide me the link about printing to a parallel printer without using cups...?
From http://forum.tinycorelinux.net/index.php/topic,3373.msg17639.html#msg17639:
Quote
Because printing is not part of the base system but instead is supported by extensions.
Yes, I modprobe lp in my /opt/bootlocal.sh on the one computer that I have that still has a parallel port.

FYI In the base is a tiny script that I use for cupsless, spoolerless, direct printing of text files, i.e,. my programs and scripts, it might be useful to some

text2lp0

Of course, it only prints plain text directly to lp0
Maybe you could try using text2lp0 to print a text file to your printer? This would help identify the problem area.

Offline Shyam24689

  • Newbie
  • *
  • Posts: 25
  • Programmer
Re: Tinycore Parallel port printing problem
« Reply #7 on: May 02, 2013, 06:03:02 AM »
text2lp0 gave me the following output

/usr/bin/text2lp0: line 4: can't create /dev/lp0: Device or resource busy
/usr/bin/text2lp0: line 5: can't create /dev/lp0: Device or resource busy

Is it a real problem? even i cancelled all the print jobs sent through cups and lpr command but still it says device or resource busy....

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14812
Re: Tinycore Parallel port printing problem
« Reply #8 on: May 02, 2013, 07:14:50 AM »
It would be a good idea to reboot your machine and try the same thing without cups or any of it's deps or hplip loaded

Offline Shyam24689

  • Newbie
  • *
  • Posts: 25
  • Programmer
Re: Tinycore Parallel port printing problem
« Reply #9 on: May 02, 2013, 07:58:46 AM »
After system restart it gave no error but then tooo no print

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14812
Re: Tinycore Parallel port printing problem
« Reply #10 on: May 02, 2013, 08:12:46 AM »
I assume the "lp" module is loaded, what does "ls -l /dev/lp0" give?
« Last Edit: May 02, 2013, 08:17:12 AM by Juanito »

Offline Shyam24689

  • Newbie
  • *
  • Posts: 25
  • Programmer
Re: Tinycore Parallel port printing problem
« Reply #11 on: May 02, 2013, 08:33:40 AM »
Again i tried by rebooting and did modprobe lp & modprobe parport_pc after reboot then tried text2lp0...

but the command prompt appeared to get hanged without giving the next command cursor

Offline Shyam24689

  • Newbie
  • *
  • Posts: 25
  • Programmer
Re: Tinycore Parallel port printing problem
« Reply #12 on: May 02, 2013, 08:35:28 AM »
ls -l /dev/lp0 gave the following output
crw-rw---- 1 root staff   6, 0 May  2 17:56 /dev/lp0

aus9

  • Guest
Re: Tinycore Parallel port printing problem
« Reply #13 on: May 02, 2013, 08:59:33 AM »
Hi

Having read the link kindly supplied by Juanito I see I have mislead you on your kernel module the correct command is as follows

Code: [Select]
tc@box:~$ sudo modprobe lp
(to check)
lsmod | grep lp
lp                     12288  0
parport                24576  1 lp
usblp                  16384  0

ls -l /dev/lp0
(but I have no such beast)

Then retry your printer stuff

good luck

Offline Shyam24689

  • Newbie
  • *
  • Posts: 25
  • Programmer
Re: Tinycore Parallel port printing problem
« Reply #14 on: May 02, 2013, 11:32:29 AM »
lsmod | grep lp gives me the following output
lp            12288   0
parport    24576  3 lp,ppdev,parport_pc