Re:Tried to charge my phone (with USB-C), but my laptop star...
by slim on Sunday March 13, 2022 @02:00PM
(#30663956)
it can't be. the cable has to be stateful for this to work. even if it's one bit that simply tells the device it is connected.
[ Parent
| on HN ]
Re:Tried to charge my phone (with USB-C), but my laptop star...
by technobabbler on Sunday March 13, 2022 @02:47PM
(#30664457)
Not necessarily. It can just test the resistance of the port/cable to see if anything is there. The first device (power provider) to detect the cable can say "ok, I got plugged in first" and then tell the other device (the consumer) that when they try to negotiate power delivery. That doesn't require maintaining state in the cable itself, just that the devices be able to detect the cable when it's plugged in (even without the other end connected).
Cable detection: http://blog.teledynelecroy.com/2016/02/usb-type-c-cable-dete...
Overview of USB power delivery negotiation: https://www.embedded.com/usb-type-c-and-power-delivery-101-p...
And then after the initial connection, the devices can renegotiate their roles if you want to reverse the charge.
It's great when it actually works. In the real world there are so many incompatible implementations that USB-C is a real clusterfuck.
Re:Tried to charge my phone (with USB-C), but my laptop star...
by ultrarunner on Sunday March 13, 2022 @03:27PM
(#30664840)
The cable has a few wires dedicated to directionality (CC1 & CC2) lines as well as sideband channels. My guess would be that the first device to be plugged in sees nothing on the other side, decides it's going to ask for power, and configures itself (and thus the cable) as such. The second device sees a USB-PD device requesting power and begins to provide it.
While I don't doubt the foresight of Apple HW engineers, the possibility strikes me that this is entirely accidental and derived from the design of the USBPD spec. If so, these "stars align (but only because the spec was functionally designed)" moments are some of my favorites.