Page 1 of 1

How to properly extend an OTG cable?

Posted: Fri Apr 22, 2022 2:15 pm
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

Re: How to properly extend an OTG cable?

Posted: Fri Apr 22, 2022 2:47 pm
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?

Re: How to properly extend an OTG cable?

Posted: Fri Apr 22, 2022 3:50 pm
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).

Re: How to properly extend an OTG cable?

Posted: Fri Apr 22, 2022 5:09 pm
by aberu
What's the usb hub that you have?

Re: How to properly extend an OTG cable?

Posted: Fri Apr 22, 2022 5:20 pm
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.

Re: How to properly extend an OTG cable?

Posted: Sat Apr 23, 2022 9:37 am
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

Re: How to properly extend an OTG cable?

Posted: Sat Apr 23, 2022 9:52 am
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

Re: How to properly extend an OTG cable?

Posted: Mon May 02, 2022 11:28 pm
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.

Re: How to properly extend an OTG cable?

Posted: Tue May 03, 2022 6:58 pm
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.

Re: How to properly extend an OTG cable?

Posted: Mon May 09, 2022 7:44 pm
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!

Re: How to properly extend an OTG cable?

Posted: Mon May 09, 2022 8:08 pm
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.

Re: How to properly extend an OTG cable?

Posted: Sat May 14, 2022 9:17 am
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