usb-serial-for-android v2.1.0 Release NotesRelease Date: 2019-11-15 // about 1 month ago
- 👍 DTR and RTS support for CP21xx drivers
- reimplemented read timeout. caution: too short timeout can cause data loss, see wiki for details
- include proguard rules in .aar library to retain driver classes instantiated by
- 👌 improve error handling in
closeand more reliably interrupt
- harmonize + cleanup error messages
- manage USB permission intent in sample app
- ✅ more code coverage tests
- 👍 distinguish
If you had dedicated handling for
IllegalArgumentException, you now have to handle both
SerialInputOutputManagernow has infinite read/write timeout per default, to prevent data loss
If you want to use
SerialInputOutputManager.writeAsyncyou should set a readTimeout!=0 before starting the thread
Previous changes from v2.0.0
🔀 merged back changes collected in kai-morich's fork
🆕 new features:
- support ft_232h, cp210_ multiport devices
- CH34x: data bits, parity, stop bits
- CP21xx: mark+space
- 👌 support USB devices with other non CDC related endpoints
- 👍 CH34x: support more baudrates
increased minimum Android version to 4.3 (API 17)
🚀 Always use async read (
UsbDeviceConnection.requestWait), as bulkTransfer (
UsbDeviceConnection. bulkTransfer) can cause data loss at high baud rates. Before this release only the CdcAcm driver used async read.
With async read currently read timeout != 0 is ignored.
readblocks until data is available (except Ftdi, where status data is available each 16msec).
💻 Instead of using
readyou can use the asynchronuos
SerialInputOutputManagerto be notified on available data.
SerialInputOutputManager.writeAsyncis also affected, as the loop blocks in a
read. Instead you can
writedirectly in your UI thread.