kai-morich
735fa3d70f
make all SerialPort classes public
...
and test FtdiSerialPort methods
2020-06-10 19:09:34 +02:00
Behxhet Sadiku
37324c6b0f
Expose isOpen on CommonUsbSerialPort
2020-05-19 20:50:42 +02:00
kai-morich
cffe54e15c
test control lines
2020-03-21 18:01:05 +01:00
Kai Morich
5096d6940c
relax CH340 initialization
...
controlIn(0x95, 0x0706) result includes control line values
2020-03-08 16:06:44 +01:00
kai-morich
2cad1fd5a2
fix CP2102N initialization
...
do not send SET_BAUDDIV command. It fails on CP2102N and CP2102/5 work without
2020-03-01 13:54:35 +01:00
kai-morich
2a77ebf8b9
fix ch340 initialization
2020-02-03 20:36:56 +01:00
kai-morich
bbed92eafb
support multi-port CDC devices
2020-01-10 08:02:56 +01:00
kai-morich
ce97a3408b
reuse UsbRequest
...
less LogCat output
2019-12-13 21:13:48 +01:00
kai-morich
7b578918b0
support FTDI control lines for multi-port devices
2019-11-23 13:24:28 +01:00
uholeschak
6b32e25e9c
Fixed modem status
...
Signed-off-by: kai-morich <mail@kai-morich.de>
2019-11-23 13:23:10 +01:00
uholeschak
21e96594d2
Added missing functions: - latency timer - modem lines
...
Signed-off-by: kai-morich <mail@kai-morich.de>
2019-11-23 13:22:42 +01:00
kai-morich
e2e9df8463
reimplement read timeout
2019-11-15 21:45:22 +01:00
kai-morich
669ab48e0f
resolve merge issue
2019-11-15 07:51:03 +01:00
Tim Vahlbrock
89ad5be9c3
Improved DTR and RTS support. DTR and RTS can now be queried after transmission. Added usage of existing methods and new constants.
2019-11-14 14:44:39 +01:00
Tim Vahlbrock
92b16a8c24
Merge branch 'master' of https://github.com/mik3y/usb-serial-for-android
2019-11-14 14:15:39 +01:00
kai-morich
fd2055791a
added proguard rules
...
now they are part of the .aar library, before you had to add them to each release app
2019-11-13 18:49:27 +01:00
kai-morich
24187b3af6
refactor duplicated code in close method
2019-11-09 22:48:00 +01:00
kai-morich
5767298636
refactor duplicated read/write methods
2019-11-09 20:26:50 +01:00
kai-morich
e1b62cf675
write + purge tests, remove unused read buffer code
2019-11-03 19:34:14 +01:00
kai-morich
5c6748e1b8
improve setParameter() error handling
...
harmonize exception messages, more UI friendly messages
distinguish IllegalArgumentException and UnsupportedOperationException
2019-11-02 13:49:08 +01:00
kai-morich
18b5b6e648
unify open() error handling, more tests, minor cleanup
2019-11-02 13:09:15 +01:00
kai-morich
6869eff88a
revert previous usbRequest.cancel() removal
...
Combine usbRequest.cancel() and releaseInterface to interrupt read() and terminate SerialInputOutputManager.
UsbRequest.cancel() immediately interrupts read() on newer Android versions.
With releaseInterface() only, some hickup are observed on fast reconnect.
Keep releaseInterface() as only this interrupts read() on older Androids.
2019-11-02 12:46:45 +01:00
Tim Vahlbrock
7eaea45068
Added DTR and RTS support for cp21xx driver
2019-10-28 13:20:34 +01:00
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