sunacha3 / java-simple-serial-connector

Automatically exported from code.google.com/p/java-simple-serial-connector
1 stars 0 forks source link

Method serialPort.readBytes(byteCount, timeout) always times out regardless of whether data is available in the input buffer. #48

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Method serialPort.readBytes(byteCount, timeout) always seems to timeout 
regardless of whether data is available in the input buffer.

I notice the above method is dependent on getInputBufferBytesCount(). This 
method, at least on the platform and test configuration I'm using, always 
returns zero, regardless of the amount of data in the input buffer.

Operating system: Windows 7, service pack 1, 64-bit
jSSC version: jSSC-2.6.0

For test purposes I have been using Free Virtual Serial Ports from HHD 
software, http://www.hhdsoftware.com/free-virtual-serial-ports. I use two 
virtual serial ports, connected together, forming a virtual bridge between each 
other.

Original issue reported on code.google.com by ed.mo...@gmail.com on 6 Sep 2013 at 8:54

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I have the same problem. getInputBufferBytesCount() almost always returns 0. 
Sometimes 1. But I can read more data(8...) from port anyway and at most times 
correctly.

Today I downloaded newest jSSC2.8.I have the same configuration as you have, 
exept for bridge Im using two FTDI chips connected together. 

Original comment by adam.ole...@gmail.com on 22 Apr 2014 at 3:10

GoogleCodeExporter commented 9 years ago
I am seeing the same problem. Maybe related to this, readBytes() never returns 
any bytes; readBytes(length) works - but, of course, I don't know how many to 
read because of above issue.

I'm running Windows 8 and also using Virtual Serial Ports from HHD.

Original comment by paul.j.n...@gmail.com on 3 Sep 2014 at 1:46