- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Serial Printer Setup?
Operating System - HP-UX
1822320
Members
5638
Online
109642
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-11-2007 05:38 AM
тАО03-11-2007 05:38 AM
Serial Printer Setup?
I've been tasked with setting up a backup label printer for our shipping department. I was able to locate one of our old Intermec printers that can do the job, but unfortunately it's only got a serial port.
I'd like to hang this printer off of one of our HP-UX boxes so that our manufacturing system can print to it without me having to find some kind of serial-to-ethernet converter to set up a print queue.
I have the printer set on the primary serial port (COM1) using the recommended serial cable, which, when connected to my laptop, works just fine. I've configured the printer with what I assume is UNIX's standard 96008N1 but it doesn't seem to work, so I have to assume there's a setting problem. Putting the printer into its debug mode (where sent characters will print with their corresponding ASCII value) yields '0's rather than the sent characters. Again, sounds like communications problem to me.
Now, I've never had to dabble with serial communication settings in UNIX much, so my knowledge is quite minimal. And unfortunately the internet is especially unhelpful, as it seems no one does serial printers anymore, and all of the other "serial+unix" documentation I find talks about setting up serial consoles, something I don't want or care about in this case.
So I was hoping someone could point out to me how to set up the serial port properly, as there seems to be much confusion on my part as to how to get this done. Once I'm talking to the printer properly using the /dev/tty0p0 device using echo, I think I can get the LP side of things set up.
So if anyone could give me a brain dead primer on how to configure a serial port under HP-UX, I'd be much obliged.
Thanks!
I'd like to hang this printer off of one of our HP-UX boxes so that our manufacturing system can print to it without me having to find some kind of serial-to-ethernet converter to set up a print queue.
I have the printer set on the primary serial port (COM1) using the recommended serial cable, which, when connected to my laptop, works just fine. I've configured the printer with what I assume is UNIX's standard 96008N1 but it doesn't seem to work, so I have to assume there's a setting problem. Putting the printer into its debug mode (where sent characters will print with their corresponding ASCII value) yields '0's rather than the sent characters. Again, sounds like communications problem to me.
Now, I've never had to dabble with serial communication settings in UNIX much, so my knowledge is quite minimal. And unfortunately the internet is especially unhelpful, as it seems no one does serial printers anymore, and all of the other "serial+unix" documentation I find talks about setting up serial consoles, something I don't want or care about in this case.
So I was hoping someone could point out to me how to set up the serial port properly, as there seems to be much confusion on my part as to how to get this done. Once I'm talking to the printer properly using the /dev/tty0p0 device using echo, I think I can get the LP side of things set up.
So if anyone could give me a brain dead primer on how to configure a serial port under HP-UX, I'd be much obliged.
Thanks!
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-11-2007 06:02 AM
тАО03-11-2007 06:02 AM
Re: Serial Printer Setup?
> what I assume is UNIX's standard 96008N1
HP-UX standard is 300 baud, odd parity, 2 stop bits. The problem is that using stty to set the comm values lasts only long enough to issue the stty command. Once the port is closed by stty, the default settings come back. Do something like this:
sleep 9999 < /dev/tty0p0 &
stty raw BBBB -parenb cs8 ixon -istrip clocal < /dev/tty0p0
Now you should be able to use ux2dos (required) to print to the printer as in:
ux2dos /etc/fstab > /dev/tty0p0
This will verify the connection. Like the PC, you must use a printer serial cqabloe and not a modem serial cable (which is incompatible). Then when the printer is working, just add the printer using sam and the "dumb" model script. After adding the printer, cd to the /etc/lp/interface directory and edit the printer's script -- uncomment the stty commands at thye top and bottom of the script.
Bill Hassell, sysadmin
HP-UX standard is 300 baud, odd parity, 2 stop bits. The problem is that using stty to set the comm values lasts only long enough to issue the stty command. Once the port is closed by stty, the default settings come back. Do something like this:
sleep 9999 < /dev/tty0p0 &
stty raw BBBB -parenb cs8 ixon -istrip clocal < /dev/tty0p0
Now you should be able to use ux2dos (required) to print to the printer as in:
ux2dos /etc/fstab > /dev/tty0p0
This will verify the connection. Like the PC, you must use a printer serial cqabloe and not a modem serial cable (which is incompatible). Then when the printer is working, just add the printer using sam and the "dumb" model script. After adding the printer, cd to the /etc/lp/interface directory and edit the printer's script -- uncomment the stty commands at thye top and bottom of the script.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2007 10:29 AM
тАО03-12-2007 10:29 AM
Re: Serial Printer Setup?
Thanks Bill, your stty command helped me out.
It turns out that in my printer definition I originally set up (in /var/spool/lp/model, btw) I had neglected to remove the default "/dev/null" port description for the serial printer. So, had I actually read ALL of the script, I would have gotten it working from the get-go.
Thanks for your help!
It turns out that in my printer definition I originally set up (in /var/spool/lp/model, btw) I had neglected to remove the default "/dev/null" port description for the serial printer. So, had I actually read ALL of the script, I would have gotten it working from the get-go.
Thanks for your help!
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP