Remix.run Logo
unsnap_biceps 8 days ago

According to https://superuser.com/a/1773195

> Any DRP port must have pull-down 5k1 resistors on CC wires (as a sink), AND 10-22-56k pull-ups (as provider), but not at the same time. The DRP then alternates the sink advertising (5k1 pull-downs) with pull-ups (source advertising) about 10 to 20 times per second.

> If another DRP is connected, they both will toggle their advertising until a correct (pull-up - pull-down) combination occurs. Then CC controller(s) will stop toggling, and the end that happens to be in provider mode will provide +5VSAFE VBUS. The process will end in one or other direction, which will happen at random (since frequencies of toggling are independent).

franky47 8 days ago | parent [-]

A protocol designed on who wins an race condition? That's wild.

crote 8 days ago | parent | next [-]

It works surprisingly well in practice. The key thing to remember is that you rarely connect identical devices together.

A laptop and a power bank both support both modes, but the laptop will have a "prefer sink" policy and the power bank will have a "prefer source" policy. As long as you don't connect two laptops or two power banks, it'll work out just fine.

Moreover, it has an override mechanism in case you do connect two identical devices. If you do connect two laptops together for data transferring, the OS should be able to let the user override the power flow direction - or even disable charging altogether.

darkwater 8 days ago | parent | prev | next [-]

What are the alternatives, for a mass market standard like USB used literally by everything out there nowadays? Unplug it and plug it again until it works it's easier for everyone that going to some obscure menu (although maybe smartphones/laptop/console could just display a modal "do you want to charge or be charged?")

somat 8 days ago | parent | next [-]

Usb historically solved this with ended connectors It was why you had "A" and "B" sides. usb C has an awful lot of user hostile fallout considering it's stated goal of "a cable that just works for everything"

I think to solve it, while keeping all the other goals of usb C would be to orient the charging pins on the plug, not charging the direction you want? unplug then flip one side.

klausa 8 days ago | parent [-]

Having a plug that works differently based on the orientation it’s plugged in, feels like it would not quite be „keeping all the other goals of USB-C”.

bzzzt 8 days ago | parent | prev [-]

It could default to charging the device with the lowest battery level. Can't find it but I believe having read years ago Apple does something like that.

toast0 8 days ago | parent | prev [-]

Ethernet has been doing this kind of thing for four decades. With only two nodes and short cables, you'll rapidly converge.