usb-serial-for-android
usb-serial-for-android copied to clipboard
Continous data bottleneck location
Hi, We are currently using the library as a plugin for a Unity app.
Unity script refresh rate is 30Hz so we are polling port.read()
every ~30mS.
Device is sending continous data at 9600 baud but we are loosing packets.
- Is there any "interrupt driven" usage of the library in order to buffer incoming data?
- Is this a common/know limitation of Android USB API? If so, whats the procedure to handle this?
Lastly, we are in doutb why the "protocol header" is 2 bytes?. We always seem to have 2 bytes more thant the returned by port.read(). ie: device sends 0x01-0x02-0x03-0x04, port.read() returns 2.