svenmeier / coxswain

Your rowing servant
http://play.google.com/store/apps/details?id=svenmeier.coxswain
Apache License 2.0
80 stars 21 forks source link

USB OTG Android: Sporadic connection losses #128

Closed whosnick closed 3 years ago

whosnick commented 3 years ago

I plug in the cable to my phone and then switch on the S4. Coxswain starts automatically. "PC" is always displayed on the S4.

When I start a program, Coxswain will sporadically return to the "choose program" menu, probably because it lost connection? "PC" is always displayed. Selecting a program again will normally again let the S4 "beep" and reset for a new program, without having to reattach the cable.

If this is not a known issue I guess the problem lies with my Android or cable connection?

svenmeier commented 3 years ago

If PC ist displayed all the time on the S4, this rather looks like a protocol error.

Please enable "write trace" in Coxswain's settings, then reconnect and row. When rowing ends prematurely, attach the file "coswain/waterrower.trace" to this issue.

whosnick commented 3 years ago

1620124583660.trace.txt

This should contain two short rows with several "disconnects" back to the program selection screen even before rowing started (but program was selected).

While doing this I noticed that I can force this behavior by taking my phone and letting it rotate the screen from landscape to portrait mode. Every time the screen rotates the program seems to disconnect. But it also happens while not changing screen orientation, just much more random. May be also sensitive to phone movement in general (which might again point to a loose connection).

svenmeier commented 3 years ago

The log shows a disconnect, probably only a short moment where the connection is lost.

The connection is handled independently from any UI interaction, so screen rotation should have no influence here. Maybe your cable or usb port is faulty.

You could check your phone for a USB power saving mode too.

whosnick commented 3 years ago

Thanks for looking into this. Will try another cable once I get one.

whosnick commented 3 years ago

New cable solved the issue. Thanks for your support and for this great app!