Serial: Write timeout for write operation in Linux
Hi all,
I am writing an application to send/receive a bulk data from serial port.
I am able to receive the data that I mentioned in chunks of a page, i.e., 4KB, for each read call.
Like wise, as I know it is only possible to write a page of data at a time.
But in my case I can able to write only 1KB at a time.
Even if I write some data <=1KB immediate after writing 1KB of data I am getting error "Resource temporarily unavailable".
From this I come to know that the delay between two subsequent write operations is not sufficient.
So I kept 100ms delay for each write operation. Then I can able to send as much of data I want.
But it is not a good way of keeping delay.
Is there any other way of keeping timeout for serial write as VMIN and VTIME for serial read .
Thanks in advance.
Regards,
Bharathi.
|