Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: yogi_al on November 23, 2015, 02:24:49 PM

Title: Printer on parallel port not working
Post by: yogi_al on November 23, 2015, 02:24:49 PM
Hi,

I have TC 4.7 installed on a POS and attached to it is a label/receipt printer connected locally on the parallel port.
I dont have the drivers to the printer. It is expected to print only text.
I have installed CUPS and also foomatic-rip. I used the cups webpage for adding and configuring the printer. I configured the printer as Generic and Raw types, but it wouldnt print the test page.
It did create a print job when I used the command line >lp -d test1 filename . But it wouldnt just print the file.

I have attached the "error_log" file.
It gives insecure permissions but I have given root permissions to the /usr/local/lib/cups directory but it doesnt help.
Also, have the "bad driver information file" for the cups filter, because it cant find include file pcl.h, is there some thing that Iam missing?

I also tried printing using >text2lp0 filename but this didn't work either.

Any help will be great guys, thanks in advance.
Title: Re: Printer on parallel port not working
Post by: curaga on November 24, 2015, 01:38:51 AM
The label printers I've seen always require a driver, even just for text. Are you sure yours doesn't?
Title: Re: Printer on parallel port not working
Post by: yogi_al on November 24, 2015, 07:20:08 AM
It is a Ithaca 8040 Thermal Linerless Label / Receipt Printer. They only have windows drivers. And in their manuals for this particular series they mention using windows generic text drivers. So I am assuming that the generic linux text drivers ought to work too.
At the least is it possible to use Raw to print?

Thanks.
Title: Re: Printer on parallel port not working
Post by: gerald_clark on November 24, 2015, 09:37:18 AM
To test try:
ls -l /bin > /dev/lp0

substituting the proper device for lp0.
Title: Re: Printer on parallel port not working
Post by: yogi_al on November 24, 2015, 09:45:12 AM
Thanks Gerald.

The printer is connected to lp0. When I give the command ls -l > /dev/lp0 the command prompt just waits, nothing happens.
Title: Re: Printer on parallel port not working
Post by: gerald_clark on November 24, 2015, 10:11:42 AM
If you get back a command prompt, it means the data went to the printer, but the printer did not print it.
It sounds like you are out of luck unless you can get the manufacturer to supply you with CUPS drivers.
Title: Re: Printer on parallel port not working
Post by: yogi_al on November 24, 2015, 10:35:49 AM
Well, in this case it did'nt get back to command prompt.

I also tried this command >lp -d test1 hello.txt, where test1 is the printer/device name.
It gave me "request id is test1-1 (1 file(s))"

I can see the request in the cups job queue but it doesn't print. And I get the Bad driver information file in the error_log.
Since the request is being queued up, is there a possibility for print?
Title: Re: Printer on parallel port not working
Post by: curaga on November 25, 2015, 03:08:29 AM
Since you didn't get back to the prompt, it means the data never went there. Either the printer didn't accept it or there is some issue with the cable.
Title: Re: Printer on parallel port not working
Post by: yogi_al on November 25, 2015, 12:21:29 PM
The printer was bad, got it swapped for a new one. And now everything works.
Thanks guys.
Title: Re: Printer on parallel port not working
Post by: yogi_al on December 01, 2015, 08:36:26 AM
Hi

Iam able to print directly to the parallel port and now I tried getting it to print with CUPS, but am not able to. This is a thermal label printer.
I have installed foomatic and ghostscript as well but am getting errors as mentioned in the attached file.

For the insecure permissions, I have changed the ownership to root.root, but I still get the error.
For bad driver information file, it is not able to find "pcl.h" file. I have selected the driver as a Generic text driver. And it is not a HP printer, I have installed libgs-dev to resolve this but it does'nt help. I dont think Iam moving in the right direction.

If I select Generic PostScript Printer it prints a whole lot of junk for a file that has only 2 words "Hello World".

I think the "GEneric text-only printer" should work. Any help would be great.
Title: Re: Printer on parallel port not working
Post by: curaga on December 01, 2015, 11:47:09 AM
D [01/Dec/2015:16:25:21 +0000] [Job 9] PID 10278 (/usr/local/lib/cups/filter/textonly) stopped with status 102 (No such file or directory)

That filter is in cups-filters.tcz. Try installing that.
Title: Re: Printer on parallel port not working
Post by: yogi_al on December 01, 2015, 11:51:57 AM
Hi Curaga,

I tried it already but no luck. I guess when I install cups, it automatically pulls the cups-filters as well.
Title: Re: Printer on parallel port not working
Post by: curaga on December 01, 2015, 01:51:18 PM
I see it's a bash script, try installing bash.
Title: Re: Printer on parallel port not working
Post by: yogi_al on December 02, 2015, 08:48:22 AM
Installed bash, but no luck. I still keep getting the "Bad driver information file "/usr/local/share/cups/drv/cupsfilters.drv"
It keeps looking for pcl.h file which I dont have on my device.
Title: Re: Printer on parallel port not working
Post by: Juanito on December 02, 2015, 09:33:37 AM
/usr/local/share/cups/ppdc/pcl.h is in the cups-filters extension...
Title: Re: Printer on parallel port not working
Post by: yogi_al on December 02, 2015, 09:44:47 AM
Hi Juanito,

I have TC 4.7.7 and I checked the contents of both cups.tcz and cups-filters.tcz both of them dont have the file pcl.h
Title: Re: Printer on parallel port not working
Post by: Juanito on December 02, 2015, 09:56:21 AM
Ah - sorry, I hadn't noticed that was mentioned in the first post, but the file is indeed present in the cups-filters extension in tc-6.x
Title: Re: Printer on parallel port not working
Post by: yogi_al on December 02, 2015, 11:58:34 AM
Thanks Juanito, that got me going. :) :) :)

Now Iam trying to print from a windows XP machine by connecting to this printer on TC. Add printer doesn't recognize the printer. Although I have configured the cups printer to be shared on the network. From windows Iam able to ping the device to which my printer is connected.
Has it got something to do with group permissions?
Title: Re: Printer on parallel port not working
Post by: yogi_al on December 02, 2015, 02:44:58 PM
I read Juanito's post, for printing from Windows client to Linux printers http://forum.tinycorelinux.net/index.php/topic,818.msg4872.html#msg4872

Installed and configured samba according to the post. Now on windows client I can see the printer name, on clicking it, it downloads the printer driver but after that it says Windows cant connect to Printer.
Title: Re: Printer on parallel port not working
Post by: Juanito on December 03, 2015, 05:13:16 AM
It's been a long time, but I seem to recall that the following drivers were required on the cups server so that windows machines can print to the server:
Code: [Select]
/usr/local/share/cups/drivers/cups6.inf
/usr/local/share/cups/drivers/cups6.ini
/usr/local/share/cups/drivers/cups6.ppd
/usr/local/share/cups/drivers/cupsps6.dll
/usr/local/share/cups/drivers/cupsui6.dll
/usr/local/share/cups/drivers/ps5ui.dll
/usr/local/share/cups/drivers/pscript.hlp
/usr/local/share/cups/drivers/pscript.ntf
/usr/local/share/cups/drivers/pscript5.dll

These files are present in the tc-3.x cups extension and, I suppose, could be copied for use in more recent cups extensions.

There is another option that seems to work better, see:

http://forum.tinycorelinux.net/index.php/topic,9633.msg53740.html#msg53740
Title: Re: Printer on parallel port not working
Post by: yogi_al on December 04, 2015, 09:57:42 AM
Hi Juanito,

I added the drivers on the cups server, on one windows machine when I tried to do an Add Printer it allowed me to select drivers for the printer and the printer was added, and I was able to print as well :) :). But on another windows machine, it didn't pop-up the dialog for selecting the drivers but instead gave me a "Printer driver setup error. Operation could not be completed". Any idea what this could be?

On the 2nd option that you mentioned, is that for printing from an iPhone device only ? Or would it work for windows to linux kinda scenario as well?
Title: Re: Printer on parallel port not working
Post by: Juanito on December 04, 2015, 11:04:18 AM
The second option should work on windows as well - see the second post in the thread.

Also, perhaps depending on the version of windows, if the cups uri is:
ipp://ldslnx01/printers/HPLJ4000-PS

The windows uri in the "add printer wizard" should be:
http://ldslnx01:631/printers/HPLJ4000-PS