0
\$\begingroup\$

If Micro USB B of USB 2.0 is set to Host with USB OTG, is it dangerous if connected to a USB-A-female port that isn't running USB OTG?

From what I understand.. Micro USB B, of USB 2.0 has a pin that enables it to run as host, and that is USB OTG. And some devices with Micro USB B of USB 2.0 haven't connected that pin, and they need an adaptor and the adaptors tend to go to USB-A-Female.

For this question it shouldn't make a difference if there's an adaptor attached or not. So let's say there's no adaptor. Just that the Micro USB B of USB 2.0, is using USB OTG and set to Host.

I want to move from that example for a moment, and establish a few things..

If two USB-A-Female connector of one computer is connected to a USB-A-Female connector of another computer, both are hosts, neither are USB OTG. It's just USB-A-FEmale straight from the motherboard, no USB OTG adaptor. No B connector anywhere. And suppose they were connected with an illegal cable, a cable that is USB-Male-A on both ends. Then from what I understand, that's potentially dangerous.

Now suppose you have a computer e.g. pi zero, or a smartphone, with a Micro USB B USB 2.0 connector. And another such device. You have an OTG adaptor in one making one of them a USB-A-Female. And both devices are set to OTG Host. Then I would think no damage would be done. Clearly it wouldn't work. But I think that OTG circuitry would have taken into account that scenario and no damage would be done.

Now though, back to my question's example.

Suppose one computer/smartphone's USB is OTG and the other isn't, and both are hosts. That's my question of "If Micro USB B of USB 2.0 is set to Host with USB OTG, is it dangerous if connected to a USB-A-female port that isn't running USB OTG?"

And perhaps one consideration is maybe the answer depends on , or has to take into consideration, which version of USB the non-OTG Host is e.g. USB 1 was pre OTG. OTG seems to have been added at some point early within the development of USB 2.0 but after its release. So there could be some early USB 2.0 that don't support OTG and later ones, that do.

Could damage be done?

So, if you see a Micro USB B of USB 2.0 port, that might be set to host. Is it always safe to connect it to any USB port? Safe for the device that owns that Micro USB B port of USB 2.0, and safe for the device it connects to.

\$\endgroup\$
1

1 Answer 1

1
\$\begingroup\$

When everything is following the USB spec then any connection where the cables fit together should be safe. The problem is that far too many manufacturers decided the USB spec was more of a suggestion than a requirement. It sounds like you have one of those devices that aren't following the spec.

What sets a USB-OTG port (with 5 pins) to host or peripheral is the "extra" ID pin that does not exist on the full sized USB connectors (with 4 pins). If your OTG device uses an illegal adapter with a micro-B plug to full sized A port then the ID pin will tell the device to put the port into host mode. That makes full sized A port no different in function than a full sized A port on a non-OTG host, it is now supplying 5 volt power to the port and connecting an illegal A-to-A cable between it and another USB host could damage something.

Even if both devices you are connecting use USB-OTG there will be a high chance of damage if using an illegal A-to-A cable.

There is such a thing as an A-to-A cable that follows the USB spec. These legal A-to-A cables are for USB 3.x hosts, not USB 2.0 or USB-OTG. They avoid the issues of shorting out the power supply by not having those pins connected, they connect only ground and the USB 3.x "superspeed" lines. Again, this legal A-to-A cable is not describing USB-OTG or USB 2.0, this is for connecting USB 3.x hosts only. If such a cable is used on a USB 2.0 host then it does nothing because the data and power lines used for USB 2.0 are left as open circuit.

If you connect an illegal A-to-A cable to an illegal B-to-A OTG adapter the result will have an A plug on one end and a B plug on the other but this will likely damage something if used. Two wrongs don't make a right. The ID pin in that micro-B plug will be telling the OTG port to go into host mode, which means it is going to supply power. That means it is supplying power to another host, which can damage something.

What an OTG device is supposed to do is have a mini-AB or micro-AB port, a port that will accept either an A or B plug. Then the user should be able to use a standard A to B cable to connect this OTG device to a host or peripheral based on if the A or B end of the cable is plugged into the AB port. But what happened in practice is manufacturers used a B port that was wired for AB to save a few pennies on parts and licensing. Then to "fix" this illegal use of the B port they created an illegal B-to-A adapter.

Because of this mess it appears that the people that created the micro and mini ports are doing their best to make them disappear. Because of how popular the micro-B port became it has a lot of inertia. The popularity of micro-B was helped along by the non-standard applications of this port, such as what you discovered. This means a lot of non-standard cables, power supplies, and devices out in the world that can do damage to products that did follow the spec. Isn't this fun?

\$\endgroup\$
1
  • \$\begingroup\$ You write "It sounds like you have one of those devices that aren't following the spec." <-- I don't.. But I think i've used some that do. The Raspberry pi zero, and the Google Nexus 4 "smartphone". \$\endgroup\$
    – barlop
    Jul 24, 2022 at 3:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.