Problem when connecting another bluetooth device

44 views
Skip to first unread message

Jesus Ayuso

unread,
Nov 23, 2013, 10:25:41 AM11/23/13
to ioio-...@googlegroups.com
Hi,

My phone and my  ioio connect normally through blutooth. But now I want to send voice commands using a BT handset to my ioio based robot.
I set the audiomanager to use the BT handset this way:

audioManager = (AudioManager) getSystemService(AUDIO_SERVICE);

audioManager.setMode(AudioManager.MODE_IN_COMMUNICATION);
audioManager.startBluetoothSco();
audioManager.setBluetoothScoOn(true);

IOIO and the BT handset start working normally, the handset sending voice commands to the program, while the program communicates with the IOIO card. But then I always get excepcions in the IOIOLib

Does the ioio libbt assumes that there is always only one BT connection?

Please, help me

11-23 16:19:12.705: E/AndroidRuntime(5477): FATAL EXCEPTION: Thread-823
11-23 16:19:12.705: E/AndroidRuntime(5477): java.lang.NullPointerException
11-23 16:19:12.705: E/AndroidRuntime(5477): at ioio.lib.impl.IncomingState$DataModuleState.reportAdditionalBuffer(IncomingState.java:117)
11-23 16:19:12.705: E/AndroidRuntime(5477): at ioio.lib.impl.IncomingState.handleSpiReportTxStatus(IncomingState.java:408)
11-23 16:19:12.705: E/AndroidRuntime(5477): at ioio.lib.impl.IOIOProtocol$IncomingThread.run(IOIOProtocol.java:740


Ytai Ben-Tsvi

unread,
Nov 24, 2013, 8:50:48 PM11/24/13
to ioio-...@googlegroups.com
The crash you're seeing is a result of a bug in IOIOLib that I have yet to fix, but fixing it will only cause the app not to crash, but the connection will still be dropped. This bug happens when the Android is getting garbage data from the IOIO.
It seems like either your Android gets confused with the two connections, or something is wrong with the dongle / btstack under these circumstances, eventually causing the Android to get corrupt data.
I would try a different dongle if you have one. May or may not help...


--
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 ioio-users+...@googlegroups.com.
To post to this group, send email to ioio-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/groups/opt_out.

Ben

unread,
May 8, 2015, 5:08:52 PM5/8/15
to ioio-...@googlegroups.com
Hello, 

We also experience some problem with 2 bluetooth connection at the same time with 2 different devices (IOIO + other). No Exception but random odd behaviour which does not occur with single connection . From an IoIo perspective, is it acceptable to have such double bluetooth connection? At which conditions? 

Thxs,

B.
Reply all
Reply to author
Forward
0 new messages