Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Hello
I am a newbie to linux and drivers and I'm hoping I could get some help with a serial port question I have.
I have noticed that Linux installs TTY on all serial ports and USB ports, by default. This means evreything has to go through a TTY layer before it is passed through to the serial port. I have read a few tutorials and articles on that, and I think I understand that.
My question is, is there any possible way to not use TTY for serial port access? To send data in "RAW" mode?
The reason for this question is, if I understand the concept of TTY correctly, TTY requires a carriage return newline (\r\n) to send the data through to the serial port. Without the newline the data won't be transmitted.
This poses a major headache for my existing programs I am trying to port to Linux from other OS's. I have external devices that write to serial port without issuing newline. If the data is not actually sent out some of my existing codes will not function properly.
Can anybody help me out with understanding this and how I can actually work around this please?
When the O_NOCTTY flag is used it will not become the process's controlling terminal even if the process does not have one. As stated using CR and/or LF is not required to send serial data.
You didn't say how you were porting your application but I would not use bash script.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.