Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 08-12-2005, 10:17 PM   #1
Registered: Jan 2005
Posts: 53

Rep: Reputation: 15
How to use Serial Port with printer

Hi ,

I want to know the printing of a text file using serial port.

I know how to do on the parallel port. I normally do with the following command...

cat <filename> | /dev/lp0

Can anybody tell me how to print on serial port.

Old 08-13-2005, 12:19 AM   #2
Jerre Cope
Registered: Oct 2003
Location: Texas (central)
Distribution: ubuntu,Slackware,knoppix
Posts: 323

Rep: Reputation: 37
You need to open the serial, then use stty to set the rs-232 parameters to match your printer. The device of your serial port will vary depending on the hardware you use. I believe the typical ports on a PC are /dev/ttyS0, /dev/ttyS1

A brute force example would be something like:
cat </dev/ttyS0 &
stty 9600 cs8 -ixon -ixoff -opost </dev/ttyS0
cat file >/dev/ttyS0
Personally, I would prefer to use CUPS and let hit deal with the serial port.
Old 08-13-2005, 01:25 AM   #3
Registered: Jan 2005
Posts: 53

Original Poster
Rep: Reputation: 15
Hi Mr. Jerre Cope,

Thanks a lot for your valuable info.

Suresh Bhat


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
linux serial port to router console port connection? frankie_fix Linux - General 3 02-26-2007 09:32 PM
Using serial port card(PCMCIA) with IPAQ running Linux, can't find ttyS0 port d2army Linux - Laptop and Netbook 0 11-12-2005 08:07 PM
Using an USB port as a standard DB9 Serial Port Lsteele Linux - Newbie 1 10-22-2005 09:48 AM
using serial port pjbii Slackware 3 09-17-2005 02:05 PM
How Do I configure a serial port printer? Maldain Mandriva 3 01-31-2005 03:35 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:44 AM.

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