• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 21852
  • Last Modified:

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

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
1 Solution
Karl Heinz KremerCommented:
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.

urifAuthor Commented:
great, thanks!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now