--To view this discussion on the web visit https://groups.google.com/d/msg/ioio-users/-/3oOCDS4R8bYJ.
You received this message because you are subscribed to the Google Groups "ioio-users" group.
To post to this group, send email to ioio-...@googlegroups.com.
To unsubscribe from this group, send email to ioio-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ioio-users?hl=en.
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:
- 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.
- Something about your Android version is non-standard / buggy in the USB or ADB layer. Which Android device / OS version are you using?
- 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 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.To view this discussion on the web visit https://groups.google.com/d/msg/ioio-users/-/3oOCDS4R8bYJ.
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 unsubscribe from this group, send email to ioio-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/ioio-users/-/c7gangx8bLkJ.
To unsubscribe from this group, send email to ioio-users+...@googlegroups.com.
--
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/-/KQDnO4Jik-QJ.
I don't know. The wrapper does seem trivial, and the log doesn't reveal anything suspicious. Do you know whether the IOIOLib used by B4A is unmodified? Do you know which version it is?
To unsubscribe from this group, send email to ioio-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/ioio-users/-/J1HdLbLDvXgJ.
To unsubscribe from this group, send email to ioio-users+...@googlegroups.com.
I lost you here: which service is started and which IOIO calls do you mean? Sorry, it's probably a B4A thing that I'm not familiar with.
If you're asking in general about the difference between IOIOActivity and IOIOService, aside from the fundamental differences between an Activity and a Service, their IOIO-related stuff is the same.
Oh, I have w guess then. Trying to read from UART or doing any other blocking operation from the UI thread in Android is prohibited. I had no idea this is how your app worked. Could this be it?
To view this discussion on the web visit https://groups.google.com/d/msg/ioio-users/-/0iOwm4samIAJ.
To post to this group, send email to ioio-...@googlegroups.com.
To unsubscribe from this group, send email to ioio-users+...@googlegroups.com.
Oh, I have w guess then. Trying to read from UART or doing any other blocking operation from the UI thread in Android is prohibited. I had no idea this is how your app worked. Could this be it?
To view this discussion on the web visit https://groups.google.com/d/msg/ioio-users/-/1t4YPQXjxYoJ.
To unsubscribe from this group, send email to ioio-users+...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ioio-users+...@googlegroups.com.
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/groups/opt_out.