Go Job Hunting at the LQ Job Marketplace
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


  Search this Thread
Old 07-17-2008, 01:24 PM   #1
LQ Newbie
Registered: Jun 2008
Posts: 4

Rep: Reputation: 0
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

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.
Old 07-18-2008, 04:54 AM   #2
Registered: Jun 2008
Posts: 320

Rep: Reputation: 49
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?

Old 07-18-2008, 10:26 AM   #3
LQ Newbie
Registered: Jun 2008
Posts: 4

Original Poster
Rep: Reputation: 0
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.
Old 07-18-2008, 10:34 AM   #4
LQ Newbie
Registered: Jun 2008
Posts: 4

Original Poster
Rep: Reputation: 0
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..
Old 07-21-2008, 02:35 PM   #5
LQ Newbie
Registered: Jun 2008
Posts: 4

Original Poster
Rep: Reputation: 0
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.
Old 07-24-2008, 08:58 AM   #6
Registered: Jun 2008
Posts: 320

Rep: Reputation: 49
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.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Lexmark c532dn color laser printer will only print in grayscale mjkelly93 Linux - Hardware 8 01-07-2008 04:02 PM
reinstalling hp laser jet printer 1320 on debian mohtasham1983 Linux - Hardware 0 06-07-2007 12:59 PM
HP Laser Jet 4 Plus - W2 Invalid Pers proeliator Debian 0 04-08-2006 09:51 AM
USB Laser jet printer interface on AT91RM9200 target with ARM Linux 2.6.x kernel vers jagan_pss Linux - Hardware 1 02-08-2006 11:46 AM

All times are GMT -5. The time now is 01:03 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration