altera2015 / usbserial

Flutter Android USB Serial plugin
BSD 3-Clause "New" or "Revised" License
121 stars 83 forks source link

receive error with ftdi chip like FT232H #54

Closed CaniotTeam closed 3 years ago

CaniotTeam commented 3 years ago

the lusb communication is working well with CP210x device, but with ftdi chip like FT232H we receive 2 bytes less than sended and also this exception

E/AndroidRuntime( 8729): java.lang.ArrayIndexOutOfBoundsException: src.length=193 srcPos=130 dst.length=185 dstPos=124 length=62 E/AndroidRuntime( 8729): at java.lang.System.arraycopy(Native Method) E/AndroidRuntime( 8729): at com.felhr.usbserial.FTDISerialDevice.copyData(FTDISerialDevice.java:527) E/AndroidRuntime( 8729): at com.felhr.usbserial.FTDISerialDevice.adaptArray(FTDISerialDevice.java:508) E/AndroidRuntime( 8729): at com.felhr.usbserial.UsbSerialDevice$WorkerThread.doRun(UsbSerialDevice.java:329) E/AndroidRuntime( 8729): at com.felhr.usbserial.AbstractWorkerThread.run(AbstractWorkerThread.java:21)