felHR85 / UsbSerial

Usb serial controller for Android
MIT License
1.81k stars 590 forks source link

USB serial read buffer #186

Closed mohammadVatandoost closed 5 years ago

mohammadVatandoost commented 5 years ago

when I receive a large file(2MB) from UsbSerial, most of data lost. I think read buffer is too low.

(private static final int BAUD_RATE = 921600. )

I try with serialInputStream and UsbSerialInterface .

felHR85 commented 5 years ago

@mohammadVatandoost Baud rate is not the culprit here. Current buffer size in async mode is 16kb. Use SerialnputStream to use a custom buffer size