[SOLVED] Issue Switching OTG Bus

Discussion in 'Android' started by Matt Ball, Feb 4, 2016.

  1. Matt Ball

    Matt Ball New Member

    Joined:
    Feb 4, 2016
    Messages:
    4
    Likes Received:
    0
    I'm getting issues when switching the OTG bus between the USB port for ADB and the SAM3X for ADK.

    I have a working sketch, which connects as an Android accessory; however, when I switch the OTG bus to the USB port to load a new app and switch back again, the same sketch running on the SAM3X won't connect as an accessory - rather it connects as a USB debug connection.

    I've tried switching this via both the GUI and setting the GPIO pins manually as described in http://www.udoo.org/docs/Android/UDOO_Switch_Between_Adb_Debug_And_ADK_Connection and get the same issue either way.

    Has anyone experienced a similar issue or have any ideas what may be causing it?
     
  2. Matt Ball

    Matt Ball New Member

    Joined:
    Feb 4, 2016
    Messages:
    4
    Likes Received:
    0
    So it turned out to be a problem in the Arduino sketch.
    There was a delay(1000) at the end of the loop, which apparently stops Android recognising it as an accessory. I suspect there is some kind of timeout in Android that this breaks.
     
  3. Andrea Rovai

    Andrea Rovai Well-Known Member

    Joined:
    Oct 27, 2014
    Messages:
    1,703
    Likes Received:
    240
    Thanks for pointing this out, we were unaware of this issue.
     

Share This Page