- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Direct Printing
Categories
Company
Local Language
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
Discussions
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
Community
Resources
Forums
Blogs
- 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
02-01-2008 02:47 AM
02-01-2008 02:47 AM
Direct Printing
I have configured on HP-UX 11.23 (RX 2660) printers Epson FX2190 for printing direct to mux port using cat.
The inittab looks like this:
pr4:3:respawn:/usr/sbin/getty -h tty5a4 9600
The printer is working, but when printing large files, the printer is lefting some blank pages.
Any idea?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2008 05:02 AM
02-01-2008 05:02 AM
Re: Direct Printing
I have not been working with serial printer for while ... Let us see if I remember some things
Instead of managing tty settings through inittab/getty I would do it at the "cat" level :
- getty will send a login welcome to your printer.
- unless you modify gettydefs you can't have a fine tuning of tty settings
- definitions in gettydefs are more designed for terminal (input/output devices) than for printers (output only devices)
- some doubts about flushing buffers at end of cat
- "9600" is a rotating definition that could be changed in "300".
So you could disable entry pr4 in inittab then write a littke script or a function in this way, like a dumb model :
____________________
MyCat ()
{
stty raw 9600 -parenb cs8 ixon -istrip clocal <&1 2>/dev/null
cat "$1" 2>&1
echo "\014\c" # Form Feed if needed
stty raw 9600 -parenb cs8 ixon -istrip clocal <&1 2>/dev/null # ensure buffer is flushed
}
MyCat $MyFile >/dev/tty5a4
____________________
Regards
Eric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2008 05:13 AM
02-01-2008 05:13 AM
Re: Direct Printing
Just to complement, we have done some tests and seems that the printer is getting a full buffer but HP-UX continues sending to the printer.
One of tests we've made, the printer begins printing, but at page 20 it prints a blank page and after that continues printing page 32.
Best Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2008 05:43 AM
02-01-2008 05:43 AM
Re: Direct Printing
Also, check parameters at printer side : hardware, xon/xoff, none ? On Mux side, I don't remember, you could also have parameters to adjust.
If you can't solve your problem at flowcontrol level, you can also try to lower the speed, that is HP-UX will transmit characters at a lower speed than output capacity of the printer.
Found on google that FX 2190 can write at 680 cps with 12 cpi characters. 680 cps means 5440 bit/s. So you can make a test with a lower speed : 4800 in place of 9600. I guess that if you lower the speed you will have to do it too at printer/mux side
Regards
Eric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2008 08:36 AM
02-01-2008 08:36 AM
Re: Direct Printing
What about just using lp with -v/dev/tty5a4 ?
You will still need to configure the speed and hand shake but at least you have a spooler to control it ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2008 09:38 AM
02-01-2008 09:38 AM
Re: Direct Printing
For XON/XOFF, use stty, not getty. getty expects that anything coming back from the printer is a request to login and will schedule the login program pointed to the printer, thus messing up the print job.
The lp spooler is designed to talk to serial printers such as the Epson. Just add the printer using the model script called "dumb". Then print files using lp rather than cat.
If you really want to use cat, you must first set the printer to use XON/XOFF pacing, then set the MUX port speed before printing. But stty simply opens the port, sets the speed then closes the port. Then the port drops back to 300 baud, the default speed. You must keep the port open all during the cat command. The easiest (but cimbersome) way is to start the sleep command in the background specifying the serial port as input:
# nohup sleep 40000 < /dev/tty5a4 &
Now the port is open for 40,000 seconds or about 11 hours and any stty setting will 'stick' during that period. Now set the baud rate, parity, stop bits and xon/xoff handshake:
# stty 9600 cs8 -istrip clocal ixon < /dev/tty5a4
and check the port speed to make sure it has been set correctly:
# stty < /dev/tty5a4
Now you can cat a file to the printer and it should not get any buffer overruns.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2008 03:57 AM
02-13-2008 03:57 AM
Re: Direct Printing
I work with Luciano and I would like to update some info.
The inittab looks like this:
im2:3:respawn:/etc/impsrl < /dev/tty4a2 > /dev/tty4a2
/etc/impsrl
stty 9600 opost onlcr parenb -parodd cs7 ixon ixoff -ixany -istrip clocal tab3
sleep 100000000
The printer is working, but when printing large files (eg: 1-92 pages), the printer is printing page 1-20 and skip some pages (21-49) and going to page number 50-92
Best Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2008 11:50 AM
02-13-2008 11:50 AM
Re: Direct Printing
Bill Hassell, sysadmin