Solved

reading and writing to a serial port thru C or C++

Posted on 2003-12-06
2
21,839 Views
Last Modified: 2011-08-18
i'm currently trying to read and write a stream of either integers or chars into a device plugged in a serial port.
i know that linux has a device for it under /dev

i tried using the standard open() to open that device but it doesn't seem to be doing anything.
my question is, how do you communicate with a serial port?

any snippet will be of great help,

thanks in advance, i really appreciate any help
0
Comment
Question by:urif
2 Comments
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 50 total points
ID: 9891779
The best source of information is the "Serial Programming HOWTO" (e.g. at http://en.tldp.org/HOWTO/Serial-Programming-HOWTO/)

The serial port test program you can find at http://www.comptechdoc.org/os/linux/programming/c/linux_pgcserial.html demonstrates how to use the serial port.

0
 

Author Comment

by:urif
ID: 9891865
great, thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
partition customisation for kickstart file 2 92
Boot Linux vm into a menu system 2 82
how to run a command as a nologin user 7 319
Understanding curl command 1 50
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…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

862 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

30 Experts available now in Live!

Get 1:1 Help Now