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? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-17-2008, 02:24 PM
|
#1
|
LQ Newbie
Registered: Jun 2008
Posts: 4
Rep:
|
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.
|
|
|
07-18-2008, 05:54 AM
|
#2
|
Member
Registered: Jun 2008
Location: Phoenix, Arizona, USA
Distribution: Slackware
Posts: 329
Rep:
|
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
|
|
|
07-18-2008, 11:26 AM
|
#3
|
LQ Newbie
Registered: Jun 2008
Posts: 4
Original Poster
Rep:
|
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.
|
|
|
07-18-2008, 11:34 AM
|
#4
|
LQ Newbie
Registered: Jun 2008
Posts: 4
Original Poster
Rep:
|
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..
|
|
|
07-21-2008, 03:35 PM
|
#5
|
LQ Newbie
Registered: Jun 2008
Posts: 4
Original Poster
Rep:
|
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.
|
|
|
07-24-2008, 09:58 AM
|
#6
|
Member
Registered: Jun 2008
Location: Phoenix, Arizona, USA
Distribution: Slackware
Posts: 329
Rep:
|
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 12:05 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|