|
Boost Users : |
From: Zeljko Vrba (zvrba_at_[hidden])
Date: 2008-03-17 17:17:43
On Mon, Mar 17, 2008 at 04:44:29PM -0400, Hal Vaughan wrote:
>
> port using an ifstream object and to write to it, I use just plain open()
> and write() to write to the device. It's worked just fine with the RS232
>
Are you talking about open() and write() methods that belong to stream
object, or are you talking about POSIX system calls with the same name?
>
> I'm not using a buffer when I write, it goes in instantly as well. For
> some reason, though, I can't read from the serial port with just open() and
> read().
>
How does this "can't read" manifest? Does open() or read() fail (did you check
the errno in that case), does read() never return, does it return with less
data than you specified in the argument, ...? Did you set port parameters
(parity, stop bits, etc..) correctly? Did you check kernel logs for errors?
Did you use strace program to observe in real-time what is actually happening?
There are a lot of ways to narrow down "some reason" :-)
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net