Hacker News new | ask | show | jobs
by technobabbler 1563 days ago
A device can tell when one end of the cable is plugged in by testing the cable's control channel, even without the other end connected yet. It sees that a cable is connected, but there's nothing on the other end, and presumes it's first and should act as the provider. A second later, you connect the other end of the cable to a consumer, and the first device will try to negotiate its role with the second. It's up to the devices to respect each other's role requests.

http://blog.teledynelecroy.com/2016/02/usb-type-c-cable-dete...

Different device types (like a powered hub or desktop monitor) can request different roles, and they'll have to sort it out during negotiation if there's a conflict. Sometimes a user-facing popup will ask you if you want to provide or take power from the other device.