LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Hp Laser Jet 5Si printer connected through a serial port on RHEL 5 does not print (https://www.linuxquestions.org/questions/linux-hardware-18/hp-laser-jet-5si-printer-connected-through-a-serial-port-on-rhel-5-does-not-print-656433/)

arphias 07-17-2008 01:24 PM

Hp Laser Jet 5Si printer connected through a serial port on RHEL 5 does not print
 
Hi Guys,

I am trying to install an HP Laser Jet 5Si printer on my Red Hat linux server running RHEL 5.1. I connected the printer to the only serial port(DB-9 male) available on the back of my system. I installed the printer using cups, and selected HP Laser Jet 5Si/MX printer driver and /dev/ttyS0 port. It installed fine. But when I send a test print to the printer it does not print anything. Pinter icon, which shows print jobs says, this test page printed fine, but nothing prints on the printer.
This same printer when connected to a different server works fine, so I am sure printer is not the problem.


What I did so far.........

When I first sent a test print to the printer through CUPS, it gave me an error "/usr/lib/cups/backend/serial failed".
I changed the permissions for /dev/ttyS0 from 660 to 666, that error is gone, but still the printer does not print anything.

crw-rw-rw- 1 root uucp 4, 64 Jul 17 13:30 ttyS0
crw-rw-rw- 1 root uucp 4, 65 Jul 17 10:38 ttyS1


I tried installing the printer on ttyS1, thinking that could be the right port, still no luck with it.

I sent a file to the port directly from the command prompt to the ports /dev/ttyS0 and /dev/ttyS1, nothing printed on the printer, no response from the printer.

I disabled SELinux for a bit to test if SELINX was not blocking the port. No luck.


dmesg | grep tty
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
00:06: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:07: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A


setserial -g /dev/ttyS[01]
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3

uname -r
2.6.18-8.el5


At this point, I am really clueless. I just dont know how to get this printer to work on the serial port.


I would appreciate any help in fixing this issue.

storkus 07-18-2008 04:54 AM

Here's an idea I used years ago when I had trouble figuring out which port worked: connect a terminal with a null modem cable, or even a modem who's lights blink whenever it receives characters. Then run Minicom and try connecting to each port in turn until you get a response. Once you have that, you know which port and can go from there.

Another idea is to make sure the printer (or find yourself a line printer) is connected and then send raw data into the port (once you know its set up).

The final idea is that all of your hardware is fine but your kernel is screwed up. If you compiled your own kernel, make sure all the serial drivers are compiled in. If you didn't, or made them modules, make sure the necessary modules are loaded. I realize the module part may be along the lines of "make sure the power cord is plugged in"-style troubleshooting, but it happens to everyone.

Let us know if it works.

BTW, why are you using the serial port rather than the parallel?

Mike

arphias 07-18-2008 10:26 AM

thanks for ur response storkus.

I do not have any terminal or any modem available to test with. But I have a known good serial mouse, I shut the server down, connected the mouse to the serial port and restarted the server, mouse does not work.

I installed the printer and sent a file to the printer port by doing(I am not sure if this is what u meant by sending raw data to the printer)

cat testfile > /dev/ttyS0
cat testfile > /dev/ttyS1

no response from the printer, data light does not even blink.


This is a brand new server(DELL POWER EDGE 1900, and a fresh installation of RED HAT ENTERPRISE LINUX 5. I did not compile the kernel. I was assuming serial drivers are already compiled in to the kernel.(I could be wrong).


this server has 2 15 pin ports ( i guess these are for video terminals) and one serial ports (DB-9 male) and no parallel ports. My only choice is to connect the printer to the serial port as the pritner does not have an ethernet interface.


anyone any more suggestions please.

arphias 07-18-2008 10:34 AM

I tried this command to send a raw file to the printer


lpr -o raw -P Laser5S TESTPRIN

printer icon on the desktop which printjobs says print job completed, but nothing printed on the printer..

arphias 07-21-2008 02:35 PM

How do i check if serial port modules are loaded.
 
Hi Storkus,

How do i verify if the serial port drivers are loaded into the kernel? if the serial port drivers are not loaded, how do i load them into the kernel?

please advise.

storkus 07-24-2008 08:58 AM

Sorry I haven't replied sooner, I've been on vacation until last night and just saw your message now.

Thanks to you saying what the machine is, I looked it up and they do claim one 9 pin serial port and either one or two video ports, but this isn't clear they way they wrote it, so I'm not sure both of those 15 pin connectors are video, but at least one is.

If I remember right, the serial module is just that, serial.o (or .ko with newer kernels) and assuming it isn't compiled in you should be able to "modprobe serial" and it should work. If it's missing, either it's compiled into the kernel (unlikely, but you did say it was Red Hat Enterprise) or totally missing in which case you're going to have to do some kernel compiling. It's possible you may have to do that anyway to get some Dell-specific stuff on that server working, unless Dell sold you that software already installed (in which case everything should have been working to begin with!).

One other thing, if you load the serial module, unless you're using a program to drive it, you'll need to specify the important things like speed and DMA to the module when you load it (yes, it takes options)--I forget where, but they're documented.

Mike


All times are GMT -5. The time now is 11:43 PM.