Solved

Detect CTS

Posted on 2010-09-14
2
683 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

830 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