Currently I'm working on a small app which is using jSerialComm to communicate with a USB-Serial device. The application sends request to the Serial device and it has to answer them. I'm using writeBytes and the blocking readBytes (Since I know the length of the answers) to read back the answer of the device. However if I do not wait about two seconds between writing and reading (Tread.sleep) I randomly see timeouts occur. Even if I'm using very large timeout Settings for the blocking read command (e.g. 60seconds) I still get These random timeouts (the amount does not differ) Can somebody imagine the reason for this behavior?
Currently I'm working on a small app which is using jSerialComm to communicate with a USB-Serial device. The application sends request to the Serial device and it has to answer them. I'm using writeBytes and the blocking readBytes (Since I know the length of the answers) to read back the answer of the device. However if I do not wait about two seconds between writing and reading (Tread.sleep) I randomly see timeouts occur. Even if I'm using very large timeout Settings for the blocking read command (e.g. 60seconds) I still get These random timeouts (the amount does not differ) Can somebody imagine the reason for this behavior?