Hacker News new | ask | show | jobs
by xg15 1994 days ago
Apart from the processors, I'm amazed/bewildered that USB is now complex enough, that the power component of it has its own serial communication protocol (USB-PD), which also has a vendor registry and is extensible with proprietary messages - and by the looks of it, is already in widespread use for all sorts of things that have nothing to do with power delivery.

Isn't this sort of reinventing USB on top of USB?

7 comments

When I lost the charger for my Nintendo DS, I was able to MacGyver one out of a piece of cardboard and two strips of aluminium foil.

A quick look at the USB-A port spec, and pin locations on the similar-to-USB-but-proprietary DS charging port indicated it was a very simple construction.

Amazingly, this hack worked successfully and I was able to have my yearly Elite Beat Agents binge. The hardest part was actually not building the "cable" but balancing and bending it all just right so that the pins actually maintained contact.

Now, in the days of complex calculated power delivery negotiation, a hack like this would be impossible.

And for good reason. Devices are safer now, more compatible with each other's chargers, and can charge faster. And the things we can do with USB-C/USB-PD are fantastic. I discovered yesterday that if for some reason I really want to, I can charge my MacBook Pro from my Android phone.

But my little foil hack was fun at the time.

I forgot to take my MacBook Pro's charger with me but could still charge it using my iPad's charger (USB-A to USB-C, mind you) - albeit very slowly. Still better than nothing, though. If only iPhones had USB-C…
Yes, Apple seems to be very confused in this regard. They’ve committed to USB-C for all of their computers, but then are continuing to push lightning for all the other portable devices.

It’s hard not to be annoyed at them about this. Enough to not buy Apple again? No, not yet, but I’d be lying if it’s not a reason why I’ve delayed purchasing a new device. It leaves a bad taste in my mouth, and makes me grumpy. So I’ll wait to upgrade to the last moment.

On a similar note, it seems Nintendo with the switch has hobbled USB-C in some way that standard equipment won’t work with it, like charging over generic USB-C, is this accurate? Has Sony similarly hobbled the spec for PS4/5?

As I understand it, Nintendo didn't intentionally hobble their USB-C port, they just screwed up the Power Delivery implementation. (And didn't care enough to fix it.)

Some chargers are tolerant of Nintendo's mistakes, others aren't.

The dock uses a non-standard implementation of USB-PD, the Switch itself can charge just fine with just about any charger, though. As I understood it, the dock randomly switches between different voltages depending on load, while portable mode uses plain old USB-PD with a consistent charge. While you can use the dock with Apple's 61W charger, it's not really recommended, since it can still get bricked with a software update. The 87W/96W charger isn't safe for the dock at all.
> Apple... committed to USB-C for all of their computers, but then are continuing to push lightning for all the other portable devices.

Ipad pro and the new ipad air have a type C connector. My phone and watch use cables that plug into the same Type C brick I use for my Mac.

But nitpicking examples aside I agree that they should ditch lightning. It's still entrenched for all the other devices.

USB-C is now a requirement for me to upgrade my iPhone. I'm holding onto my XS until they switch to that.
I had to clean the lightning socket on my iPhone XS as it had some pocket fluff inside that prevented the cable from filling clicking in. Cleaning it was trivial, just some cardboard and a well positioned light source.

On the flip side, cleaning out USB-C sockets from the same types of fluff is a pain because the data pins are in an island in the middle of the socket. Which gives you both less room (is requiring you to use a thinner implement) but also a greater risk of damaging the socket.

USB micro had the same problems as well.

I really with USB would address this because, with the best will in the world, devices sometimes get dirty.

> Which gives you both less room (is requiring you to use a thinner implement) but also a greater risk of damaging the socket.

A flattened wood toothpick works great for this. Take a regular round pointy toothpick and flatten the end 5mm or so by squeezing it in a pair of pliers or some such.

I was ready to replace my phone until I learned this trick. I had already tried cleaning the port out, but obviously not well enough.

I think we’re more likely to see a port-less (read MagSafe only) iPhone sooner than a USB-C version. I will say the iPad Pro with USB-C was a revelation for usability though. Not to mention companies like Flir being able to create one product line.
I don’t know about that. The physical port is still useful for hard resets and management of a “bricked” device (granted I’ve only needed that on an older device, and never on the model I currently have).
The future of iPhone charging is wireless. The current iPhone12 with MagSafe is the first of the new system. I predict future iPhones will have no physical ports at all, 100% wireless.
The lack of USB-C is the reason I didn't replace my Airpods with more Airpods when their battery died.

(Still looking for a decent replacement -- I unfortunately cannot use the kind that has those rubber seal plug things, I must have the hard plastic style like the non-pro Airpods)

Just got the Soundpeats Trueair 2, they're very very similar design to airpods. Case is slightly smaller even, much lighter/cheaper feeling but are well built enough, work reliably and have usb-c.
I think it is because they had already built out a lightning ecosystem years before USB-C came and mostly solved the same problem lightning did.

This left Apple in a weird spot. They could keep the iPhone on Lightning and users could continue using the same cables and peripherals they have been since 2012. Or, they could switch. This would require many users to buy new accessories, but they could be generics that work with any phone.

The switch from Lightning to USB-C is not as advantageous as the switch from the old 30-pin connector to Lightning was. To users already invested in the Apple/Lightning ecosystem, a switch to USB-C would not bring much benefit.

Not for all their portable devices; the iPad Pros have been USB-C since 2018, and the iPad Air since September this year.
Ah, thanks. I actually totally forgot about. Maybe I should get one now (2 years later) to help spur them on.
What's funnier is that Apple already has an iOS device that has USB-C for its main port, the iPad Pro. So I'd presume most of the engineering work to get rid of Lightning completely has already been done at this point.

On Switch, I did charge mine from a powerbank with a USB-A to USB-C cable, it did work but there clearly wasn't enough power. The battery kept draining but very slowly.

All these complex theories/complaints about lightning. Giving them the benefit of the doubt, one good reason for not shifting to USB-C is to keep IP ratings high.

Most USB-C sockets I can find are waterproof only with a matching cable plugged in.

> All these complex theories/complaints about lightning. Giving them the benefit of the doubt, one good reason for not shifting to USB-C is to keep IP ratings high.

Also accessories. Sure there's a sunk costs fallacy component to it, but still: it wasn't that long ago that apple users needed to replace all their ADC accessories with lightning ones.

There’s such a long tail of it, too: I still see ADC connectors in hotel room phone docks, etc.
All of the Android phones with USB C and high IP ratings makes that seem unlikely.
Before USB-C I would have agreed about giving them the benefit of doubt the doubt. But as a sibling comment pointed out, they have an iPad model that is USB-C, my hope is that means the entire line of products will switch over.

I’m actually guessing that they have a long tail of hardware designs that all need to be changed, and that process takes a while. Even their new headphones are lightning based, though they were under development for 4 years... that’s as far as I’ll give them.

I think they're keeping lightening to help their 'eco' brand.

They just removed chargers from the iPhone box because 'everyone has one' - if they suddenly changed to USB-C on iPhone it would create a LOT of ewaste.

I still think they should switch, but I reckon it's because they'd get accused of hypocrisy if they deprecated it.

Even apple chargers are regular USB at the charger-end, right? Just include a cable then, problem solved.

Or the apple way: an adapter.

Most of them, anyway.

I've been putting an Apple Watch SE through its initial paces over the past week and was mildly disappointed to find that only Series 6 ship with a Type C cable in the box - the SE uses Type A.

The same split is true for iPhone 12 Pro, so far as I can tell, even though (curiously) my 11 Pro from last year did include a 20W Type C Power Adapter in the box.

They could just as easily spin it as “Now you can use the charger from your macbook, meaning only one cable!”

Or, if they want to get really wild: they can openly talk about the other usb-c devices that you might have.

Part of me thinks they may intend to get rid of the physical ports altogether on the iPhone. This would serve to differentiate the "productive" iPad from iPhone, and allow them to scratch that minimalist itch they get every once in a while.
I can charge my Switch on random USB-C power sources.

(No clue whether it's as effective as the included charger, but certainly works well enough.)

That’s good to hear? I think I was seeing issues with that on some of my chargers, maybe I need to double check the power ratings on the bricks.
Huh. I think that's a good thing. Slow charging is better than a dead battery and unusable device.

My work HP laptop has USB-C charging but won't charge at all without PD. I tried it with a USB-A - C cable and a fairly hefty adapter without PD.

When I lost the charger for my Nintendo DS, I was able to MacGyver one out of a piece of cardboard and two strips of aluminium foil.

I did the same thing for my 2DS XL, but instead modded the device with a non-PD USB-C breakout board. Works great with both USB-PD and regular USB-C chargers and cables. https://nullsum.net/posts/usbc-mod-new-2ds-xl/

Now, in the days of complex calculated power delivery negotiation, a hack like this would be impossible.

The only devices I've seen _require_ USB-PD are PC's. All the modern phones, headphones, and gaming handhelds I've seen with USB-C do not require USB-PD and charge just fine with a USB-A to USB-C cable.

Better yet, these devices all use a standard USB-C port instead of a proprietary one. The only gotcha is that some USB-C devices break spec and don't work with some USB-C to USB-C cables. Both the Pi 4 and RG351P suffer from this.

Ah, that's a good point, I suppose many devices will still slow-charge from an old style connection with USB-A on the other end.
If USB-C retains backward compatibility with the existing USB PD implementations, you’ll be able to signal that you want power by permanently affixing a shunt resistor across your two power lines. If you need more control, then you upgrade that to something like a voltage-controlled resistor so that you can do more complex signaling. But USB PD was always designed to support dumb AND CHEAP devices, so if you didn’t need the extra functionality you didn’t need to implement any complexity.
USB-PD is almost always in place on top of normal USB 5V, 500mA current delivery as a fallback. Your hack would have worked if you had a type-C plug you could have hacked apart and soldered to, and charging would have been dreadfully slow.
Yes, it seems like you're absolutely right, thanks for the correction!

I should have realised this was obvious - new phones still charge just fine off any old USB-A charger just fine, provided you have a USB-A to C cable -- they'll just slow charge.

> Isn't this sort of reinventing USB on top of USB?

It's not on top of USB, it's a completely independent side-channel. And it cannot be on top of USB, since its second main use (besides negotiating the voltage and current in the main power pins) is to negotiate the alternate modes used for the pins which normally carry USB (not only the USB 3.x pins, but also the USB 2 pins in the VirtualLink alternate mode). You could think as USB-PD being below USB, except that it's also not true since you can use USB-C without USB-PD (using only the resistors in the CC pins to detect cable orientation and maximum current).

I remember thinking USB2.0 was over complicated, this is absolutely insane.
It was, and this is. You were right.
"Oh, 'USB 3.2 Gen 2' (aka 'USB 3.1' or 'USB 3.1 Gen 2' OR 'USB 3.2 Gen 2')?"

"There's your problem, you need 'USB 3.2 Gen 2 × 2.' You idiot!"

Just wait for USB4!
That's just Thunderbolt 3 without the Intel trademark "Thunderbolt" name, isn't it?
No, there are some differences; AFAIK, USB4 can also tunnel USB 3.x (Thunderbolt 3 uses the PCIe tunneling plus a PCIe xHCI USB host on the device), and its compatibility with Thunderbolt 3 is optional.
The good thing is that I could now fast charge my pixel 4a with my MacBook charger as the protocol allowed the charger to pick the right output.
Not any different than Ethernet's add on methods of OOB signaling for link integrity testing and auto-negotiation.
And it still hasn't got error correction?
The problem is that with short haul serial links there is a very small operating range where error correction works. Basically the difference between a working link (very low BER) and a link where even ECC is broken (high BER) is quiet small and adding ECC overhead is deemed an overall loss. These links have quite different characteristics from long-haul links that are dominated by ISI. One way to see this is to look at a waterfall plot and note how steep it is on short interconnects. There is a very small range between working fine and completely broken.
It does. (Checksums)
Aren't checksums for error detection and not error correction? As I understand it, error correction is having enough information to correct the error while error detection is only knowing an error has occurred.
Error correction only makes sense if the latency of the read/write is long(i.e. spinning physical medium, co-sharrd radio channels).

FEC isn't free(~2x overhead per bit recovery if I remember right) so if your error rates are infrequent then it's worse to use FEC over just resend/reread.

I guess checksums are ok for many applications if USB implements resending of data at the protocol level. For high-speed cameras it might be problematic though.
reed-solomon is most likely used here. It’s the tech in CDs and ECC RAM. Checksums that also have enough data for recovery.