LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 08-12-2005, 11:17 PM   #1
sureshkellemane
Member
 
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.

Thanks
 
Old 08-13-2005, 01:19 AM   #2
Jerre Cope
Member
 
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:
Code:
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, 02:25 AM   #3
sureshkellemane
Member
 
Registered: Jan 2005
Posts: 53

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

Thanks a lot for your valuable info.

Regards
Suresh Bhat
 
  


Reply


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 10: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 09:07 PM
Using an USB port as a standard DB9 Serial Port Lsteele Linux - Newbie 1 10-22-2005 10:48 AM
using serial port pjbii Slackware 3 09-17-2005 03:05 PM
How Do I configure a serial port printer? Maldain Mandriva 3 01-31-2005 04:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration