Solved

Detect CTS

Posted on 2010-09-14
2
676 Views
Last Modified: 2012-05-10
Is there a way to detect the CTS line programmatically (linux)?
0
Comment
Question by:sjose16
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 250 total points
ID: 33677723
You can use 'ioctl()' with TIOCMGET to get the resiter's status, see http://www.easysw.com/~mike/serial/serial.html#5_1_1 ("Serial Programming Guide for POSIX Operating Systems - Getting the Control Signals")
    #include <unistd.h>

    #include <termios.h>



    int fd;

    int status;



    ioctl(fd, TIOCMGET, &status);

Open in new window

0
 
LVL 5

Expert Comment

by:greatsubash
ID: 33679698
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
This article will show, step by step, how to integrate R code into a R Sweave document
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now