LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-24-2008, 11:33 PM   #1
mmcshmi11
LQ Newbie
 
Registered: Jun 2008
Posts: 9

Rep: Reputation: 0
Termination Character settings for serial communication??


Hey everyone! This is my first time posting here, thanks for having me!

I'm trying to write a few drivers for serial communication via rs232 in Red Hat Linux using basic unix commands. The only thing left for me (I think) is to figure out a way to either enable/disable a termination character, and also how to set what character it is if enabled.

Is there a way to do this? I've read the Serial Programming Guide for POSIX OSs and the HOWTOs, but I couldn't find it. Any help is GREATLY appreciated!
 
Old 06-26-2008, 01:45 AM   #2
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
Since no experts are coming forth I'll give it my best shot (being no expert myself). Enabling a termination character or not is a question of the flow of instructions as you'll be aware. As to the character itself, I don't get the problem. Define it in hex and send it to the device. Or where exactly is the problem?
 
Old 06-26-2008, 12:21 PM   #3
mmcshmi11
LQ Newbie
 
Registered: Jun 2008
Posts: 9

Original Poster
Rep: Reputation: 0
It seems like there isn't an easy way to change the character and instead Software Control flow just needs to be setup. HEX 11 and 12 are the device control characters (DC1 and DC2) and are used when you turn on IXON,IXOFF,IXANY. I think my task to 'set' the termination character just doesn't make sense. Thanks for the help
 
Old 06-27-2008, 01:37 AM   #4
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
Quote:
Originally Posted by mmcshmi11 View Post
... I think my task to 'set' the termination character just doesn't make sense...
Well, lets think this through and see, whether I understood correctly.

The termination character is used to terminate either a message / byte-stream during an exchange or it terminates the connection (dunno). It will be interpreted by the software of the receiving site (hardware would be too specialized).

If so, the receiving software would have to be changed too, so that it can understand the new termination character. Alternatively it could be programmed (e.g. with an escape sequence) to change its termination character by command from the sender.

Is that your setup?

If so, the task would make sense again...
 
Old 06-30-2008, 11:07 AM   #5
mmcshmi11
LQ Newbie
 
Registered: Jun 2008
Posts: 9

Original Poster
Rep: Reputation: 0
I'm re-writing a driver that was already made, in it there is a function that opens a port and sets it up. The function has 2 parameters to enable/disable a termination character and to choose the actual character. I'm actually not sure if the termination character is to end communication totally or what. Since I am only writing the driver that sets up the port, I thought that there would be a setting for the termination character, but there's not really. If both sides of the software have to be changed to agree on the character than I don't think I need to be messing with it
 
  


Reply



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
rs232 serial termination character? mmcshmi11 Linux - Software 0 06-24-2008 11:19 AM
Serial Communication freeindy Programming 2 04-04-2007 08:24 AM
How to simulate incoming character in serial communication? Stor_G Programming 7 09-01-2004 02:22 AM
serial port communication vidyaraj Linux - Software 6 03-02-2004 06:46 PM
Serial communication - minicom sg3 Linux - Networking 0 07-17-2003 12:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 09:04 PM.

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