1
0
mirror of https://github.com/mik3y/usb-serial-for-android synced 2025-06-08 00:16:13 +00:00

40 Commits

Author SHA1 Message Date
kai-morich
9ea936b14a improve close handling
Use releaseInterface to interrupt read() and terminate SerialInputOutputManager. Previously some drivers used usbRequest.cancel() but this does not interrupt read() on older Android.

Added connection check to read(). Before Android 8.0 request.initialize() did not check usbConnection, which can lead to native crash if NULL
2019-10-27 21:32:38 +01:00
Kai Morich
b3631dff58 README with SerialInputOutputManager for read() and port for write()
test the usually not used read/write variants
2019-10-26 21:32:28 +02:00
Kai Morich
800381e370 CdcAcm driver: cancel read() on close() 2019-10-26 20:37:06 +02:00
Kai Morich
fac8c9f340 test nonstandard baud rates 2019-10-26 15:40:40 +02:00
Kai Morich
f7399c2aad more coverage tests
purgeHwBuffers: adjust parameter names to match read/write methods and actual behavior
2019-10-25 22:23:00 +02:00
Kai Morich
37059b1a27 reduce non covered code
move HexDump class from library to example
remove unused UsbSerialRuntimeException
2019-10-21 21:04:58 +02:00
Kai Morich
54a3db115f show code coverage 2019-10-20 22:41:55 +02:00
Kai Morich
2bee5b930b build with jitpack 2019-10-06 17:52:17 +02:00
Kai Morich
0d48ed04e7 Always use async read, as bulkTransfer can cause data loss. Increase API version to 17 because async read only works reliably since Android 4.2 (http://b.android.com/28023) 2019-10-05 10:35:15 +02:00
Kai Morich
e527afdf35 compile+target sdk 28, gradle 4.6 2019-10-05 10:35:15 +02:00
Kai Morich
61b272b8b6 support ft_232h, cp210_ multiport devices
harmonize claimInterface() error handling
cancel read() on close()
2019-10-05 10:27:11 +02:00
Kai Morich
0ea5b282b7 implement async read for all devices 2019-10-05 10:27:11 +02:00
Kai Morich
adb22f718e build tools update; instrumented device test 2019-10-05 10:27:11 +02:00
kai-morich
c89ca2c96a
Merge pull request #195 from kai-morich/ch340-parameter
CH34x: data bits, parity, stop bits
2019-10-04 16:50:16 +02:00
kai-morich
d7147201de
Merge pull request #188 from kai-morich/ch340-async
enable async read for CH340 as in CDC driver to prevent data loss at high baud rates
2019-10-04 16:49:50 +02:00
kai-morich
eb2de17af8
Merge pull request #170 from kai-morich/ftdi-async
enable async read for FTDI + prevent loss of last packet if full
2019-10-04 16:49:03 +02:00
kai-morich
deabc510c1
Merge pull request #189 from kai-morich/cdc-endpoints
support USB devices with other non CDC related endpoints, e.g. when u…
2019-10-04 16:48:03 +02:00
Kai Morich
9c1ca288ae CH34x: data bits, parity, stop bits
CP21xx: mark+space
all devices: return error on unsupported parameters
2018-01-20 13:09:29 +01:00
Kai Morich
df4e9174cb enable async read for CH340 as in CDC driver to prevent data loss at high baud rates 2017-11-03 22:52:32 +01:00
Kai Morich
fcd8596bdd enable async read for FTDI as in CDC driver. this prevents -1 error from bulkTransfer() when receiving data in multiple packets, e.g. if consumed to slow at high baud rates.
prevent loss of last packet if full
2017-04-01 23:15:55 +02:00
Kai Morich
608c67499a support USB devices with other non CDC related endpoints, e.g. when using ARM mbed DAPLink firmware 2017-02-17 22:03:32 +01:00
Guillaume Revaillot
73b8b73133 ch34xSerialDriver: support more baudrates.
allow to use 57600bps with ch34x based adapter by using dynamic computation of baudrate configuration, based on linux kernel's driver.
2016-11-16 13:58:01 +01:00
mike w
b96f9ca7a2 Merge pull request #108 from Scypho/master
adding support for USB devices with only one channel
2016-09-11 16:32:00 -04:00
João Costa
458ed446fb Add support for Arduino Micro 2016-07-08 16:29:55 +01:00
mike w
f53c5e548a Merge pull request #103 from xeonfusion/patch-1
Update ProlificSerialDriver.java
2016-03-23 19:31:24 -04:00
xseignard
e0d9c3c091 Added CH34x driver 2015-12-09 02:29:30 +01:00
SJ
9d48757285 - Updating Gradle project to > 1.0.0
- Updated .gitignore with Github ignore settings
- Updated build tools and SDK versions to 22
- Migrated .gradle files from pre-1.0.0 to post-1.0.0
2015-06-23 00:24:43 -04:00
Jens Peter Schroer
45b8364103 adding support for USB devices with only one channel 2015-05-12 12:23:40 +02:00
xeonfusion
50dda78a63 Update ProlificSerialDriver.java
Missing Parity case in switch statement causes the Prolific driver code to crash when Parity is set to Even.
2015-03-13 15:50:14 +04:00
Trey Marc
b251430e02 remove uncessary call to mWriteBuffer.position()
assigne len with mWriteBuffer.position() before testing
2014-11-10 23:35:03 +01:00
mike w
ef13784f4f Fix off-by-one error in filterStatusBytes.
Closes #74.
2014-11-10 10:24:53 -05:00
treymarc
4ccaff47b1 source formating :replaced tab 2014-10-27 22:03:58 +01:00
Trey Marc
8f439384a7 Correct USART init for stm32 autobauding
Hello,

I had some headache trying to figure out the issue when flashing some stm32 mcu over uart [1] 

With the above changes i can now flash stm32 devices correctly.

regards,

1 : http://www.st.com/web/en/resource/technical/document/application_note/CD00264342.pdf
2014-10-27 21:26:37 +01:00
bens-unit01
09c84a4a3c added support to retrieve the device serial number 2014-09-16 11:50:50 -07:00
mike wakerly
dbdf95525e maven: Update group name and artifact id. 2014-09-08 11:22:17 -07:00
mike wakerly
06582e68ad Add Maven Central uploadArchives target.
Issue #70.
2014-09-08 11:02:45 -07:00
mike wakerly
a9c42b96e1 Update build tools. 2014-06-24 13:45:45 -07:00
mike wakerly
6ef85d04c1 cdc: Special case read timout == Integer.MAX_VALUE.
Some systems return 0 from read() when the device has been disconnected.
The only way to detect this is to 'never' expect a timeout.
2014-06-14 12:55:28 -07:00
mike wakerly
8e8ded4a9c cdc: Add async read capability. 2014-06-14 12:55:28 -07:00
mike wakerly
95592f984a Convert to gradle. 2014-06-14 12:55:24 -07:00