This type of errors are usually a result of overloading the connection bandwidth. I don't know whether there's anything better to do about it - I at least made it so your app doesn't crash when that happens, but rather the connection gets dropped. At the end of the day, I don't know what would be a more graceful way to handle it. What might help is programmatically reducing the AnalogInput sample rate, which I haven't gotten around to. The failure to reestablish a connection is likely related to a BT stack problem on either the Android or the IOIO side. Does rebooting the IOIO help in this case?
On Sun, Feb 2, 2014 at 11:44 AM, Thomas Hermansson < [email protected]> wrote: > Hi Ytai! > > I just got two protocol errors. I have not been able to reproduce it, but > I thought you might want to have a look at them. > I was running over bluetooth, and using App v5.0x. > > > 1. > 02-02 15:41:43.292: E/IOIOProtocol(1358): Protocol error: > 02-02 15:41:43.292: E/IOIOProtocol(1358): > ioio.lib.impl.IOIOProtocol$ProtocolError: > java.lang.ArrayIndexOutOfBoundsException: length=47; index=53 > 02-02 15:41:43.292: E/IOIOProtocol(1358): at > ioio.lib.impl.IOIOProtocol$IncomingThread.run(IOIOProtocol.java:954) > 02-02 15:41:43.292: E/IOIOProtocol(1358): Caused by: > java.lang.ArrayIndexOutOfBoundsException: length=47; index=53 > 02-02 15:41:43.292: E/IOIOProtocol(1358): at > ioio.lib.impl.IncomingState.handleAnalogPinStatus(IncomingState.java:288) > 02-02 15:41:43.292: E/IOIOProtocol(1358): at > ioio.lib.impl.IOIOProtocol$IncomingThread.run(IOIOProtocol.java:775) > > > 2. > 02-02 15:47:17.222: E/IOIOProtocol(2020): Protocol error: > 02-02 15:47:17.222: E/IOIOProtocol(2020): > ioio.lib.impl.IOIOProtocol$ProtocolError: Received unexpected command: 0x40 > 02-02 15:47:17.222: E/IOIOProtocol(2020): at > ioio.lib.impl.IOIOProtocol$IncomingThread.run(IOIOProtocol.java:941) > > > 3. This is not related to the previous protocol issues, but lets list it > here too. :-) You can end up in this loop sometimes - usually when > restarting the app. Then I turn off/on bluetooth which usually fix it. > 02-02 15:50:04.977: V/BluetoothIOIOConnection(2600): Attempting to connect > to Bluetooth device: IOIO (00:00) > 02-02 15:50:05.002: D/BluetoothUtils(2600): > isSocketAllowedBySecurityPolicy start : device null > 02-02 15:50:06.002: V/BluetoothIOIOConnection(2600): Attempting to connect > to Bluetooth device: IOIO (00:00) > 02-02 15:50:06.052: D/BluetoothUtils(2600): > isSocketAllowedBySecurityPolicy start : device null > 02-02 15:50:07.052: V/BluetoothIOIOConnection(2600): Attempting to connect > to Bluetooth device: IOIO (00:00) > 02-02 15:50:07.082: D/BluetoothUtils(2600): > isSocketAllowedBySecurityPolicy start : device null > 02-02 15:50:08.087: V/BluetoothIOIOConnection(2600): Attempting to connect > to Bluetooth device: IOIO (00:00) > 02-02 15:50:08.112: D/BluetoothUtils(2600): > isSocketAllowedBySecurityPolicy start : device null > 02-02 15:50:09.117: V/BluetoothIOIOConnection(2600): Attempting to connect > to Bluetooth device: IOIO (00:00) > 02-02 15:50:09.147: D/BluetoothUtils(2600): > isSocketAllowedBySecurityPolicy start : device null > 02-02 15:50:10.157: V/BluetoothIOIOConnection(2600): Attempting to connect > to Bluetooth device: IOIO (00:00) > > Not the best error descriptions. ;-) > > -- > 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. > -- 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.
