Problem reading serial port
Hi, I have a server which is listening to multiple sources (tty0, tty1 and parport0). I am using select() with a timeout and I am able to get the data from all sources. But read() is not able to catch all the data which is coming from the COM (tty0, tty1) sources. I mean, it is able to read only 16-20 bytes at a time. If I use usleep(), before the read(), I am able to get all data. Do we have any mechanism to wait till all the data arrives except sleep()/usleep()?
Thanks in advance.
-Chris
|