LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-11-2008, 06:23 PM   #1
couchcommander
LQ Newbie
 
Registered: Jul 2005
Posts: 4

Rep: Reputation: 0
Background logging of /dev/ttyS0 output


Hey Guys,

Long story short I'm trying to figure out how to send minicom to the background to have it log the output from /dev/ttyS0 on boot up.

Starting it in rc.local with "&" doesn't seem to work - minicom stops logging. In fact, whenever you send minicom to the backgroup, it seems to stop logging. Works great otherwise.

I've looked into picocom and cu, however I can't seem to get them to correctly output the characters (the device its connected to uses 7 bit ASCII, but an 8 bit data path, I can't figure out how to configure that for cu and picocom).

Any suggestions would be appreciated... detailed suggestions would be excellent. This is my first foray into serial communications...

Relevant info:

CentOS 5.1 Virtual Machine with /dev/ttyS1 on the host connected to a virtual serial port (/dev/ttyS0) on the guest VM.

Connection specific info:

Baud: 1200
Data Bits: 8
Parity: None
Stop bits: 1
Flow control: Xon/Xoff
7 bit ASCII

Thanks!
 
Old 03-20-2008, 07:06 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,669

Rep: Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892Reputation: 5892
I will assume what you mean by 7 bit ASCII is that the data is 0-127 decimal and does not include the extended ASCII characters i.e. 128-255. In this case it does not matter that your serial port settings are 8 bit.

You might be able to use the cat command and write the data to a file i.e.
cat /dev/ttyS0 > filename
 
Old 03-20-2008, 11:17 PM   #3
couchcommander
LQ Newbie
 
Registered: Jul 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Hey michaelk,

Thanks for the reply. Yes, that's actually what I ended up using once I got the correct settings with stty.

I probably should have posted that....^_^
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Redirect /dev/ttyS0 input/output to tty2 Kymbo Linux - General 1 09-07-2006 10:07 AM
cat /dev/ttyS0: Input/output error lionking_x Linux - Hardware 3 01-06-2006 11:16 PM
Minicom in /dev/ttyS0 Luis GUSTAVO Linux - Software 0 07-31-2003 05:42 PM
chmod g+w /dev/ttyS0 jISV Linux - General 4 04-13-2002 06:01 PM
/dev/ttyS0 problems rbermude Linux - Software 2 06-27-2001 10:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:50 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
Open Source Consulting | Domain Registration