serial port missing text problem
Hi All,
I am trying to use serial port for communication between 2 linux PCs. One PC is transmitting and other is ony Recieving. For testing purposes I am sending 5 packets of 345 bytes containing string 'abcdef' filled in it. Time between calls to function to write the 5 packets is 100usec apart and time between two packets being written to serial port is is 100usec. I am using 19200baud rate, no parity and 1 stop bits with hardware flow control. THe problem that I am facing is that after a while I can say after around 3-4 mins the serial port is skipping bytes like it is receiving 'abef' instead of 'abcdef', or it is recieving 'abdcdef' instead of abcdef'. I have checked the serial cable and it seems to work fine. I have tested transmitting from my application to HyperTerminal on a windows PC and it works fine. If I tx from Hyper Terminal and Rx through my application it some times gives the same problem as on linux-linux PC. I have tried many combinations of flags during initialization but to no use. I have rechecked the cable connections, the cable is a null modem cable. Can some one suggest what can be the probable problem. If this is a flow control problem what can be a probable way of handling it. An early reply would be highly appreciated.
Thanks,
Saba
|