set up buffer for serial printer

Posted on 2006-05-02
Last Modified: 2013-12-16
In early versions on Unix I could put the following lines in the /etc/rc file to slow down the flow of data to a serial printer.

sleep 3
cat </dev/tty##&
stty ctsflow ixon 9600 </dev/tty##

(were ## is the port # where the printer is connected)

In Unix 3.2 V5.01  this causes the system to lock on boot when loading print services.

Use to work on earlier versions, or am I doing something wrong?
I have slowed the baud rate to 1200 and I can print long reports, but takes forever.
I need to get the speed back without loss of data.

Question by:gmbooth
    LVL 61

    Expert Comment

    "uname -a" please.
    Printer make & model please.

    Your setting does not touch any serial buffering.

    Serial data problems are most likely caused by bad serial cable and/or connections (probably inside computer/printer casings)

    Author Comment

    Hi gheist,

    uname -a responds SCO-SV scosysv,  3.2  5.0.5 i386
    The printers are Okidata 184 turbo.

    This is a site away from me, it takes time to get answers.

    I used the okidata wiring diagram, tested cables, printers, set inittab.
    They have 16 port serial board.  

    Only long reports fail after about a page prints when set to 9600 baud.
    At 1200 everythings fine, just real slow.

    The lines of code worked in the past on this problem.

    LVL 61

    Accepted Solution

    Stting both serial and data flow control might not be so great.
    You have to determine what setting printer needs ( by asking remote site for digital photograph of printer's jumper board).

    Some printers do automatically accept up to 9600, some 38400 some 115200 bps
    Some do filter xon/xof some do not
    Some do "even" parity - sometimes even undocumented.
    Some need jumper switched for dts/cts.

    Print /etc/motd with different settings.

    i.e start with
    9600 8N1
    9600 8E1

    Does it miss characters in either mode? - make it slower if changing cable does not help
    Does it miss first characters in line beginning? - change printer
    Does it miss bits (some chars altered) ? - change cable


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
    FreeBSD on EC2 FreeBSD ( is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now