Hacker News new | ask | show | jobs
by nemik 3782 days ago
It's what fuses and diodes are used for. You know how when you write a program you never trust user-input? This should be the same thing, but physically. A well-designed USB port wouldn't fry the computer like it did.
1 comments

There is a limit on how much user malice should be tolerated vs the cost (additional components used, larger devices etc etc) to implement all of that. Especially as someone can always just rip the device open and circumvent all that causing breakage. How many stops there should be versus malicious usage?

USB devices can handle things like the ground and voltage being shorted, as that can happen in normal use through wear and tear. However the flip of ground and voltage lines can only happen if it is done intentionally. As an example either by malicious user or by a factory just randomly mashing wires together and then lying to the customers that they're selling an USB cable.

Or an untrained or too-tired worker puts the assembly in the jig upside-down and pushes the button. ker-chunk. Then the worker throws the cable in the good bin because he gets paid by the kg of cables produced, and fired if the bad bin fills up.

It's 5A, they could install a polyfuse, or they could monitor the current and turn it off with a transistor.

As I already explained in the previous thread about this cable, current limiting is implemented in USB hosts and chargers and it doesn't help in this case. If the powered device sinks more than 5A of reverse current, it already is dead.

For protection from reverse voltage, the powered device needs a circuit which detects negative voltage and disconnects power (which would easily consume few cm² of PCB area) or a very beefy clamping diode to shunt the negative current into ground before it reaches other circuits and pray that charger's current limiter trips before the diode overheats and vaporizes.

And even if you do that, some idiot can still make a cable which applies -5V to some data line instead of the power line, so that your whole unobtanium Intel southbridge chip goes poof. Are you going to multiply the protection circuit by the number of wires in USB3 cable and at the same time make it pass insanely fast signals without distortion?

At some point you have to give up and simply assume that cable vendors are at least minimally competent.