Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2003-12-06
2
Medium Priority
?
21,849 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 200 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
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…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

610 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