This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

reading data from serial port in linux

Dear All,

I am trying to write and read to and from serial port for SBC (ARM9) board in linux able to write data successfully but while reading data from device need carriage return....

if any one have worked on this let us discuss here..

Parents Reply Children
  • I don't know much about this. But, maybe:

    When you are writing something to a file/device with fwrite(), you can use fflush() to push the data stream.

    When you are reading something from a file/device with fread(), Operating System controls the buffer for you, if you don't like the OS behavior of buffer control, you have to use the read() system call.