Always found the USB forum's approach to backwards compatibility "interesting": Instead of extending the protocol, just require a completely separate implementation of the old protocol in addition to the new one.
It's like the IMAP working group saying "yes, we're 100% backwards compatible to POP3! We wrote a line into the spec that requires every IMAP server to also bundle a POP3 server..." Out of curiosity, does that mean that in "normal" operation of USB3 or 4 only one of the two internal ports is ever used at a time? Or are there devices that already make use of both the USB2 and 3 lanes when plugged in?
It gets even weirder with some USBC ports, rather than implement the flipping connector support they wire a different USB port to each side of the plug, meaning the device tree is literally different depending on connector orientation. Lots of motherboards with 2 USBA and one USB C do that with a 4 port hub.
What the fuck. Thanks, I think you just solved a bug that's been on my TODO list for like 6 months.
I wrote a library [1] that lets you use CSS selectorish syntax to select USB devices (e.g. "any device that's on port 3 of a hub that also has a Logitech device connected on port 4" -> "(!hub > device[vid=046d, port=4]) > device[port=3]") so I could do automations for things like plugging in my laptop at one desk vs another, but one of my selectors I use on my desktop for a USB-C cable would rarely fail to trigger despite the device definitely being connected and working. I'll have to check this when I get home... 1: https://github.com/jmgao/usbselector
https://en.wikipedia.org/wiki/Bluetooth#Implementation: “Originally, Gaussian frequency-shift keying (GFSK) modulation was the only modulation scheme available. Since the introduction of Bluetooth 2.0+EDR, π/4-DQPSK (differential quadrature phase-shift keying) and 8-DPSK modulation may also be used between compatible devices. […] In 2019, Apple published an extension called HDR which supports data rates of 4 (HDR4) and 8 (HDR8) Mbit/s using π/4-DQPSK modulation on 4 MHz channels with forward error correction (FEC) […] The above excludes Bluetooth Low Energy, introduced in the 4.0 specification,[30] which uses the same spectrum but somewhat differently.” The various network standards (2G, 3G, 4G, 5G) similarly have little to do with each other, technically.
Usually there's no need to use both the 2.0 and 3.x links at the same time, but it's possible to do so and not that unheard-of. I've seen some USB hubs that break out into a USB3 hub with a native USB2 hub tacked on the side.
It's just that there's little use for a 480Mbps link on top of however many gigabits you get from USB3.
It's actually explicitly forbidden for a single peripheral to use the USB 2.0 and 3.0 links at the same time as of USB 3.2, and there's no way to split endpoints across the links.
In order for it to work you'd have to basically expose two full separate peripherals, one on the USB2 bus and one on USB3 bus, and they'd require their own descriptors and OS-side host contexts. This works sometimes, operating systems are not required to support this mode of operation because the OS knows that both devices are attached to the same physical connector. It can mess up enumeration. It also prevents USB3 devices from being able to fall back to USB2 as required in the spec. A USB3 hub likely has a separate USB2 controller attached, if it doesn't it's non-compliant and not guaranteed to work.
Hubs or devices that contain an internal hub are the main use cases where both will be in use at once.
You can often get away with splitting the two within a single physical device, as many hosts tend to treat the buses independently except for certain power management related tasks, but officially if you are doing that you need an internal hub. An internal hub is allowed to have 3.x-only devices on it, (although this may be confusing to users).
> Always found the USB forum's approach to backwards compatibility "interesting": Instead of extending the protocol, just require a completely separate implementation of the old protocol in addition to the new one.
The word 'protocol' there is doing heavy lifting. It is more like a bunch of electrical engineers fancied themselves to be protocol designers, and there we have it - a usb 'protocol' - no layering, no symmetry - just a bunch of structs to dump on the wire. To be fair, the original problem they were trying to address (keyboard, mouse, serial, printer ports, phone lines etc replaced by a single interface), they did solve in a very comprehensive way, and it benefited the consumers immensely, however the developer side of it is/was really awful. vendor + hardware controller specific asymmetric host/device stacks, no comprehensive 'protocol' other than bit twiddling, incompatible power negotiations (config descriptor up to 2.0, and cc hardware channel for type-c), no OS metadata, and the list goes on.. We have not even started on the 'beautiful' forest of descriptors to manage; and comprehending some of these would leave you wondering if you really understood at all (e.g. hid report descriptor). All in all, great way to age prematurely without having learnt anything worthwhile about protocols. With all this said, it is really good that they maintained backward compatibility. Otherwise the list of books needed to grok usb would be something like 'Effective USB', 'More effective USB', 'Exceptional USB', 'Modern USB', 'Performant USB' ;)
I mean that's how binary backward-compatibility works too. You basically have completely different symbols and then the linker just links the right version at runtime.
It's really only USB 2 and 3 that essentially ship two wirings and protocols in one device/cable.
USB 2 is a pretty straightforward extension of 1, and USB 4 is, in many ways, actually just a standardization of Thunderbolt 3, which in turn are alternate modes of USB-C, i.e., a completely different protocol running on the physical wires that would normally be used for USB 3 data. > It's like the IMAP working group saying "yes, we're 100% backwards compatible to POP3! We wrote a line into the spec that requires every IMAP server to also bundle a POP3 server..." That seems like a bad comparison, since POP and IMAP solve pretty different problems (mail retrieval vs. remote mailbox access and management). And this is in fact exactly how HTTP 3 and 2 maintain backwards compatibility to HTTP 1 :)
Could you switch the end that connects to the target Mac to use a USB Type-C plug instead of receptacle to both reduce BOM cost and improve signal integrity?
That could also allow you to have a 'this side up' which would remove the need for one MUX on the USB3 pairs, right?
What’s even crazier is that oftentimes you even get 2x usb3 ports as well! (Typical on desktop motherboards that have cpu with lots of usb lanes but few usb ports).
Comments (101) 9 threads
Earlier commentsIt's like the IMAP working group saying "yes, we're 100% backwards compatible to POP3! We wrote a line into the spec that requires every IMAP server to also bundle a POP3 server..."
Out of curiosity, does that mean that in "normal" operation of USB3 or 4 only one of the two internal ports is ever used at a time? Or are there devices that already make use of both the USB2 and 3 lanes when plugged in?
Continue this thread — 1 reply
I wrote a library [1] that lets you use CSS selectorish syntax to select USB devices (e.g. "any device that's on port 3 of a hub that also has a Logitech device connected on port 4" -> "(!hub > device[vid=046d, port=4]) > device[port=3]") so I could do automations for things like plugging in my laptop at one desk vs another, but one of my selectors I use on my desktop for a USB-C cable would rarely fail to trigger despite the device definitely being connected and working. I'll have to check this when I get home...
1: https://github.com/jmgao/usbselector
https://en.wikipedia.org/wiki/Bluetooth#Implementation:
“Originally, Gaussian frequency-shift keying (GFSK) modulation was the only modulation scheme available. Since the introduction of Bluetooth 2.0+EDR, π/4-DQPSK (differential quadrature phase-shift keying) and 8-DPSK modulation may also be used between compatible devices.
[…]
In 2019, Apple published an extension called HDR which supports data rates of 4 (HDR4) and 8 (HDR8) Mbit/s using π/4-DQPSK modulation on 4 MHz channels with forward error correction (FEC)
[…]
The above excludes Bluetooth Low Energy, introduced in the 4.0 specification,[30] which uses the same spectrum but somewhat differently.”
The various network standards (2G, 3G, 4G, 5G) similarly have little to do with each other, technically.
It's just that there's little use for a 480Mbps link on top of however many gigabits you get from USB3.
In order for it to work you'd have to basically expose two full separate peripherals, one on the USB2 bus and one on USB3 bus, and they'd require their own descriptors and OS-side host contexts.
This works sometimes, operating systems are not required to support this mode of operation because the OS knows that both devices are attached to the same physical connector. It can mess up enumeration. It also prevents USB3 devices from being able to fall back to USB2 as required in the spec.
A USB3 hub likely has a separate USB2 controller attached, if it doesn't it's non-compliant and not guaranteed to work.
You can often get away with splitting the two within a single physical device, as many hosts tend to treat the buses independently except for certain power management related tasks, but officially if you are doing that you need an internal hub. An internal hub is allowed to have 3.x-only devices on it, (although this may be confusing to users).
The word 'protocol' there is doing heavy lifting. It is more like a bunch of electrical engineers fancied themselves to be protocol designers, and there we have it - a usb 'protocol' - no layering, no symmetry - just a bunch of structs to dump on the wire.
To be fair, the original problem they were trying to address (keyboard, mouse, serial, printer ports, phone lines etc replaced by a single interface), they did solve in a very comprehensive way, and it benefited the consumers immensely, however the developer side of it is/was really awful. vendor + hardware controller specific asymmetric host/device stacks, no comprehensive 'protocol' other than bit twiddling, incompatible power negotiations (config descriptor up to 2.0, and cc hardware channel for type-c), no OS metadata, and the list goes on..
We have not even started on the 'beautiful' forest of descriptors to manage; and comprehending some of these would leave you wondering if you really understood at all (e.g. hid report descriptor). All in all, great way to age prematurely without having learnt anything worthwhile about protocols.
With all this said, it is really good that they maintained backward compatibility. Otherwise the list of books needed to grok usb would be something like 'Effective USB', 'More effective USB', 'Exceptional USB', 'Modern USB', 'Performant USB' ;)
And then Intel decided to make one of them the figurehead of one of the ad campaigns…
USB 2 is a pretty straightforward extension of 1, and USB 4 is, in many ways, actually just a standardization of Thunderbolt 3, which in turn are alternate modes of USB-C, i.e., a completely different protocol running on the physical wires that would normally be used for USB 3 data.
> It's like the IMAP working group saying "yes, we're 100% backwards compatible to POP3! We wrote a line into the spec that requires every IMAP server to also bundle a POP3 server..."
That seems like a bad comparison, since POP and IMAP solve pretty different problems (mail retrieval vs. remote mailbox access and management).
And this is in fact exactly how HTTP 3 and 2 maintain backwards compatibility to HTTP 1 :)
Continue this thread — 1 reply
Also all speeds of ethernet are independent, and GNU's Not Unix.
That could also allow you to have a 'this side up' which would remove the need for one MUX on the USB3 pairs, right?
re the removing of a mux, yeah, i think that'd work, but i'm sure i'd find a way to still plug it in upside-down
All comments shown.
Couldn't load more comments. Check your connection and try again.