kai-morich
f4166f34a0
read w/o timeout now throws exception on connection lost or buffer to small
...
SerialInputOutputManager already returned connection lost exception, as the next read failed
2021-03-26 18:11:23 +01:00
kai-morich
2d4d2f78a5
Merge pull request #351 from lambdapioneer/master
...
Use monotonic clock for timeouts
2021-03-18 08:11:26 +01:00
Daniel Hugenroth
b8c3057967
Use monotonic clock for timeouts
2021-03-16 22:39:00 +00:00
kai-morich
c06ccf70bc
really set thread priority in SerialInputOutputManager ( #349 )
2021-02-27 13:59:30 +01:00
kai-morich
cbed086279
fix write timeout calculation
2021-02-14 14:16:25 +01:00
kai-morich
4ffcc8d0fb
simplify write timeout handling
2021-02-13 21:07:21 +01:00
kai-morich
f60414f8ec
improve write timeout handling
...
Return type of write() method changed to void. The return value was redundant before, as it always was the request length or an exception was thrown.
If timeout is reached, write() now throws a SerialTimeoutException with ex.bytesTransferred filled with known transferred bytes.
Added CommonUsbSerialPort.getReadEndpoint() and .getWriteEndpoint() to assist in setting the optimal write buffer size with port.setWriteBufferSize(port.getWriteEndpoint().getMaxPacketSize()).
By default the write buffer size is > MaxPacketSize and the Linux kernel splits writes in chunks. When the timeout occurs, it's unknown how many chunks have already been transferred and the exception typically stores 0. With optimal write buffer size, this value is known and stored in SerialTimeoutException, but due to more kernel round trips write() might take slightly longer().
2021-02-07 16:37:01 +01:00
kai-morich
85d0348844
improve error quality + test for PR #339
2021-01-31 19:58:59 +01:00
kai-morich
fc610a9764
IntDef Parity for better warnings
...
but no @Intdef for databits, stopbits as these are frequently used with numbers instead of constants
remove redundant modifiers
2021-01-16 23:21:10 +01:00
kai-morich
5519182256
Merge pull request #339 from ybs-github/master
...
catch exception thrown by `close()` inside `open()`
2021-01-10 10:04:27 +01:00
kai-morich
a807ea91f0
Merge pull request #333 from IljaK/patch-1
...
Debug mode disable
2020-12-16 20:01:48 +01:00
Ilja
911cf96ba0
Debug mode disable
...
Ability to disable DEBUG Logging for in/out bytes.
2020-12-16 14:24:43 +02:00
Yehezkiel Syamsuhadi
ebc8d791fc
catch exception thrown by `close()`
2020-12-14 10:23:29 +11:00
kai-morich
6b7d358f1f
move codacy project
2020-12-12 11:40:16 +01:00
kai-morich
2d3f5e73ab
Merge pull request #330 from Sharabaddin/master
...
dependencies example with current version instead of `Tag` that has to be replaced by each user
2020-12-10 20:45:35 +01:00
Sharabaddin
6ff679d989
ez for start
...
and fix potential problems
2020-12-10 14:03:45 +02:00
kai-morich
69330e9168
link feature matrix
2020-10-17 12:31:10 +02:00
kai-morich
115fb407b4
coverage fix, gradle update
2020-10-14 20:36:49 +02:00
kai-morich
768f716600
new setBreak() method
2020-10-14 20:36:49 +02:00
kai-morich
1e75f91467
slightly more coverage, local coverage report, dependency update
2020-10-12 21:28:50 +02:00
kai-morich
08a93ec530
PL2303 fix initial input control line values
2020-10-07 21:40:07 +02:00
kai-morich
732e138630
PL2303(HX) support non-standard baud rates
2020-09-28 21:12:50 +02:00
kai-morich
1adf2a9b98
PL2303 throw error on unsupported baud rates
...
instead of silently falling back to 9600 baud
2020-09-27 09:03:37 +02:00
kai-morich
d63a24762d
mention other CP210x devices, remove CP2110 which is a HID device
2020-09-22 07:52:18 +02:00
kai-morich
26999e3626
read with timeout now throws error on connection lost, e.g. device disconnected
...
and similar connection lost detection for prolific input control lines
2020-09-12 21:17:52 +02:00
kai-morich
c53c3ed0ae
check read buffer size
2020-09-06 09:48:10 +02:00
kai-morich
6f4cd0313c
FTDI read() now waits until timeout
...
previously returned after periodic FTDI status response (default 16 msec)
2020-09-05 12:00:37 +02:00
kai-morich
80e8eb8a60
iomanager with configurable threadpriority and higher default to prevent data loss
2020-08-31 22:40:28 +02:00
kai-morich
f443d1f012
iomanager with configurable buffer size
2020-08-31 22:40:28 +02:00
kai-morich
4f2d6c73a4
list all supported FTDI devices
2020-08-24 17:32:03 +02:00
kai-morich
698f590d58
restored UsbId.FTDI_FT231X
...
same ID for FT230X, FT231X, FT234XD
tested with FT230X
2020-08-23 20:44:34 +02:00
kai-morich
f36756dc86
Update CHANGELOG.txt
2020-08-20 07:49:50 +02:00
kai-morich
73d669c4dc
remove FT231X also from device_filter.xml
2020-08-01 12:24:54 +02:00
kai-morich
57d10a08dd
Merge pull request #297 from mik3y/v3
...
ftdi rewrite, MIT license, ...
2020-08-01 10:21:54 +02:00
kai-morich
a664082f23
throw UnsupportedOperationException instead of returning false
2020-08-01 10:06:51 +02:00
kai-morich
954295456c
rebase new FTDI baudrate test
2020-07-30 17:52:18 +02:00
kai-morich
2d13b90f59
move from LGPL to MIT license ( #244 )
...
moving away from LGPL possible, as the FTDI driver is rewritten and not based any more on LGPL code from libftdi.
2020-07-29 11:03:26 +02:00
kai-morich
e496195bd9
rewrite ftdi driver without LGPL code from libftdi
2020-07-27 17:39:01 +02:00
kai-morich
e0ed25b85f
CH341A readme update
2020-07-27 17:38:16 +02:00
kai-morich
963729924b
mention close of UsbDeviceConnection in javadoc comment
2020-07-21 08:20:22 +02:00
kai-morich
ce73857825
slightly more tests
2020-07-19 19:47:13 +02:00
kai-morich
a2f0097092
improve control line example
2020-07-19 19:16:05 +02:00
kai-morich
8eaf3f5c5f
tests UsbDeviceConnection close behavior
...
and extract test utilities
2020-07-18 20:48:27 +02:00
kai-morich
a1e58b9843
implement CP21xx input control lines
...
open() CP21xx without RTS, DTR set
2020-07-04 15:31:58 +02:00
kai-morich
7423fd9d79
new getControlLines() and getSupportedControLines() methods
...
getControlLines() requires less USB calls than calling getRTS() + ... + getRI() individually.
getSupportedControlLines() tells you, which control lines are supported by a driver. Previously you had to check the driver implementation.
2020-06-30 18:10:02 +02:00
kai-morich
13df128226
implement CH34x input control lines
2020-06-27 11:53:12 +02:00
kai-morich
06d1041738
added CH341A support
2020-06-27 08:46:23 +02:00
kai-morich
3e7fd9a748
add vectorDrawables.useSupportLibrary=true to sample app
2020-06-11 13:15:00 +02:00
kai-morich
735fa3d70f
make all SerialPort classes public
...
and test FtdiSerialPort methods
2020-06-10 19:09:34 +02:00
kai-morich
33149b66fd
Merge pull request #281 from bensadiku/master
...
Expose a isOpen method to check on the current state of the connection
2020-05-19 21:10:08 +02:00