Hacker News new | past | comments | ask | show | jobs | submit login
USB-C done cheap: when 2 ports become 1 (2020) (richardg867.wordpress.com)
105 points by zdw on Jan 1, 2023 | hide | past | favorite | 55 comments



On Windows, a USB device's configuration is tied to its port, so by using this hack the device's settings will change depending on the orientation of the connector. This can't be good for user confidence in USB-C.


Why does Windows not recognize my USB device as the same device if I plug it into a different port? (on Raymond Chen's oldnewthing)

https://devblogs.microsoft.com/oldnewthing/20041110-00/?p=37...


It is a problem if the device does not expose any unique ID and you somehow need to depend on the device path enumeration.

For instance, I used to work on a project where I needed to control multiple Epson thermal printers from a single Raspberry Pi. Each printer was assigned to a customer kiosk, so I needed to know where I was sending the print job to. Unfortunately, the Epson thermal printers did not expose any unique ID over USB, so I had to rely on the USB device enumeration, and I label my cables and printers accordingly.

A USB-C port like in TFA would cause extra headache.


Could you have given each printer its own hub with a serial number?


That would have costed extra and made things more complicated for the crew who assembles the setup at the venues.


Ah. I feel better about your answer than if you had said something like "I could have if I had thought of it!". Half the reason I typed my comment is so that I'd be more likely to remember if I ever have a similar problem.


Is the port allowed to have something different on each side? It seems likely not, and in that case at least cover this up in the driver so the port is always just the port...


That sounds absolutely terrible, but to be fair, it also sounds more like a Windows-specific issue, than a USB-C specific one.


It's only for devices which opt out of having a unique ID. At that point, you have to consider different situations, including two devices of the same type in different ports. Safest to just assume each device is a new one.


It's not really an issue. You'll get the notification "new device detected" or something another time.


And get annoyed as settings changes seem to get reverted arbitrarily for whatever reason. Most “normal” people would carry on, mumbling about how computers are weird and incomprehensible, but it is not really a good thing.

Also, a device’s settings that depend on the port to which it is connected is terrible UX.


What settings?


Whenever I plug my USB soundcard into a new port it uses the default microphone volume (which isn't 100% for some reason).


If it's a remote receiver like the Xbox wireless one it'll have to be repaired if you use a different port.


Good grief, this is why I have to do that stupid dance every time I want to play a controller game. Good to know, thank you.


Does anyone know why the USB-C header was designed to be almost-but-not-quite rotation symmetrical [1]? So now you need some complex electronics for each port to detect the orientation and swap the data and cc lanes accordingly - with lots of opportunities to make errors or be cheap as we see.

It seems to me, you could have saved an enormous amount of complexity by simply making the header slightly larger and duplicating the entire pinout on each side, including the data lanes.

Or are there electrical reasons why a data lane must only be connected to a single pin?

[1] https://en.wikipedia.org/wiki/USB-C#USB_3.0/3.1/3.2


From a signal integrity standpoint, you really don't want both pins (i.e. SSRX1 and SSRX2) tied together.

A lot of USB3 routing is reducing stubs. When the signals are going as fast as they are in USB3, they're essentially a wave going down the line, and if there's a "stub" the wave will actually hit the end of the wire and reflect back, causing interference. Having one of the pins not connect to your processor would create a stub inherent in the design, which is probably a bad idea.

When you dig into the details of the signals of USB3+ electrically it's truly remarkable they're able to mass produce cheap consumer grade equipment to implement it.

To give you an idea, the lengths of USB3 traces in your board need to be matched, so you add wiggles to the shorter trace to make it ever so slightly longer. But those wiggles can't get too far from the opposing trace in the diff pair either because that changes the way the traces are coupled together. Also, if the layer above/below is not a solid ground plane, you will run into issues as the signal will propagate through the wire faster/slower depending on what's around it. This is so critical that you use "impedance controlled" PCBs that place a tight tolerance on the spacing of your layers so that you can be sure it doesn't change along the length of your trace. And, of course, you want to avoid sharp bends in your traces as those will act like a stub.

None of this is bad engineering on the part of the USB IF, just that if you want to send data over a USB cable reliably at 5gbits, or now 40gbits, you're really pushing the limits of modern electrical design.


> From a signal integrity standpoint, you really don't want both pins (i.e. SSRX1 and SSRX2) tied together.

> Having one of the pins not connect to your processor would create a stub inherent in the design, which is probably a bad idea.

I was more thinking that each wire for a lane has two pins, one on the top and one on the bottom, which are electrically connected. So e.g. SSRX1+ on the top would be connected to SSRX1+ on the bottom, SSRX1- on the top with SSRX1- on the bottom, same for SSRX2+, -, etc.

With the same wiring in the plug as well as in the socket, there wouldn't be any disconnected pins. The wire for e.g. SSRX1+ would split before the plug, then lead to two pins in the plug; the plug connects to two matching pins in the socket which merge back into a single wire.

So in that modified header one differential pair would occupy four pins, two in the top row and two in the mirrored bottom row.

This means the header would have 4 additional pins per row (so 8 in total) compared to what it has now.

But of course the splits and merges in the wire might cause interference as well.


The four additional pins are a nontrivial problem. The Type-C connector is already annoyingly large as is. The stubs others have talked about are a major problem; they're really hard to avoid. In fact, they're so hard to deal with, that a lot of effort in routing goes to keeping things in the right order on the board.

By that I mean that when you leave, say, your upstream device and run the traces to downstream, you need to have them come out in the same order: if you start with _P on the left and _N on the right, you want to end that way. A swapover is annoying at USB 2 480Mbps speeds and utterly awful at 20Gbps. (There is also a >50% chance that you miswired the thing and are wiring _P to _N, which increases to >99% if the routing came out naturally neat, but that's just Murphy's Law in action.) It's so difficult and awful to deal with this stuff that USB 3 took a page from Gigabit Ethernet and usually features transceivers that just figure it out: they know you have eight wires in four pairs between eight pins and they can work with that.

Once you have that feature, and transceivers definitely do, there is no point whatsoever in trying to make superfluous changes at the connector bit.


The splits and merges would definitely affect signal integrity. Signal integrity is one of those fields that can feel like dark voodoo magic. I know people who are signal integrity experts by trade.

Would the splits and merges definitely make the signal integrity worse to the point that it wouldn't work? Maybe not. But if you're designing a high speed cutting edge standard, you probably don't want to make decisions that limit the best signal integrity an implementer could achieve. Signal integrity is all about balancing the bad SI decisions you have to make because of some product goal or whatever with tighter tolerances elsewhere. The more "clean" the standard is, the more tolerance it has for the implementers.


The signal reflections from the stub can propagate all the way back to the source. This means you’d have to use two transmitters to avoid interference from those reflections.


If there’s only one wire in the cable, and one trace leading up to the socket, would there still be a stub? Have the sockets pins both tied to the same trace, and have the plug terminals both tie to the same wire.


I'm not an expert; but having splits and merges in your traces and wires when you need to have matched signal path length seems like a terrible idea.


Amazing comment. Where did you learn about this?


This is all pretty standard electronics design these days. If you're interested to learn more, you can search for "differential signaling".

What it comes down to is that once your signal rate is high enough, the speed that electrons move becomes a concern. Matching the length of your traces ensures that a signal sent down two wires at the same time arrives at the same time.

That's the general idea anyway. This topic gets very complex the further down you go


> What it comes down to is that once your signal rate is high enough, the speed that electrons move becomes a concern.

To be clear-- the speed that charge moves in the cable. The actual electrons move really, really slow-- often centimeters per hour slow.


While that's true, it sounds much less exciting.


It's basic transmission line theory.

https://en.wikipedia.org/wiki/Transmission_line


The other commenters got it spot on for where you can learn more, but as to where I learned it, I decided I wanted to build a project with USB C running at 3.0 speeds and had to deep dive on the subject in order to make it work.

It was surprisingly hard to gather all of this information in one place and actually implement it given the resources on the internet a few years ago. Even then, there were still some board revisions that got it a bit wrong, one where I left out the decoupling capacitors I'd later learn were a critical detail, and one where I put all the wiggles clumped together at the middle of the shorter trace and so despite both signals arriving at the end at the correct time, they were out of phase for nearly the whole trace run and caused (presumably) cross talk between each other. But I did get it working in the end :)


> The “cheap” way I suspect my motherboard is using takes advantage of the fact USB 3.x Gen1 only uses one of the two SuperSpeed lanes present on the USB-C connector, and unlike Gen2, it often does not require a redriver to improve signal integrity.

In general it would be great to know if there are ways of finding cables, motherboards, power adapters that don't skirt the requirements. I haven't found a way to know this so instead for now I just try to invest in brands like Anker that seem trustworthy.


For years I've loved Anker cables and hubs and such, but I have a whole lot more skepticism about them after the whole debacle with their security cameras doing sketchy things and them lying about it: https://www.theverge.com/2022/11/30/23486753/anker-eufy-secu...


Agree. With so many unknown brands on Amazon they had become a go-to, but I plan to spend my pounds elsewhere. A tiny contribution to try to effect change.


I wish Blue Jean made usb3 cables. One of the few folks out there I trust not to rip me off on them.


There's always Digi-Key*/Mouser. Their target market is the sort of people who get pissed if things are not exactly as described, so they tend to get things right! The downside is that their cable prices are usually mediocre, and they do charge a separate shipping fee which can be high for single item orders (or is pretty reasonable for big orders shipped overnight early AM!).

(* Digi-Key Marketplace is not as trustworthy as regular Digi-Key and has pissed off a great number of their customers. Engineers buy from Digi-Key to have guaranteed parts from guaranteed vendors shipped with guaranteed delivery rates and dates in the same box as everything else in the order. Most vendors are of of course perfectly good -- there are some huge names on there -- but in general Digi-Key Marketplace does not do any of this. It cuts against the Digi-Key brand and has not been a net positive for Digi-Key, in my and many others' opinion. I know I'm ordering a lot more from Mouser recently, for this and other reasons.)


I also moved a lot of my ordering to Arrow and Mouser, primarily because I dislike the marketplace concept.


Some of the early Anker USB-C stuff pulled shenanigans with USB-C specs as well.


How so? Nothing comes up right away in google.


Something to do with incorrect implementation of the 56K pull-up resistor found by Benson Leung. That was a long time ago.


Oh, found it, this was the very weird cable that was keeping the voltage going when the device was unplugged.

https://www.androidauthority.com/anker-issues-recall-perilou...

Good response though and I'd generally buy their usb cables.


Startech is trustworthy as well. Their support is excellent to boot. Support is capable of answering questions on the various USB and TB specs.

I also have a pair of 3m apple TB4 cables that are used to drive a pair of lenovo monitors to a p14s. Pricey, but 'just worked'. Apple was the only company shipping them [that I could find] at the time.


Another vote for Startech here. I needed to find a USB hub that could drive 10-20 USB 1.1 devices at full USB 1.1 speed, Startech was one of the few manufacturers to build such a device AND provide the detailed specifications I needed to verify the feature.


I've gotten a few odds and ends from Startech before, e.g. a PS/2 to USB-A adapter. No complaints here.

Does anyone have any opinion on Satechi? It's US-based (San Diego) and has been around since 2005, but I don't know much about them beyond that.

I really like their four-port USB-C GaN charger (https://satechi.net/products/165w-usb-c-4-port-pd-gan-charge...), which I bought because it was the only one I could find without any USB-A ports.


StarTech also makes a great open server rack. It’s no that expensive and is adjustable. Plus they have lots of accessories for it.


>Apple was the only company shipping them [that I could find] at the time.

Last I checked, they still are. What other company makes a 3m TB4 cable?


Pretty annoying if you want to specify something by USB "port path" - most common example being mapping an USB port into a VM (regardless of what's plugged into that port.)

cf. qemu's "-device usb-host,hostbus=1,hostport=…" option

… the obvious workaround is to map "both" ports into the VM …


what's the benefit to port path over vendor/product id?

I can't think of one, unless you have >1 of the same device


Having more than one copy of a device is quite common. Think USB to serial adapters or test equipment or license tokens.


Something very similar has been happening even before USB-C, actually.

While USB 3.0 is backwards compatible with 2.0 for a user, it is both electronically and logically a completely different port. A USB 3.0 hub does not "upgrade" a 2.0 signal to 3.0, but it has separate hubs for each speed. In essence, they are two separate protocols sharing a single connector.

This means that you could "split" a proper USB 3.0 port into separate 3.0-only port and 2.0-only port. Some USB docks use this to provide extra ports for free: something like an ethernet adapter uses 3.0, so that gives you a free 2.0 port for a keyboard.


Wow, that's a negative for the design of the USB-C connector, which would seem to inevitably lead to these down the line tradeoffs. I guess it makes sense needing the controlled impedance, but it seems they could have solved that a different way with a smarter connector geometry. Perhaps MUX chips are cheap relative to the connector, so this optimization only makes sense when there would be an unused port anyway?

Also, this setup seem right for bringing back the works-on-the-third-try phenomenon of USB-A connectors, with the help of some devious software.


I once got a free Lightning cable from a recruitment talk, but it only had pins on one side, meaning it only worked one way around.

It’s hard to complain about things you get for free, but I did find it a bit odd. I’ve never seen another one like it since.


They sell lightning cables like that here in Japan at 100-yen shops


This may simply be smarts on the part of the designers of the chip on the motherboard - either a motherboard vendor can choose to use it without external silicon andoughly get 1 USB-C channel or add the external switch and get 2 channels - it uses roughly the same number of pins for the two sorts of interface (and more importantly the same number of high speed serdes pins)


notably with usb4 support, this should become moot, as 4x2 operation is now mandatory. All the pins will need to be connected to one usb host controller, which will will have to deal with jack orientation.


Discussion in progress, based on Hackaday writeup of same topic:

https://news.ycombinator.com/item?id=34203880


We'll merge those comments hither since this thread has the original source.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: