I am looking in to what happens when there are multiple bluetooth devices
available.
Running the sample 'simple app' ( from Eclipse and monitoring the LogCat
log )
if I pair with just one board ( only one IOIO device in android paired list
'IOIO (71:13) ) then communications are faultless. Latency is as expected
and I can toggle the LED on the board rapidly. The IOIO channel stays
connected. All Ok so far.
Turn off that device, stop the app and turn on a second device with a
second BT adaptor. ( IOIO (02:50) )
restart the app
Latency is now unreliable, varies from near zero to 3 seconds and the
LogCat log is reporting protocol errors, the app occasionally disconnects
and reconnects.
I'm not sure but the Log appears to be reporting a successful connection to
device 71:13 when in fact it is 02:50 that is turned on.
01-01 16:56:29.290: V/BluetoothIOIOConnection(4900): Attempting to connect
>> to Bluetooth device: IOIO (71:13)
>
> 01-01 16:56:29.290: W/BluetoothAdapter(4900): getBluetoothService() called
>> with no BluetoothManagerCallback
>
> 01-01 16:56:29.300: D/BluetoothSocket(4900): connect(), SocketState: INIT,
>> mPfd: {ParcelFileDescriptor: FileDescriptor[71]}
>
> 01-01 16:56:34.620: E/IOIOProtocol(4900): Protocol error:
>
> 01-01 16:56:34.620: E/IOIOProtocol(4900):
>> ioio.lib.impl.IOIOProtocol$ProtocolError:
>> java.lang.ArrayIndexOutOfBoundsException: length=3; index=3
>
> 01-01 16:56:34.620: E/IOIOProtocol(4900): at
>> ioio.lib.impl.IOIOProtocol$IncomingThread.run(IOIOProtocol.java:941)
>
> 01-01 16:56:34.620: E/IOIOProtocol(4900): Caused by:
>> java.lang.ArrayIndexOutOfBoundsException: length=3; index=3
>
> 01-01 16:56:34.620: E/IOIOProtocol(4900): at
>> ioio.lib.impl.IncomingState.handleI2cResult(IncomingState.java:451)
>
> 01-01 16:56:34.620: E/IOIOProtocol(4900): at
>> ioio.lib.impl.IOIOProtocol$IncomingThread.run(IOIOProtocol.java:840)
>
> 01-01 16:56:34.620: D/IOIOImpl(4900): Physical disconnect.
>
> 01-01 16:56:34.620: V/BluetoothIOIOConnection(4900): Client initiated
>> disconnect
>
> 01-01 16:56:34.630: D/IOIOImpl(4900): Waiting for IOIO connection
>
> 01-01 16:56:34.630: V/IOIOImpl(4900): Waiting for underlying connection
>
> 01-01 16:56:34.630: V/BluetoothIOIOConnection(4900): Attempting to connect
>> to Bluetooth device: IOIO (02:50)
>
> 01-01 16:56:34.630: W/BluetoothAdapter(4900): getBluetoothService() called
>> with no BluetoothManagerCallback
>
> 01-01 16:56:34.630: D/BluetoothSocket(4900): connect(), SocketState: INIT,
>> mPfd: {ParcelFileDescriptor: FileDescriptor[69]}
>
> 01-01 16:56:34.750: V/BluetoothIOIOConnection(4900): Established
>> connection to device IOIO (02:50) address: 00:1F:81:00:02:50
>
> 01-01 16:56:34.750: V/IOIOImpl(4900): Waiting for handshake
>
> 01-01 16:56:34.760: I/IncomingState(4900): IOIO Connection established.
>> Hardware ID: SPRK0016 Bootloader ID: IOIO0306 Firmware ID: IOIO0500
>
> 01-01 16:56:34.760: V/IOIOImpl(4900): Querying for required interface ID
>
> 01-01 16:56:34.770: V/IOIOImpl(4900): Required interface ID is supported
>
> 01-01 16:56:34.770: I/IOIOImpl(4900): IOIO connection established
>
> 01-01 16:56:35.420: V/BluetoothIOIOConnection(4900): Attempting to connect
>> to Bluetooth device: IOIO (71:13)
>
> 01-01 16:56:35.420: W/BluetoothAdapter(4900): getBluetoothService() called
>> with no BluetoothManagerCallback
>
> 01-01 16:56:35.420: D/BluetoothSocket(4900): connect(), SocketState: INIT,
>> mPfd: {ParcelFileDescriptor: FileDescriptor[70]}
>
> 01-01 16:56:40.780: D/IOIOImpl(4900): Physical disconnect.
>
> 01-01 16:56:40.780: V/BluetoothIOIOConnection(4900): Client initiated
>> disconnect
>
> 01-01 16:56:40.790: D/IOIOImpl(4900): Waiting for IOIO connection
>
> 01-01 16:56:40.790: V/IOIOImpl(4900): Waiting for underlying connection
>
> 01-01 16:56:40.800: V/BluetoothIOIOConnection(4900): Attempting to connect
>> to Bluetooth device: IOIO (02:50)
>
> 01-01 16:56:40.800: W/BluetoothAdapter(4900): getBluetoothService() called
>> with no BluetoothManagerCallback
>
> 01-01 16:56:40.800: D/BluetoothSocket(4900): connect(), SocketState: INIT,
>> mPfd: {ParcelFileDescriptor: FileDescriptor[69]}
>
> 01-01 16:56:41.160: V/BluetoothIOIOConnection(4900): Established
>> connection to device IOIO (02:50) address: 00:1F:81:00:02:50
>
> 01-01 16:56:41.160: V/IOIOImpl(4900): Waiting for handshake
>
> 01-01 16:56:41.170: I/IncomingState(4900): IOIO Connection established.
>> Hardware ID: SPRK0016 Bootloader ID: IOIO0306 Firmware ID: IOIO0500
>
> 01-01 16:56:41.170: V/IOIOImpl(4900): Querying for required interface ID
>
> 01-01 16:56:41.180: V/IOIOImpl(4900): Required interface ID is supported
>
> 01-01 16:56:41.180: I/IOIOImpl(4900): IOIO connection established
>
> 01-01 16:56:41.550: V/BluetoothIOIOConnection(4900): Attempting to connect
>> to Bluetooth device: IOIO (71:13)
>
>
>>
If I Introduce a 3rd paired IOIO BT dongle the problem doesn't get much
worse ( nor better )
Occasionally I am connected to both ( or 3 devices ) and occasionally I can
get all of their LED's to respond to LED toggle commands ( very
occasionally )
Am I doing something wrong?
I am looking to make an IOIO App that allows me to choose which IOIO Device
I am connected to and to use that device exclusively until the user chooses
to switch to another connection. For example if I wanted to control 2
different thermostats or two seperate Io control boards.
This seems to me to be a logical use case of the IOIO bluetooth interfaces
Any thoughts on the above problem Ytai?
Regards
--
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/d/optout.