USB OTG Cabling

Home Forums Hardware AutoSense Shield USB OTG Cabling

This topic contains 7 replies, has 2 voices, and was last updated by Profile photo of Eric Eric 1 year, 2 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2822
    Profile photo of -Jeff-
    -Jeff-
    Participant

    School me on these cables..

    I understand pin 4 is shorted with pin 5 on the micro USB end to put the Android on OTG mode, but with the DUE and the shield, why is an OTG Cable needed? since you are not shorting the pin on android?

    Reason I ask is there are HOST ports on my my Android stick and Android Box for the NU3001. I assume those are internal shorted? although on my stick, a mouse works in the host port.

    I am really looking for a simple one cable solution ( less connections less chance for issue) from the DUE to Android

    #2823
    Profile photo of Eric
    Eric
    Keymaster

    The OTG is needed of the Due side for the exact same reason.  The shorted pins tell the Due to go into host mode.  If they aren’t shorted then it will be in slave mode.

    The Host port on your Android devices are internally set, weather it’s a shorted pin or done in software it doesn’t matter, they’re always host.

    You could use plug the Due into the host port and the Android.  You would plug the large USB type A connector into the Android, and the micro end into the Due’s “Programming Port”.  This will tell the Android device that the Due is a “USB Device” vs a “USB Accessory”.  This is the feature @that_kidd wants and I have been working on implementing.  It currently works, but not very well.  You can try it and let me know, but it seems a lot of commands aren’t successfully sent between the two devices just yet.

    So my recommendation is to stick with what you’ve got, OTG plugged into the Due which will use Android Accessory Mode.

    More info from Google

    #2824
    Profile photo of -Jeff-
    -Jeff-
    Participant

    Okay.. so want to keep the DUE as host, I did not realize it needed the ID pin shorted to ground. I can do that and then I could (in theory) merge it with a Mini USB to make it work correctly

    Meaning the Micro USB end with 4 and 5 shorted in to the DUE and then the mini USB into the OTG of the Android ( 4 and 5 NOT shorted)

     

    I just want a straight cable solution, less connections the better

    #2825
    Profile photo of Eric
    Eric
    Keymaster

    That should work just fine. If you manually start the ID pin on the Arduino, you could just use a regular male to male micro USB cable.

    #2826
    Profile photo of -Jeff-
    -Jeff-
    Participant

    Cool . I will make a shorted 4pin 4-5 micro connector with a mini at the other end.. this way it is a solid connection..  ( less to come apart)

    #2827
    Profile photo of Eric
    Eric
    Keymaster

    that’s a good idea. Maybe something else I can offer for sale

    #2828
    Profile photo of -Jeff-
    -Jeff-
    Participant

    Any issues with leave the V+ disconnected? since the shield powers the board and I will then not get power from Android to the DUE..

    #2829
    Profile photo of Eric
    Eric
    Keymaster

    Shouldn’t be.

  • Author
    Posts
  • #2822
    Profile photo of -Jeff-
    -Jeff-
    Participant
    • Offline

    School me on these cables..

    I understand pin 4 is shorted with pin 5 on the micro USB end to put the Android on OTG mode, but with the DUE and the shield, why is an OTG Cable needed? since you are not shorting the pin on android?

    Reason I ask is there are HOST ports on my my Android stick and Android Box for the NU3001. I assume those are internal shorted? although on my stick, a mouse works in the host port.

    I am really looking for a simple one cable solution ( less connections less chance for issue) from the DUE to Android

    #2823
    Profile photo of Eric
    Eric
    Keymaster
    • Offline

    The OTG is needed of the Due side for the exact same reason.  The shorted pins tell the Due to go into host mode.  If they aren’t shorted then it will be in slave mode.

    The Host port on your Android devices are internally set, weather it’s a shorted pin or done in software it doesn’t matter, they’re always host.

    You could use plug the Due into the host port and the Android.  You would plug the large USB type A connector into the Android, and the micro end into the Due’s “Programming Port”.  This will tell the Android device that the Due is a “USB Device” vs a “USB Accessory”.  This is the feature @that_kidd wants and I have been working on implementing.  It currently works, but not very well.  You can try it and let me know, but it seems a lot of commands aren’t successfully sent between the two devices just yet.

    So my recommendation is to stick with what you’ve got, OTG plugged into the Due which will use Android Accessory Mode.

    More info from Google

    #2824
    Profile photo of -Jeff-
    -Jeff-
    Participant
    • Offline

    Okay.. so want to keep the DUE as host, I did not realize it needed the ID pin shorted to ground. I can do that and then I could (in theory) merge it with a Mini USB to make it work correctly

    Meaning the Micro USB end with 4 and 5 shorted in to the DUE and then the mini USB into the OTG of the Android ( 4 and 5 NOT shorted)

     

    I just want a straight cable solution, less connections the better

    #2825
    Profile photo of Eric
    Eric
    Keymaster
    • Offline

    That should work just fine. If you manually start the ID pin on the Arduino, you could just use a regular male to male micro USB cable.

    #2826
    Profile photo of -Jeff-
    -Jeff-
    Participant
    • Offline

    Cool . I will make a shorted 4pin 4-5 micro connector with a mini at the other end.. this way it is a solid connection..  ( less to come apart)

    #2827
    Profile photo of Eric
    Eric
    Keymaster
    • Offline

    that’s a good idea. Maybe something else I can offer for sale

    #2828
    Profile photo of -Jeff-
    -Jeff-
    Participant
    • Offline

    Any issues with leave the V+ disconnected? since the shield powers the board and I will then not get power from Android to the DUE..

    #2829
    Profile photo of Eric
    Eric
    Keymaster
    • Offline

    Shouldn’t be.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.