Earlier quoted context omitted.
Wait what. I thought half the point of usb c was to not rely on orientation. Is there any way to check this other than experiment? My "solution" so far has been to not buy cheap cables and just hope I get quality in return.
I think that I have a specific cable-device-orientation that is broken. Meaning, I think a particular USB C cable won't charge my phone if it's plugged in 'backwards'. I always assumed that USB C cables use different pins depending on orientation, and that some pins on the cable wore down. Maybe that's what happened here?
A macOS terminal command that tells you if your USB-C cable is bad
21–30 of 197 posts
Re: A macOS terminal command that tells you if your USB-C cable is bad
#22> The script parses macOS’s system_profiler SPUSBHostDataType2 command, which produces a dense, hard-to-scan raw output I couldn’t find source (the link in the article points to a GitHub repo of a user’s home directory. I hope for them it doesn’t contain secrets), but on my system, system_profiler -json produces json output. From that text, it doesn’t seem they used that.
* https://github.com/kaushikgopal/dotfiles/blob/master/bin/usb...
Presumably there is a sensible way to do this in go by calling an API and getting the original machine-readable data rather than shelling out to run an entire sub-process for a command-line command and parsing its human-readable (even JSON) output. Especially as it turns out that the command-line command itself runs another command-line command in its turn. StackExchange hints at looking to see what API the reporter tool under /System/Library/SystemProfiler actually queries.
Re: A macOS terminal command that tells you if your USB-C cable is bad
#23It'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.
Wait what. I thought half the point of usb c was to not rely on orientation. Is there any way to check this other than experiment? My "solution" so far has been to not buy cheap cables and just hope I get quality in return.
Re: A macOS terminal command that tells you if your USB-C cable is bad
#24Earlier quoted context omitted.
yeah sorry about that. I don't have access to a Linux/Windows machine. if I got a hold of the output and commands run, would gladly modify it.
fwiw, it would take 10 minutes to download a linux docker image and build it in go to test. The harder part is getting the information from a different API on Linux.
Re: A macOS terminal command that tells you if your USB-C cable is bad
#25Re: A macOS terminal command that tells you if your USB-C cable is bad
#26Re: A macOS terminal command that tells you if your USB-C cable is bad
#27Please update the title to mention that this is MacOS only; I got excited to try this out, but I only have laptops running Linux and Windows.
yeah sorry about that. I don't have access to a Linux/Windows machine. if I got a hold of the output and commands run, would gladly modify it.
Re: A macOS terminal command that tells you if your USB-C cable is bad
#28Two 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. This aligns with the hypothesis that we should see and lots lots of "personalized" or single purpose software if vibe coding works. This particular project is one example. Are there a ton more out there?
These are all things I could do myself but the trade off typically is not worth it. I would spend too much time learning details and messing about getting it to work smoothly. Now it is just a prompt or two away.
Re: A macOS terminal command that tells you if your USB-C cable is bad
#29It'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.
Wait what. I thought half the point of usb c was to not rely on orientation. Is there any way to check this other than experiment? My "solution" so far has been to not buy cheap cables and just hope I get quality in return.
Re: A macOS terminal command that tells you if your USB-C cable is bad
#30Please update the title to mention that this is MacOS only; I got excited to try this out, but I only have laptops running Linux and Windows.