top | item 31271038

USB Cheat Sheet

371 points| WithinReason | 3 years ago |fabiensanglard.net | reply

168 comments

order
[+] masklinn|3 years ago|reply
Some of the entries seem incorrect: "USB 3.2 (USB 3.2 Gen 2x2) and "USB 4" (USB 4 USB4 Gen 2×2) should have the same nominal data rate of 2500MB/s, they're 2 lanes (x2) of 10GB/s. Though they are apparently coded differently electrically, so they're distinct protocols.

The tables would benefit from mentioning the coding (8/10 or 128/132) as IMO it's one of the most confusing bits when you see the effective data rates:

* USB 3.2 Gen 1x2 has a nominal data rate of 10G (2 lanes at 5G) with a raw throughput of 1GB/s (effective data rates topping out around 900MB/s)

* USB 3.2 Gen 2x1 has the same nominal data rate of 10G (1 lane at 10G) but a raw throughput of 1.2GB/s (and effective data rates topping out around 1.1GB/s)

The difference is that Gen 1x uses the "legacy" 8/10 encoding, while Gen 2x uses the newer 128/132 encoding, and thus has a much lower overhead (around 3%, versus 20).

[+] fabiensanglard|3 years ago|reply
Thank you for noticing these issues, I have updated the table.

I would be happy to improve it and add encoding. I am surprised by some of the summary entries on Wikipedia (https://en.wikipedia.org/wiki/USB4). Looks like USB4 "reverted" to 128b/132b. It is accurate?

[+] CamperBob2|3 years ago|reply
He goes off the rails earlier than that, by saying that USB 2.0 is "also known as" Hi-speed. HS is only one data rate supported by the USB 2.0 standard; it incorporates both full speed from the earlier standard and low speed, which isn't mentioned at all.
[+] belter|3 years ago|reply
Also should be:

12 Mbps -> 1.43 MiB/s -> 1.5 MB/s

480 Mbps -> 57 MiB/s -> 60 MB/s

5000 Mbps (5 Gbps) -> 596 MiB/s -> 625 MB/s

10000 Mbps (10 Gbps) -> 1192 MiB/s -> 1250 MB/s

20000 Mbps (20 Gbps) -> 2384 MiB/s -> 2500 MB/s

40000 Mbps (40 Gbps) -> 4768 MiB/s -> 5000 MB/s

[+] Someone|3 years ago|reply
No USB On-The-Go (https://en.wikipedia.org/wiki/USB_On-The-Go) or Wireless USB (https://en.wikipedia.org/wiki/Wireless_USB)?

USB is a triumph of marketeers over engineers. All these things are called USB because USB sells (see also: Bluetooth).

[+] IshKebab|3 years ago|reply
I don't know anything about wireless USB but USB OTG is called USB because it is USB. It's not some totally unrelated protocol.
[+] ChrisRR|3 years ago|reply
Bluetooth Smart aka. Bluetooth Low Energy aka. Wibree aka. not actually bluetooth
[+] kashunstva|3 years ago|reply
> May 05, 2025

The article is dated May 5, 2025. I've long been wondering about the future of USB.

[+] vesinisa|3 years ago|reply
OP forgot [2025] from the title.
[+] Beta-7|3 years ago|reply
USB 4.2 (later renamed to USB 3.2 gen 2 Mk. 1) comes with built in time traveling. They just keep adding features to the protocol and making it complicated.
[+] Fatnino|3 years ago|reply
It's a form of SEO. Google promotes "fresh" content, so if it sees a date less than a year ago it often assumes the content is better. Normally you will see this abused by crappy content mills using a plugin that constantly updates the date on their garbage.

Putting a static date from 3 years in the future seems like a quick a dirty hack to do the same thing.

[+] notorandit|3 years ago|reply
Not to be read before: see article time stamp
[+] IvanK_net|3 years ago|reply
Fun fact: USB 2.0 webcams have been existing for over 10 years. USB 2.0 is 60 MB/s.

A pixel of an image is 3 Bytes. A 1920x1080 FullHD image is 6.2 MB. At 30 frames per second, second of a FullHD video is 186 MB. How did they do that?

Answer: frames are transferred as JPEG files. Even a cheap $15 webcam is a tiny computer (with a CPU, RAM, etc), which runs a JPEG encoder program.

[+] pseudosavant|3 years ago|reply
Most webcams, especially 10 years ago are not 1080p, or even 60fps. Many aren't even 720p. 1280 x 720 x 3 bytes x 30 fps = ~80MB/second. 480p @ 30 fps = 26MB. That is how many webcams can get by without hardware JPEG/H264 encoding.

4K @ 60fps = 1.4GB/sec. USB 3, even with 2 lanes, will have trouble with that.

[+] kevin_thibedeau|3 years ago|reply
The cheap ones are using hardware JPEG encoders. The associated micro isn't powerful enough to do it in firmware alone.
[+] grishka|3 years ago|reply
Hm. But then wouldn't it make more sense to just stream the raw sensor data, which is 1 byte per pixel (or up to 12 bits if you want to get fancy), and then demosaic it on the host? Full HD at 30 fps would be 59.33 MB/s, barely but still fitting into that limit.

But then also I think some webcams use H264? I remember reading that somewhere.

[+] verall|3 years ago|reply
It needs a uC with some special hardware anyways to do demosaic or else it would require special drivers that would peg some people's crappy laptop CPUs.

Also the raw YUV 4:2:0 is 1.5 bytes per pixel so that's doing half of the "compression" work for you.

[+] 0xTJ|3 years ago|reply
Just how much do you have to hate consumers to come up with a scheme like this? Increment revisions as you add more features, add something to the end to say how fast it goes. The 3.2 renaming is idiotic.
[+] willis936|3 years ago|reply
USB 4 AKA USB 4 Gen2x2

USB 4 (opt) AKA USB 4 Gen3x2

They had a chance to fix their colossal fuckup and they decided not to.

[+] ThreePinkApples|3 years ago|reply
In marketing and on cables they've chosen to use the terms USB4 20Gbps and USB4 40Gbps, so at least that's explicit. There's also officials ways to mark cables as being 100W or 240W capable.
[+] nolok|3 years ago|reply
Their issue was not the naming for consumer or tech user, their issue was "how do we allow any random laptop from claiming latest usb despite not actually supporting it".

It was super obvious with usb 3 and its sub versions, and it gets even worse with 4.

[+] Kab1r|3 years ago|reply
USB versioning is such a clusterfuck.
[+] 411111111111111|3 years ago|reply
There was a really short timeframe when I was really positive about USB, but that has been long lost since.

They should've never allowed cables to only provide some capabilities and still get the branding. Having capabilities for connectors was fine imo, but also accepting them with cables was bad because you cannot really find out what it supports and where the issue originates of something goes wrong

[+] can16358p|3 years ago|reply
So on the next versions of USB, the cable length will get shorter and shorter until the max gets to 5cm?

While I get the technical reasoning about high frequency/attenuation etc that limits cable length as speeds go higher, there are obviously some practical limits to how short cables can be.

How would that be solved, I don't know.

[+] moffkalast|3 years ago|reply
Keep the same speeds, add more wires.
[+] zamadatix|3 years ago|reply
I'm confused what that section is supposed to represent. E.g. Apple has a 3 meter USB 4 3x2 (40 Gbps) cable but the "cable" value for that section is listed as 0.8m. The only hit I'm getting in the USB 4 spec for "0.8" is on page 59 referring to maximum receiver insertion loss in dB for a gen 3 connection including a 0.8m passive cable but that in itself isn't a hard limitation on cable length.
[+] CoastalCoder|3 years ago|reply
Not my area of expertise, but maybe some (unrealistic) options include using fiber optics for the data lines, or adding more data lines.
[+] legalcorrection|3 years ago|reply
Suggestion: maybe include all the USB-C-plug Thunderbolt versions too. My personal policy these days is to just buy reputable Thunderbolt cables for all my USB-C needs. Maybe I'm doing the wrong thing?

Also, I think there's a difference between active and passive USB-C cables, or something like that.

[+] masklinn|3 years ago|reply
> Maybe I'm doing the wrong thing?

If you're happy with it then probably not.

The main possible issues are that it's more expensive and you get shorter and thicker (less flexible) cables, a passive non-optical TB (or USB4) cable will top out around 1m.

Less capable cables can be longer and thinner which is convenient for e.g. mice and such small devices. But otherwise may not matter overly much.

[+] netsharc|3 years ago|reply
Ah USB. In the old days it was different cables for different things, nowadays it's 1 connector for everything but beware, the cable might physically plug into the socket, but whether you'll get the functionality you want?
[+] doubled112|3 years ago|reply
Seems it is going backward to me too.

At one point I remember hooking up a computer being like one of those shape puzzles we give children. If you can match them they'll work. No two of my devices used the same cable or port, but if it fit it'd work.

Keyboard switched to PS/2 so those and PS/2 mice were confusing, but eventually they standardized on colours.

USB came out and you could just plug it in wherever. This was great.

And now? 20 combinations of cable features with the same socket but all do something else. I can only imagine what the return rate will be for stuff like this.

[+] izacus|3 years ago|reply
Just how many devices do you meet that regularly hit those edge cases? Outside 4K+ multimonitor connections?

(It's really popular and easy to bash on USB on this forum, but it turns out that in real life your USB-C device will "just work" for pretty much all setups outside really fringe high performance ones. And even those will usually just negotiate lower rate.)

[+] cesaref|3 years ago|reply
There's something about the naming of USB that is great. I love how there are now something like a dozen 'universal' standards, and how the serial bus now has multiple lanes.
[+] PowerBar|3 years ago|reply
In the "USB-A/B" section, they're all labelled "Type-A", the 3rd and 4th should be labelled "Type B".

It's also missing - mini-b 4 wire (older phones, etc) - micro-b 4 wire (most electronics prior to type c) - micro-b 8 wire (mostly seen only found on external 2.5" HDDs)

There were also a bunch of other connectors (mini-a, mini-a/b, etc) but they are very rare.

[+] Villodre|3 years ago|reply
I'm always flabbergasted at how difficult and hostile to the user is discern between the various USB standards.
[+] Aragorn2331|3 years ago|reply
Hello Fabien ! I saw on twitter that you had built a gaming setup, can you write an article on your blog as you did for your silent pc ?
[+] fabiensanglard|3 years ago|reply
I did build a PC last year especially to play Diablo2: Ressurected. I did write something at the time but never published it. Maybe I will clean it up.
[+] dschuetz|3 years ago|reply
So where exactly does USB-C fall into?

I have 2 different generations of USB-C hosts, and they behave quite differently when approaching max cap, especially with high-quality low-latency audio (USB-C was supposed to be de-facto replacement for FireWire).

[+] LeonidasXIV|3 years ago|reply
USB-C is a connector type, like USB-A (usually known as the classic USB plug) and USB-B (usually the other side of said plug, a square kind of connector). USB-B had other offspring like miniUSB and microUSB (note that in these cases on the other side of the cable you usually have a USB-A plug).

USB-C is the first time cables have the same connector on both sides, so it obsoletes USB-A and USB-B. But what is sent over USB-C? Can be USB 3 with which it is often conflated because they came around the same time, but it can also be USB 2, so it is a bit hard to tell. But USB 3 can use old style USB-A as well (the blue plugs with the same shape as the classic USB plugs) and USB-C (the microUSB plugs with an extension off to the side).

[+] hyperman1|3 years ago|reply
It's orthogonal.

Usb A is a host side connection Usb B (normal/mini/micro) is a client side connector Usb C is a 2 way connector.

Each of them can be implemented for each USB version, except USB C came later and makes no sense befor USB 3.

Then USB versions added features, signalling conventions and wires. But the USB A and B connector are backward compatible all the way to USB 1.0 1.5Mbit/s

[+] Tepix|3 years ago|reply
Good question. I bought a RaidSonic Icy Box IB-1121-C31 USB 3.1 (10Gbit) S-ATA dock recently (with a USB Type C connector) that came with a USB C cable and had a buy a special "USB-A - USB type C cable" to achieve 10Gbit/s with the 10GBit/s USB A connector of my mainboard.

The "USB A - USB type C cables" that i had already only worked up to 480MBit/s.

[+] stavros|3 years ago|reply
What does the U in USB stand for again?
[+] hdjjhhvvhga|3 years ago|reply
If you think it's not complicated enough, add Thunderbolt to it.
[+] synergy20|3 years ago|reply
Like the simple site design with a one page info about USB.

someone please make similar one-page with tables about PCI Express, Ethernet, HDMI...

[+] JoeDaDude|3 years ago|reply
If only it included a guide to the different USB connectors, but that might make TFA too long to publish.
[+] _joel|3 years ago|reply
I've definitely used 5m+ extensions on USB1 (and 2 iirc) before. I guess it'd be sketchy running something that requires decent throughput and not b0rk on ECC/FEC/whatever it uses but for temperature sensors which I was using, it was fine.
[+] TonyTrapp|3 years ago|reply
A long time ago, I was using a USB 1 or 2 Wifi adapter through a USB extension cord, I'm pretty sure the total cable length was more than 5 meters. It "worked", but even just flicking a light switch caused the network connection to reset. So yeah, it may "work", for certain values of "work".