Problem starting communication via OpenAccessory

111 views
Skip to first unread message

charlieh

unread,
Apr 1, 2015, 5:26:39 PM4/1/15
to ioio-...@googlegroups.com
I have the latest firmware, latest HelloIOIO application and Android 4.4.2. To get HelloIOIO starting communication I have to connect the IOIO OTG with the USB cable, switch it on, enable USB debugging and disable USB debugging while the OTG is kept connected and switched on. Just connecting the IOIO OTG and switch it on while USB debugging is switched off doesn't work. Any idea? Thanks.

Ytai Ben-Tsvi

unread,
Apr 1, 2015, 5:27:57 PM4/1/15
to ioio-...@googlegroups.com

Doesn't work how? Are you getting the accessory dialog or not even that?

On Apr 1, 2015 2:26 PM, "charlieh" <tablet....@gmail.com> wrote:
I have the latest firmware, latest HelloIOIO application and Android 4.4.2. To get HelloIOIO starting communication I have to connect the IOIO OTG with the USB cable, switch it on, enable USB debugging and disable USB debugging while the OTG is kept connected and switched on. Just connecting the IOIO OTG and switch it on while USB debugging is switched off doesn't work. Any idea? Thanks.

--
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/d/optout.

charlieh

unread,
Apr 2, 2015, 2:38:18 AM4/2/15
to ioio-...@googlegroups.com
Dear Ytai, thanks for the response.
When my phone has USB debugging disabled, I connect the IOIO and switch it on then the accessory dialog appears, I select HelloIOIO, HelloIOIO appears but doesn't connect, yellow led cannot be switched on/off.
When my phobe has USB debugging enabled, I connect the IOIO and switch it on then the accessory dialog doesn't appear. I switch USB debugging off, accessory dialog appears, I select HelloIOIO, HelloIOIO appears and connects, yellow led can be switched on/off. As long as the IOIO is not switched off, disconnecting the cable and reconnecting the cable shows the accessory dialog again and HelloIOIO can connect to the IOIO. Hope this helps.

Ytai Ben-Tsvi

unread,
Apr 2, 2015, 4:48:13 AM4/2/15
to ioio-...@googlegroups.com
I've recently made some changes to IOIOLib which have made OpenAccesory more reliably. In fact, all the people who have reported problems before and have tried it have reported that it seems to have solved the issue.
I haven't gotten around to making a software release including this fix. I'll try to do that soon. In the meantime, it would be great if you can just grab the latest version from the master branch on GitHub and see if things get better.

charlieh

unread,
Apr 3, 2015, 3:23:43 AM4/3/15
to ioio-...@googlegroups.com
That did help a lot. I do not need to start the phone with USB debugging enable. But it is not 100%. I have to unplug and replug the IOIO several times before communication is established (each time the accessory dialog appears). Once connection is made, it will always connect, after switching the phone on or off or reconnecting the IOIO. But as soon as the IOIO is unpowered then I have do again several tries. It looks like that the IOIO firmware has difficulties in getting into OpenAccessory mode. IOIO Hardware: SPRK0020, IOIO Bootloader: IOIO0400, IOIO Firmware:IOIO0500.

Ytai Ben-Tsvi

unread,
Apr 4, 2015, 2:33:07 PM4/4/15
to ioio-...@googlegroups.com
That is strange. Haven't seen it happen on the device I used for testing (moto X mostly). Do you have another phone to test with? Otherwise, can you dig into what's actually happening, e.g. whether the app ever gets notified by the Android OS that anything had happened?

charlieh

unread,
Apr 9, 2015, 3:17:01 PM4/9/15
to ioio-...@googlegroups.com
Hello Ytai, on another phone it works. For my phone I have two logs attached. One when the phone cannot connect to the IOIO and one when it succeeds. It seems that the AccessoryConnectionBootstrap is not called at all. Any idea? Thanks.
Fail.txt
Success.txt

Ytai Ben-Tsvi

unread,
Apr 9, 2015, 6:09:58 PM4/9/15
to ioio-...@googlegroups.com
Seems like some data is getting corrupt coming from the IOIO to the Android. In IOIOProtocol there are commented out lines that log every byte coming in and going out. Can you enable them and repeat?

charlieh

unread,
Apr 11, 2015, 7:44:04 AM4/11/15
to ioio-...@googlegroups.com
See attachements.
Fail2.txt
Success2.txt

Ytai Ben-Tsvi

unread,
Apr 11, 2015, 1:15:31 PM4/11/15
to ioio-...@googlegroups.com

What phone is this? Is this its stock OS or some unofficial upgrade? It appears that there might be something wrong at the USB layer, were bytes are either being read multiple times or the IOIO loses connection. There's also a small chance that this is power related. What power supply are you using?

charlieh

unread,
Apr 11, 2015, 2:01:21 PM4/11/15
to ioio-...@googlegroups.com
The IOIO works fine with my old tablet with Android 3.2. I bought a small cheap phone to have a more compact setup. It is the Wiko GOA with stock android. The tablet doesn't drain power from the IOIO while the phone does. The IOIO is powered by an 1800mAh rechargeble batery. Because it works with another phone I suppose that the cause is this cheap phone. So I stick with my old table. Thanks for the support.
I also tried bluetooth. HelloIOIO works fine. But when my application calls openAnalogInput() the phone disconnect. Without openAnalogInput() my application works fine (unfortunately I need analog input).
I use the IOIO for timelapse photograps. The IOIO controlls the camera motion, the exposure interval, exposure duration and compensation.

Ytai Ben-Tsvi

unread,
Apr 12, 2015, 10:41:36 PM4/12/15
to ioio-...@googlegroups.com

Some Bluetooth dongles are less likely than others to exhibit such problems. Try different ones. It is also fairly simple to reduce the analog sampling rate in firmware.

charlieh

unread,
Apr 23, 2015, 4:27:05 PM4/23/15
to ioio-...@googlegroups.com
I started to setup the firmware development environment to be able to reduce the analog sampling rate in the firmware. This is going to take to much time and, reading different posts, many problems can be encountered. Is it possible that a Virtual Linux IOIO development environment (for for example VMWare) is prepared that contains all the tooling to do firmware development for the IOIO, including the latest IOIO firmware sources? This will help new IOIO firmware developers a lot.
About the analog scan rate, I read at several places that there are plans to be able to set the analog sampling rate? How concreet are these plans? Thanks.

Op maandag 13 april 2015 04:41:36 UTC+2 schreef Ytai:

Ytai Ben-Tsvi

unread,
Apr 24, 2015, 12:49:41 AM4/24/15
to ioio-...@googlegroups.com
Frankly, I'm not going to spend too much time supporting firmware developers, under the assumptions that:
  1. Their number is a very small fraction of the number of users.
  2. Most of them probably know what they're doing enough to be able to install 2 applications (toolchain + IDE) and download the source code from GitHub. Once you've gotten this far, there's sufficient information on the ioio-dev forum on how to build and I would be happy to answer questions if there still are any.
I haven't yet gotten around to enabling software control of the rate unfortunately. I agree that this would be a very useful feature to have.

charlieh

unread,
Apr 29, 2015, 4:26:51 PM4/29/15
to ioio-...@googlegroups.com
Ytai, I have setup an ioio firmware VMware Linux based development environment with the latest MPLAB IDE and the latest toolchain, build app_layer_v1, created the ioioapp, loaded it into ioio otg using ioiodude and tested it. My android application works fine. If people are interrested I can make the VMware environment available for the public. Can you pinpoint where I can setup the scanrate op the analog inputs? Thanks.

Ytai Ben-Tsvi

unread,
Apr 29, 2015, 5:57:11 PM4/29/15
to ioio-...@googlegroups.com

charlieh

unread,
Apr 30, 2015, 3:32:44 PM4/30/15
to ioio-...@googlegroups.com
Thanks, I reduced the scanrate to 10 milliseconds and now the bluetooth connection performs reliable.
Reply all
Reply to author
Forward
0 new messages