Fazecast / jSerialComm

Platform-independent serial port access for Java
GNU Lesser General Public License v3.0
1.34k stars 287 forks source link

Strange behaviour in write / read application #85

Closed wirthm closed 7 years ago

wirthm commented 7 years ago

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?

wirthm commented 7 years ago

Finally, I found the reason for my problem. The timeouts are not related to jSerialComm.