LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   laser printer support for ARM target on linux 2.6 (http://www.linuxquestions.org/questions/linux-newbie-8/laser-printer-support-for-arm-target-on-linux-2-6-a-683094/)

chiragshah 11-13-2008 04:52 AM

laser printer support for ARM target on linux 2.6
 
hi All,
I am working on a embedded system which is having ARM processor. I want to interface laser printer to it. I have linux kernel 2.6 which is having support for only HP deskjet printers for USB interface.

How can i add support for laser jet printer drivers(Network / USB interface) in my kernel?

Waiting for a favorable reply. :):)

pinniped 11-13-2008 07:25 AM

I don't think printer drivers are actually kernel modules. There are some config settings such as CONFIG_USB_PRINTER but these drivers just enable a serial interface to the printer via USB. For printers attached to the ethernet port, you obviously need a working ethernet port, so compile the necessary drivers for the hardware on your board.

The actual printer control can be accomplished through a number of mechanisms. One of the most popular by far is ghostscript + foomatic filters + gutenprint. Since you mention HP laserjet printers, you're primarily interested in ghostscript + foomatic + hpijs driver.

What I would suggest, especially if you have a spare x86 machine, is to install a base system - no gui or other unnecessary toys. From there, get your network and USB printers of interest set up and determine the minimum software you will need to build for your ARM board to be able to get the best print quality from those printers. This is much easier than fiddling with an ARM board to figure things out, especially if that board has no keyboard and screen (do you really want to do this work on a slower computer which may have no HD storage and using a serial port?) How you configure your ARM board later on is another issue.

chiragshah 11-14-2008 12:05 AM

Quote:

Originally Posted by pinniped (Post 3340570)
I don't think printer drivers are actually kernel modules. There are some config settings such as CONFIG_USB_PRINTER but these drivers just enable a serial interface to the printer via USB. For printers attached to the ethernet port, you obviously need a working ethernet port, so compile the necessary drivers for the hardware on your board.

The actual printer control can be accomplished through a number of mechanisms. One of the most popular by far is ghostscript + foomatic filters + gutenprint. Since you mention HP laserjet printers, you're primarily interested in ghostscript + foomatic + hpijs driver.

What I would suggest, especially if you have a spare x86 machine, is to install a base system - no gui or other unnecessary toys. From there, get your network and USB printers of interest set up and determine the minimum software you will need to build for your ARM board to be able to get the best print quality from those printers. This is much easier than fiddling with an ARM board to figure things out, especially if that board has no keyboard and screen (do you really want to do this work on a slower computer which may have no HD storage and using a serial port?) How you configure your ARM board later on is another issue.



Hi pinniped,
Thanks for your prompt reply.
Actually i am confused with your sentence saying to install linux on spare x86 machine and figure out necessary software needed to support laser printer. but my doubt is, these necessary softwares needed for x86 platform are given by printer manufacturer/ redhat in form of binaries. I can not get the source code so that i can cross compile it for ARM. How can i figure our that, which softwares are necessary for me for this printer and how can i use these softwarse for ARM?

Hope i have explained my query properly.

pinniped 11-14-2008 03:52 AM

If there is no source code then you will need to ask the manufacturers about support for ARM. If you're lucky there will already be something; sometimes there is nothing and no reasonably priced solution.

chiragshah 11-14-2008 11:21 PM

Quote:

Originally Posted by pinniped (Post 3341587)
If there is no source code then you will need to ask the manufacturers about support for ARM. If you're lucky there will already be something; sometimes there is nothing and no reasonably priced solution.

I have browsed my filesystem which is shared to my board, i found all lp commands' (lpadmin, lpq, lpr etc) binaries, a .PPD file for HP laserjet printer located at "~/filesys/usr/share/cups/model/laserjet.ppd".

So i am planning to configure one of the available HP laserjet printer as my default printer through "lpadmin" and want to access Network printer through my board.

I believe that in my kernel i found CUP and .PPD file/ folder, my kernel should allow me to access this printer.

Please give comments on my approach.

pinniped 11-15-2008 12:10 AM

I can't comment much because I don't know enough of what you want to achieve. All I know is that you have an ARM board and you want to connect 'an HP printer' (whatever that may be) via an ethernet or USB port. Do you want to make a printer hub or some such device or what? Why only HP? See - I have no idea of what you're doing.

chiragshah 11-15-2008 03:16 AM

Quote:

Originally Posted by pinniped (Post 3342444)
I can't comment much because I don't know enough of what you want to achieve. All I know is that you have an ARM board and you want to connect 'an HP printer' (whatever that may be) via an ethernet or USB port. Do you want to make a printer hub or some such device or what? Why only HP? See - I have no idea of what you're doing.

Actually we are developing firmware for medical instrument. For that we need any one of the laserjet printer support for experiment. So i select HP as its easily available and popular. This product will give prints of analysis result of patient which can have images even taken by doctors while surgeries.

pinniped 11-15-2008 04:35 AM

Ah, OK. Black/white only or color? There are still so many things to look at; for example, if the ARM board's resources will allow, you may as well support the IPP protocol and PostScript printers (since GS will have to be installed to use the hpijs software anyway). For PS you only need to support a generic BW and Color printer - say 300 or 600 dpi single-side only (though for medical equipment I doubt anyone will ever use duplex printing).

How will a user configure the device to use? This may be a good job for CGI and a lightweight web server. Then again, if you have CUPS set up appropriately you don't even need to bother with CGI and a web server, and it supports IPP as well - although you could have some issues configuring through the ethernet when planning to use an ethernet printer.

Well, good luck - there's still a lot to think through and a lot to try out. CUPS would be nice, but if it takes too much space you'll have to settle for other means of managing printers.

chiragshah 11-15-2008 07:32 AM

Quote:

Originally Posted by pinniped (Post 3342587)
Ah, OK. Black/white only or color? There are still so many things to look at; for example, if the ARM board's resources will allow, you may as well support the IPP protocol and PostScript printers (since GS will have to be installed to use the hpijs software anyway). For PS you only need to support a generic BW and Color printer - say 300 or 600 dpi single-side only (though for medical equipment I doubt anyone will ever use duplex printing).

How will a user configure the device to use? This may be a good job for CGI and a lightweight web server. Then again, if you have CUPS set up appropriately you don't even need to bother with CGI and a web server, and it supports IPP as well - although you could have some issues configuring through the ethernet when planning to use an ethernet printer.

Well, good luck - there's still a lot to think through and a lot to try out. CUPS would be nice, but if it takes too much space you'll have to settle for other means of managing printers.

I am planning for color printer as we need to print patients snap of surgeries. I am planning to go with CUPs to begin with as i felt that my kernel is having support for cups. The reason behind i feel that my monta vista linux kernel is having support for cups is, i found simillar directories/ files as redhat kernel in my ARM's kernel. I also found laserprinter.ppd in my filesystem.

So, i want to ask that how can i confirm that my monta vista linux kernel is having support for cups. And how can i start my cup server on port 631? I have modified /etc/cups/cupd.conf file by adding "Listen 127.0.0.1:631" in my board's file system. But i got the message that "Unable to contact to server". So, i could not start cups server to go further.

pinniped 11-15-2008 03:10 PM

Go through your source trees and scripts and see if there is an option to build and configure CUPS. You may have to edit the scripts to start CUPS at boot time. Since you're using MontaVista Linux, you'll probably get a better response if you check out their forum.

chiragshah 11-17-2008 06:03 AM

Quote:

Originally Posted by pinniped (Post 3343062)
Go through your source trees and scripts and see if there is an option to build and configure CUPS. You may have to edit the scripts to start CUPS at boot time. Since you're using MontaVista Linux, you'll probably get a better response if you check out their forum.

Finally i was able to print .jpg image on my b/w printer. But i am not able to print simple .vi file or .txt file on same printer under same configurations. I think printer is not taking it as printable format. so it is showing in queue in reply of "lpq" command but printer is neglecting it because it is not in printable format.

My bottom line confusion is, how to print .txt or .vi files?

pinniped 11-17-2008 03:54 PM

Quote:

Originally Posted by chiragshah (Post 3344725)
My bottom line confusion is, how to print .txt or .vi files?

You need to put them through filters; the first to convert to PostScript and the second to actually print. Of course if you have a filter which can print this stuff directly to the printer without the PostScript stage that would be nice. Remember that if you're dealing with GhostScript for printing, everything must be PS or PDF for GS to be able to feed the rendered image to the printer. If you printed a raw jpg it was probably stuffed into a PS file then processed (although in principle the software can cheat and skip the PS conversion since it will only be reading out and rendering the jpg anyway).

andyew 01-22-2012 11:32 AM

How do you cross-compile Gutenprint on your ARM board? What ./configure settings you used?

I'm using iMX53 Quick Start Board and LTIB to cross-compile the Gutenprint or CUPS but get error when the building process is executing binary file (Gutenprint: ./extract-strings & CUPS: ./mantohtml). I have no idea how to suppress this. Any ideas?

Thanks alot for reading my question.


All times are GMT -5. The time now is 02:08 AM.