Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packet loss over usb connection as a com port on an Android tablet #565

Open
RogueUrsa opened this issue Mar 20, 2024 · 1 comment
Open

Comments

@RogueUrsa
Copy link

Hi,
I was wondering if anyone else had experienced packet loss over USB on android and if there were common 'known' solutions. I have been using windoze for a while with an application that trasmits 40byte packets at 4kHz. there is no loss under windows using a matlab interface. However switching to an android tablet using a java based interface i have started to experience sporadic data drops.

it was queried if it was a blocking issue by my software team and i got this feedback from the engineer:
In the firmware the device uses TI's USB CDC driver and calls cdcSendDataInBackground(). This function is not a non-blocking function but rather will only block if any data previously send to the USB CDC has not been cleared by the host.

what i did note in a quick test i ran was that switching the tablet to airplane mode significantly reduced the packet loss (knowing the wifi on the tablet to be unstable at times and to randomly poll for connection). I am not sure if this is the whole issue,but am wondering if this is about priorities of processes maybe?

Any experiences with where to look for a solution would be deeply appreciated

@kai-morich
Copy link
Collaborator

using separate Threads like SerialInputOutputManager.java, increasing thread priority, merging unprocessed data into chunks might help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants