Live data from Hacker News

A macOS terminal command that tells you if your USB-C cable is bad

kau.sh

181–190 of 197 posts

Re: A macOS terminal command that tells you if your USB-C cable is bad

#181

Earlier quoted context omitted.

What do you mean "testing" it, reading hardcoded data from e-marker chip, or really test it? The later would require multi-thousands dollar machine.

I'm curious as to why it is so expensive? Admittedly I know very little about electronics, and naturally the validation testing that a cable manufacturer does is going to be more thorough, but for consumer-grade testing couldn't we just have an FPGA or microcontroller scream the fibonnaci sequence in one end and another listen for the fibonnaci sequence on the other end? Sort of like memtest but instead ramping up sp…

Sure. If it's easy, then it's easy.

For a "regular" USB C that supports USB 2.0 speeds (and is rated for 60W and therefore lacks an internal e-marker chip), there's just 5 wires inside: Two for data, two for power, and one for CC. There's nothing particularly complex about testing those wires for end-to-end continuity (like a cheapo network cable tester does).

A charging-only cable requires only 3 wires.

But fancier cables bring fancier functions. Do you want to test if the cable supports USB 3? With one lane, or two lanes? USB 4? Or what of the extra bits supporting alt modes like DisplayPort and MHL and the bag of chips that is Thunderbolt -- does that need all tested, too? (And no, that earlier 120Gbps figure isn't a lie.)

And power? We're able to put up to -- what -- 240W through some of these cables, right? That's a beefy bit of heat to dissipate, and those cables come with smarts inside of them that need negotiated with.

I agree that even at extremes, it's still somewhere within the realm of some appropriate FPGA bits or maybe a custom ASIC, careful circuit layout, a big resistor, and a power supply. And with enough clones from the clone factories beating eachother up on pricing, it might only cost small hundreds of dollars to buy.

So then what? You test the fancy USB-C ThunderBolt cable with the expensive tester, and pack it up for a trip for an important demo -- completely assured of its present performance. And when you get there, it doesn't work anyway.

But the demo must proceed.

So you find a backup cable somewhere (hopefully you thought to bring one yourself, because everyone around you is going to be confused about whatever it is that makes your "phone charger" such a unique and special snowflake that the ones they're trying to hand to you cannot ever be made to work), plug that backup in like anyone else would even if they'd never heard the term "cable tester," and carry on.

The tester, meanwhile? It's back at home, where it hasn't really done anything but cost money and provide some assurances that turned out to be false.

So the market is limited, the clone factories will thus never ramp up, and the tester no longer hypothetically costs only hundreds of dollars. It's right back up into the multiple-$k range like the pricing for other low-volume boutique test gear is.

(I still want one anyway, but I've got more practical things to spend money on...like a second cable to use for when the first one inevitably starts acting shitty.)

Re: A macOS terminal command that tells you if your USB-C cable is bad

#183

> I was punching through my email actively as Claude was chugging on the side. I wonder how much writing these scripts cost. Were they done in Claude's free tier, pro, or higher? How much of their allotted usage did it require? I wish more people would include the resources needed for these tasks. It would really help evaluate where the industry is in terms of accessibility. How much is it reserved for those with suf…

You could do this with the free tier. It's fairly generous.

Re: A macOS terminal command that tells you if your USB-C cable is bad

#184
I feel like I need to point out that this tool does not do, in any way, what the title claims. Parsing the output of the system profiler tool will not tell you whether your cable is "good", which in practice tends to mean that it supports the protocol the user cares about at that moment. For some examples: If you connect a Thunderbolt only cable to a USB4 only device, this approach will give you no information about why things are not working. If you connect a USB2 only cable to a Display-Port Alternate Modal display, this approach will not tell you anything about why your display is not turning on.

Re: A macOS terminal command that tells you if your USB-C cable is bad

#185

Earlier quoted context omitted.

The audio community love this sort of thing and will pay top dollar for unidirectional cables. Reproducible data proving the claims could be worth millions.

well, if you listen to audio you would not want the audio to accidentally get confused and head back to where it came from halfway down the cable right?

Audio people lost me when they complained about tape hiss being an issue with Digital Audio Tape. They then moved on to gold plated terminals and left twisted vs right twisted pairs wires inside multi conductor cables.

Re: A macOS terminal command that tells you if your USB-C cable is bad

#186
I supported this kickstarter and got the device. It works well. I think they might still be producing them commercially, if I remember correctly.

Great for identifying not just bad cables, but also data rates.

https://www.kickstarter.com/projects/electr/ble-caberqu-a-di...

Re: A macOS terminal command that tells you if your USB-C cable is bad

#187
post #5

It's more complicated than "this cable is good/bad". I had a suspicion about one of my cables for months, but just last week I confirmed it with a device that shows the volts/amps/watts/total kwh passing through it: I have a USB-C cable with orientation. Plugged in one way it transfers about 5x more power than the other way, and in the lower orientation it's low enough for the earbud case I use it with to not charge.

I still prefer cables that are USB-A on one side for exactly this reason. Directionality is totally fine and even expected if one end is USB-A, but for a symmetrical looking cable it's a terrible idea.

Re: A macOS terminal command that tells you if your USB-C cable is bad

#188

Earlier quoted context omitted.

What's your point? That we shouldn't care about anything at all because there is 1 thing we truly shouldn't care about? That we shouldn't care about spending $1 for a sandwich therefore managing home budget is pointless?

My point is, you should care what you work with, and it's perfectly fine to not know the lower detail. Different people will care different layers.

I don't agree to this, but even if we assume I do, then all abstractions are still leaky, so in practice it's often simply impossible to not care about lower details.

https://en.wikipedia.org/wiki/Leaky_abstraction

Not caring about lower details in the expert domain is simply carelessness. We also need to consider how the abstraction layers are merged and what is the outcome. Abstraction layers are a tool, they are not the immutable environment we are operating in.

Clients can have the luxury of not knowing what is in the details, but not programmers.

Re: A macOS terminal command that tells you if your USB-C cable is bad

#190

Is there a reason we can't plug a usb c cable with BOTH ends into the same computer and then get a full diagnostic on just the cable itself?

I was able to charge my macbook from itself using that technique.

On this site we obey the laws of thermodynamics.
Post reply on HN