Termination Character settings for serial communication??
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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!
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Rep:
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?
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
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Rep:
Quote:
Originally Posted by mmcshmi11
... 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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.