Live data from Hacker News

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

kau.sh

121–130 of 197 posts

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

#122

I was looking for a USB cable tester (where I would plug in both ends of my cable and it would test it (power, data, ...). There are plenty for Ethernet, but none such ones for USB. Was I looking with the wrong keywords or such device does not exist? Note: I have a dongle that measures the power when inserted between the laptop and the charger, this is not what I am looking for

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 speed until the transmission becomes garbled.

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

#123
post #116

I was looking for a USB cable tester (where I would plug in both ends of my cable and it would test it (power, data, ...). There are plenty for Ethernet, but none such ones for USB. Was I looking with the wrong keywords or such device does not exist? Note: I have a dongle that measures the power when inserted between the laptop and the charger, this is not what I am looking for

I have been planning to get either Witrn K2 or Power-Z KM003C. If just cable testing is enough, the Treedix one is probably good. Related: If you are looking for cables, this guy has tested a bunch (mainly for charging capabilities) https://www.allthingsoneplace.com/usb-cables-1

Can these instruments measure bit error rates?

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

#124

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…

120GB/s is _really_ fast.

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

#125
post #116

I was looking for a USB cable tester (where I would plug in both ends of my cable and it would test it (power, data, ...). There are plenty for Ethernet, but none such ones for USB. Was I looking with the wrong keywords or such device does not exist? Note: I have a dongle that measures the power when inserted between the laptop and the charger, this is not what I am looking for

I have been planning to get either Witrn K2 or Power-Z KM003C. If just cable testing is enough, the Treedix one is probably good. Related: If you are looking for cables, this guy has tested a bunch (mainly for charging capabilities) https://www.allthingsoneplace.com/usb-cables-1

I'd expected to see at least characteristic impedance in that table.

And some metrics on internal reflections.

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

#126
post #114

> Two years ago, I wouldn’t have bothered with the rewrite, let alone creating the script in the first place. The friction was too high. Now, small utility scripts like this are almost free to build. adding to the theory that soon we gonna prefer to write, rather download ready-made code, because the friction is super low

Arguably a one-off written by the cloud would still be downloaded to the place where it eventually runs.

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

#127

This is a vibe coding Trojan horse article. > That’s the real story. Not the script, but how AI changes the calculus of what’s worth our time. Looking at the github source code, I can instantly tell. It's also full of gotchas.

The author literally says this is vibe-coded. You even quoted it. How the hell is this "Trojan horse"? Did the Greeks have a warning sign saying "soldiers inside" on their wooden horse?

No, but it lacked the product safety leaflet.

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

#128
post #96

Fun fact: this information is already available in the System Information app on your Mac. Hardware -> USB I also use the app to check what wattage my cables are when charging my MacBook (Hardware -> Power)

Yes, system_profiler is just a terminal version of System Information.

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

#129
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.

Could you elaborate on "orientation"? Let's say for C-to-C, are you talking about swapping the head/tail? Or simply connecting at a different angle (180 degrees)?

[deleted]

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

#130
post #76

Earlier quoted context omitted.

Could you elaborate on "orientation"? Let's say for C-to-C, are you talking about swapping the head/tail? Or simply connecting at a different angle (180 degrees)?

Probably 180 degrees rotation in the plug (on either end). It commonly happens if one of the contacts or conductors for USB-PD signalling is not working correctly. (because of the way the pinout is designed to work either way around, the conductors that are used for signalling swap roles depending on the orientation)

Yep, 180 degree rotation.
Post reply on HN