How to properly extend an OTG cable?

Showcase builds, discuss cases, embedding MiSTer into existing computer cases.
User avatar
Bren McGuire
Posts: 96
Joined: Tue Mar 01, 2022 7:49 am
Has thanked: 84 times
Been thanked: 5 times

How to properly extend an OTG cable?

Unread post by Bren McGuire »

Due to space constraints reasons I need to use this cable to connect the USB hub: (see below)

The problem is that the cable ends with a female micro USB and my USB hub also has a female micro port as input. So, how do I extend it? Will a normal male/male micro USB cable work or do I need another OTG cable, or maybe something else entirely?


OTG cable:
descriptionimage3-Hf80a43969d054a86bbcadd04c90059be-O.jpg

Example of another OTG cable that I was thinking to use as extension of the one above:
mainimage0-Micro-USB-tipo-B-maschio-a-Micro-B-maschio-convertitore-a-5-Pin-adattatore-OTG-cavo.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
Hectic
Posts: 47
Joined: Tue Jun 09, 2020 3:23 am
Been thanked: 10 times

Re: How to properly extend an OTG cable?

Unread post by Hectic »

Connect cable 1 to DE10 Nano and cable 2.
Connect cable 2 to cable 1 and USB hub.

Was that the answer of the quid?
User avatar
Bren McGuire
Posts: 96
Joined: Tue Mar 01, 2022 7:49 am
Has thanked: 84 times
Been thanked: 5 times

Re: How to properly extend an OTG cable?

Unread post by Bren McGuire »

Hectic wrote: Fri Apr 22, 2022 2:47 pm Connect cable 1 to DE10 Nano and cable 2.
Connect cable 2 to cable 1 and USB hub.

Was that the answer of the quid?
So, it's OK to connect two OTG cables together? I asked because OTG cables have a "verse" (i.e. the plug that goes on the host is different from the plug that connects to the USB hub).
User avatar
aberu
Core Developer
Posts: 1192
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 247 times
Been thanked: 411 times
Contact:

Re: How to properly extend an OTG cable?

Unread post by aberu »

What's the usb hub that you have?
birdybro~
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: How to properly extend an OTG cable?

Unread post by jca »

A regular USB-A plug had 4 pins: 2 for power, 2 for data.
A micro USB plug had 5 pins, on a non OTG cable this extra pin is unused, on a OTG cable the side connected to the host has that extra pin to ground (originally), later on that pin is connected to ground via a 1K resistor (this is for charging phone/tablet).
This is the reason why your OTG cable which had 2 micro USB plugs has to be connected a certain way. The side of the cable which goes to your hub is not using this extra pin.
You have to plug your OTG cable into the DE-10 nano and the extension cable from the OTG cable to the hub. To connect the extension cable to the DE-10 nano and the OTG cable to the extension cable you would have to make sure that this extension cable has 5 conductors, if it does not your OTG cable would become a regular USB extension cable.

On my MISTer I have a micro USB to USB A OTG cable and a USB A to mini USB (not micro) going to the hub so I have only one way to connect everything together.
User avatar
Bren McGuire
Posts: 96
Joined: Tue Mar 01, 2022 7:49 am
Has thanked: 84 times
Been thanked: 5 times

Re: How to properly extend an OTG cable?

Unread post by Bren McGuire »

aberu wrote: Fri Apr 22, 2022 5:09 pm What's the usb hub that you have?
This one:
51-B3-Bi-Kqsz-L-AC-SL1080.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
Bren McGuire
Posts: 96
Joined: Tue Mar 01, 2022 7:49 am
Has thanked: 84 times
Been thanked: 5 times

Re: How to properly extend an OTG cable?

Unread post by Bren McGuire »

jca wrote: Fri Apr 22, 2022 5:20 pm you would have to make sure that this extension cable has 5 conductors, if it does not your OTG cable would become a regular USB extension cable.
Thanks, this is what I wanted to know. I think I found one but if it doesn't work it shouldn't be too hard to make a custom cable with 5 wires.

https://www.aliexpress.com/item/1005002006538921.html
CRTified
Posts: 13
Joined: Thu Feb 10, 2022 1:40 am
Has thanked: 8 times
Been thanked: 5 times

Re: How to properly extend an OTG cable?

Unread post by CRTified »

Re: making your own / modifying an existing cable to be OTG.

Just be aware that some of the generic MicroUSB cables out there don't even have the 5th contact present within the plugs (it's just blank/plastic, instead). Which makes those particular kinds, difficult-to-impossible to modify into OTG cables.

However, some other generic MicroUSB cables DO have the 5th contact in place within the plugs, and it's those that you can hack up and turn into OTG adapters for use with generic (non-OTG) USB hubs.
User avatar
Bren McGuire
Posts: 96
Joined: Tue Mar 01, 2022 7:49 am
Has thanked: 84 times
Been thanked: 5 times

Re: How to properly extend an OTG cable?

Unread post by Bren McGuire »

CRTified wrote: Mon May 02, 2022 11:28 pm Re: making your own / modifying an existing cable to be OTG.

Just be aware that some of the generic MicroUSB cables out there don't even have the 5th contact present within the plugs (it's just blank/plastic, instead). Which makes those particular kinds, difficult-to-impossible to modify into OTG cables.

However, some other generic MicroUSB cables DO have the 5th contact in place within the plugs, and it's those that you can hack up and turn into OTG adapters for use with generic (non-OTG) USB hubs.
OK, thanks for the tip. I'm currently waiting for the cables to arrive, and I also ordered some standalone micro USB plugs, they were listed as "5 pin", so if the cable doesn't work hopefully they'll do the job.
AmintaMister
Posts: 313
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 840 times
Been thanked: 51 times

Re: How to properly extend an OTG cable?

Unread post by AmintaMister »

Sorry, what is the technical and practical difference betweenn a MicroUSB OTG and not OTG cable to connect Usb hubs directly to MiSTer?

Thanks!
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: How to properly extend an OTG cable?

Unread post by jca »

Take a phone/tablet for example. If you connect it to a PC with a non OTG cable it will show up as a drive, it becomes a peripheral of the PC. If you want to connect a peripheral to a phone/tablet you need to use an OTG cable. If for example you connect an OTG HUB to your phone you can use a KB + Mouse + USB HD.
User avatar
Bren McGuire
Posts: 96
Joined: Tue Mar 01, 2022 7:49 am
Has thanked: 84 times
Been thanked: 5 times

Re: How to properly extend an OTG cable?

Unread post by Bren McGuire »

Update: the cables arrived, everything works.

This is the cable: https://www.aliexpress.com/item/1005001450852259.html

And this is the extension (in case someone needs them): https://www.aliexpress.com/item/1005002006538921.html
Post Reply