Releases: mik3y/usb-serial-for-android
Releases · mik3y/usb-serial-for-android
v3.4.5
features:
- added VID/PID for Raspberry Pi Pico
- use optimal buffer size in
write()
by default. Thus theSerialTimeoutException
has validbytesTransferred
v3.4.4
changes:
CommonUsbSerialPort.DEBUG
log configurable, disabled by default
v3.4.3
v3.4.2
fixes:
- Ch34x baud rate 921600 calculation
v3.4.1
fixes:
- restore FT2232C support that got lost with v3.0.0
v3.4.0
features:
- support PL2303GC/GB/GT/GL/GE/GS
- custom baud rates for PL2303TA/TB
- added VID 0x0483, PID 0x5740 to preconfigured CDC devices, as it is frequently used as STMicroelectronics virtual COM port
v3.3.3
features:
- new
SerialInputOutputManager.start()
method for starting ioManager thread
fixes:
- Previously recommended start action
Executors.newSingleThreadExecutor().submit(ioManager)
did not shutdown the executor, which caused a thread leak.
Use newSerialInputOutputManager.start()
method instead. It's still possible to use old style start, as SerialInputOutputManager continues to implement Runnable interface. read
w/o timeout now only throws exception on connection lost. Reverted buffer to small handling from f4166f3, as there might be unkown reasons for empty response
v3.3.2
features:
- use optimal read buffer size in
SerialInputOutputManager
to reduce latency for FTDI and CH34x getReadEndpoint()
andgetWriteEndpoint()
methods moved toUsbSerialPort
interface
fixes:
read
w/o timeout now throws exception on connection lost or buffer to small (when usingSerialInputOutputManager
the exception was already thrown before this change, because the next read failed)- Use monotonic clock for timeout calculation, to avoid issues when time is adjusted
v3.3.1
features:
- new
SerialTimeoutException
class - new
getReadEndpoint()
andgetWriteEndpoint()
methods inCommonUsbSerialPort
class - distinguish generic IO error and timeout in
write()
- Return type of
write()
method changed to void. The return value was redundant before, as it was always the request length or an exception was thrown - If timeout is reached,
write()
now throws aSerialTimeoutException
withex.bytesTransferred
filled with known transferred bytes - Optimal write buffer size can be set 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 0 is returned in
SerialTimeoutException.bytesTransferred
. With optimal write buffer size, this value is known and returned inSerialTimeoutException.bytesTransferred
as the chunking is done in this library, but due to more kernel round trips write() might take slightly longer and cause more CPU load
- Return type of
- introduced IntDef annotation
@Parity
atsetParameters(..., @Parity int parity)
parameter for better warnings - disable debug logging in
SerialInputOutputManager
by default. Can be enabled withpublic static boolean DEBUG;
fixes:
- set thread priority in
SerialInputOutputManager.run
- improve error handling in
close
changes:
- Return type of
write()
method changed to void. The return value was redundant before, as it was always the request length or an exception was thrown
v3.3.0
features:
- support BREAK with
setBreak(boolean)
method
fixes:
- fix PL2303 initial input control line values