I was wondering why almost all USB cables that exist are USB-A to (Micro-USB | USB-C | USB-B | etc.)
Why was USB-A to USB-A not a popular thing? Is there a technical reason this cannot work?
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It only takes a minute to sign up.Sign up to join this community
USB-A male to USB-A female is fine. They exist, and are relatively common. They work just fine as USB extension cables, provided the overall length is not too long. For longer distances, active cables exist that contain an internal repeater or USB hub to regenerate the signal. However, you may run in to power delivery issues due to voltage drop.
USB-A male to USB-A male is dangerous. It is also not compliant with the USB specification*. They also exist, though I am not really sure why. Perhaps because the USB-A connector is shorter than the USB-B connector, so chinese external hard drive enclosure vendors decided to use it because it was a half a cent cheaper than the proper connector. A USB-A male to USB-A male cable is similar to a line cord with a male plug on both ends. You should never, ever use one of these. There are several problems. First of all, USB does not allow two USB hosts to be connected to each other. The software stack does not support it. You cannot simply connect two computers to each other via USB and have them talk to each other without inserting some component in the middle, such as two back-to-back USB to Ethernet converters or similar. USB on-the-go is a slightly different story as a USB OTG device will switch roles between host and device. USB OTG also uses a different connector entirely, an A/B variant that accepts both A and B type connectors, which only exists in the smaller sizes.
But this is not what makes USB-A to USB-A cables dangerous. What makes them dangerous is that the USB cable provides power, and USB hosts are in general not designed to accept power coming in the wrong way. If you connect two computers together with a USB-A to USB-A cable, their 5V supplies are almost certainly not at the same voltage, so one of them will power the other one through the USB cable. This in and of itself is not really a major problem, provided the source has appropriate current limiting to prevent the cable heating up and starting a fire. The problem really comes when one of the devices is turned off. Now, you have an external 5V supply coming in to a powered-off device that isn't designed to handle it. This can damage components on the motherboard in one or both devices. Also, USB devices are in general designed to draw less than 500 mA, but whatever is hanging off of the 5V rail inside a host could draw orders of magnitude more than that.
USB-C is a different story as is specifically designed to have identical connectors on both ends. Not only that, it is explicitly designed to support charging a host device via a USB C connector. As a result, USB C devices have to be designed to handle this situation appropriately.
*except for some extremely rare cables that you will most likely never come across that don't connect the 5V power, which are effectively indistinguishable from non-compliant cables unless you pull out a multimeter.
Because it's against the standard. The USB standard says that type A is for hosts, and type B is for devices.
In practical terms, a device with a type A connector is expected to provide power, so if you connect two of them together, they will attempt to power each other, leading most likely to Bad Things Happening. Type C gets around this by a negotiation mechanism.
USB-A to USB-A cables are in fact legal. It's in the USB 3.x specification and it has been since at least 2011. I clipped the image below out of the USB 3.0 specification document published in June 2011. This cable is safe to connect two hosts together because the VBUS line is not connected. The D+ and D- lines used for USB 1.1/2.0 backward compatibility is also not connected, making this a USB 3.x-only cable. The "superspeed" data lines are crossed over for 5Gbps or 10Gbps data transfer.
It is true that the type A connector is for hosts but what has not been true for years is that host to host connections are not allowed by the USB spec. I do wish this kind of cable was more popular since this would provide a very fast connection with a relatively inexpensive cable. This would be quite useful as well since on some newer computers there aren't many ports except USB. All it should take to make this work for connecting two computers to create a serial-like or Ethernet-like connection is the right software.
I stumbled across this article when searching for this very type of cable. In fact, I already have one but I need one that is a little longer. They aren't common, but they do exist.
My mini studio mixer has a USB bus for in & out. The USB socket will also take a USB stick to play audio files, or even record audio onto the stick. Both connection options use the same USB (A) socket.
I assume this isn't dangerous as the mixer is mains powered, and therefore the pins that would normally receive 5v of USB power probably aren't connected inside the mixer.
USB male-to-male A-A cables are not common in consumer products because:
The lack of visual cue as to wiring and the lack of specification before version 3 could result in unsafe or damaging connections in a consumer context.
However, USB 3 male-to-male A-A cables are an essential part of the hardware toolkit for embedded software developers, but not for "host-to-host connection, such as for operating system debugging" as suggested by the standard, but for device development.
SBC's (single board computers) such as the SolidRun HummingBoard Pulse have a connector with two USB 3 type A female sockets that are wired to a DesignWare3 (dwc3) USB controller in the NXP i.MX8 SoC on which the SBC is based. By modifying the Linux device tree file (the .dts) you can configure the one of these two dwc3 ports to be a USB "device" port. When you do this you can use the SBC to develop a new USB "gadget" (Linux parlance for a USB device) but then to use it as a device you need a USB 3 male-to-male A-A cross cable as defined in the standard or similar.