Hi Timothy,
flow control can not be used with raw i/p - o/p , as I a using now.
However, attempting to run the code on the pc instead of the embedded device was a very interesting idea.
Indeed running the code and doing a read() times out at the very same byte!
This is odd. I can't make out what is going on wrong yet, but this is "good".
I still dont think I can blame the sender. Mind you I was just porting the code from an old embedded device to a new one, and this happened.
I am appending the last 2 read() operations and the bytes that were received:
SERIAL: DATA read 11 bytes and a total of 12262 .
SERIAL: serDataBuf[12262]= 0x32
SERIAL: serDataBuf[12263]= 0x30
SERIAL: serDataBuf[12264]= 0x32
SERIAL: serDataBuf[12265]= 0x30
SERIAL: serDataBuf[12266]= 0x32
SERIAL: serDataBuf[12267]= 0x30
SERIAL: serDataBuf[12268]= 0x32
SERIAL: serDataBuf[12269]= 0x30
SERIAL: serDataBuf[12270]= 0x32
SERIAL: serDataBuf[12271]= 0x30
SERIAL: serDataBuf[12272]= 0x32
SERIAL: DATA read 5 bytes and a total of 12273 .
SERIAL: serDataBuf[12273]= 0x30
SERIAL: serDataBuf[12274]= 0x32
SERIAL: serDataBuf[12275]= 0x30
SERIAL: serDataBuf[12276]= 0x32
SERIAL: serDataBuf[12277]= 0x30
SERIAL: time diff is tv_sec=5 , tv_usec=996447
SERIAL: No DATA have been read. Timeout @ byte 12278, timeout counter 0.
SERIAL: time diff is tv_sec=5 , tv_usec=999983
SERIAL: No DATA have been read. Timeout @ byte 12278, timeout counter 1.
SERIAL: time diff is tv_sec=5 , tv_usec=999973
SERIAL: No DATA have been read. Timeout @ byte 12278, timeout counter 2.
SERIAL: time diff is tv_sec=5 , tv_usec=999961
SERIAL: No DATA have been read. Timeout @ byte 12278, timeout counter 3.
SERIAL: time diff is tv_sec=5 , tv_usec=999974
SERIAL: No DATA have been read. Timeout @ byte 12278, timeout counter 4.
SERIAL: time diff is tv_sec=5 , tv_usec=999960
SERIAL: No DATA have been read. Timeout @ byte 12278, timeout counter 5.
SERIAL: time diff is tv_sec=5 , tv_usec=999982
SERIAL: No DATA have been read. Timeout @ byte 12278, timeout counter 6.
So the last byte received is a valid 0x30...