Ytai, What's a good way to force a disconnected condition? You mentioned sending an invalid protocol message, but I don't know exactly what that means.
On Friday, April 27, 2012 10:20:23 PM UTC-7, Ytai wrote: > I'm often running the IOIO for hours or even days without any drops, and > stressing it quite a lot (using the torture test). > Moreover, if I force a disconnect condition (e.g. by sending an invalid > protocol message), the connection drops and immediately gets reestablished. > > So I'm guessing the problem may be related to either one of these issues: > > 1. Something about your application that my tests don't cover or that > really annoys your Android. Please shed some light on what the application > does, or otherwise let me know whether it also happens with one of the > example apps. > 2. Something about your Android version is non-standard / buggy in the > USB or ADB layer. Which Android device / OS version are you using? > 3. Electrical issues: faulty or over-long USB cable, worn out > connectors, faulty IOIO board, faulty trimmer or bad setting on the > trimmer > (should be all the way clockwise and make sure you don't go pass the > stopper that tends to break if over stressed), faulty 5V regulator, etc. > > Also, I'm curious, do you have a logcat of when the disconnects occur? > > On Fri, Apr 27, 2012 at 3:43 AM, kolbe <[email protected] > <javascript:>>wrote: > >> I've got that backward. The disconnect is coming from the device so the >> data expected from the IOIO is not arriving. Something must then be >> blocking on the IOIO and doesn't get reset until I unplug and reconnect. As >> to the cause the only thing I can think of is a power glitch of some kind >> but I've checked and rechecked. >> >> >> On Friday, April 27, 2012 9:47:36 AM UTC+2, kolbe wrote: >>> >>> I have a IOIO connected by USB ADB that from time to time loses the >>> connection and sends out the IOIOProtocol - IOIO disconnected log. When the >>> program tries to reconnect it the waitforconnect blocks indefinitely >>> "Socket IOIO Connection - waiting for TCP" log until I physically unplug >>> and reconnect the IOIO at which point it reconnects happily and the program >>> continues. Since I want the program to run nonstop, this unplugging won't >>> do. I don't think it is a power problem as no pin is drawing more that 5mA >>> and the totals are fine. I've monitored Vin and it also stays constant. The >>> device is powered externally so there is not charging being done by the >>> IOIO. >>> >>> From the IOIOLib code below, it looks like the IOIO stops receiving data >>> from the device. If this is the case then the problem is device side, no? >>> Although I'd rather it not disconnect, the fact that it won't reconnect and >>> blocks (ANR) without physically disconnecting and reconnecting is >>> troublesome. I need some light on what might be going on and possible >>> solutions? >>> >>> private void fillBuf() throws IOException { >>> try { >>> validBytes_ = in_.read(inbuf_, 0, inbuf_.length); >>> if (validBytes_ <= 0) { >>> throw new IOException("Unexpected stream closure"); >>> } >>> //Log.v(TAG, "received " + validBytes_ + " bytes"); >>> readOffset_ = 0; >>> } catch (IOException e) { >>> Log.i(TAG, "IOIO disconnected"); >>> throw e; >>> } >>> } >>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "ioio-users" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/ioio-users/-/3oOCDS4R8bYJ. >> >> To post to this group, send email to [email protected]<javascript:> >> . >> To unsubscribe from this group, send email to >> [email protected] <javascript:>. >> For more options, visit this group at >> http://groups.google.com/group/ioio-users?hl=en. >> > > -- You received this message because you are subscribed to the Google Groups "ioio-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/ioio-users. For more options, visit https://groups.google.com/groups/opt_out.
