←back to thread

298 points croes | 2 comments | | HN request time: 0s | source
Show context
franky47 ◴[] No.45088822[source]
I own a Switch 1, and the other day I wanted to play on the train, but the battery was low. I figured "no problem, I can connect it to my laptop and let it charge off is battery".

Nope. The MacBook Pro started charging off the Switch instead.

replies(3): >>45088936 #>>45089070 #>>45089390 #
parhamn ◴[] No.45088936[source]
I've wondered how this works (and who wins).
replies(2): >>45088994 #>>45089013 #
scottapotamas ◴[] No.45088994[source]
For two DRP (dual role) devices connected to each other, I believe in a default case the one that happens to advertise as a source first just becomes one.

The standard allows for a role swap at any point while connected, and if that’s triggered will be dependent on the firmware/config on one or both ends.

There’s probably more nuance hiding in the real world hardware too.

replies(2): >>45089023 #>>45089443 #
unsnap_biceps ◴[] No.45089023[source]
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).

replies(1): >>45089396 #
franky47 ◴[] No.45089396[source]
A protocol designed on who wins an race condition? That's wild.
replies(3): >>45089606 #>>45090342 #>>45090354 #
darkwater ◴[] No.45090342[source]
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?")
replies(2): >>45090406 #>>45090608 #
1. somat ◴[] No.45090608[source]
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.

replies(1): >>45090703 #
2. klausa ◴[] No.45090703[source]
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”.