XaiJu
beneater
beneater

patreon


How does USB device discovery work?

New video! What happens when you first plug a USB device in? There's a whole lengthy conversation where the computer discovers what a USB device is capable of. In this video I capture the conversation for a keyboard and walk through what's going on. 

As always, thanks for your support. Capturing that NKRO-capable keyboard I showed at the end is going to be interesting. It only communicates at high speed (480Mbps) which is much too fast to capture with any equipment I have access to. The solution will be fun though... Sorry for the teaser, but I'm working on it right now and I can't wait to share it.

Thanks as always!

-Ben

How does USB device discovery work?

Comments

As a gift? Wow! Lucky you! There is, however, a huge educational discount promotion running currently for the RTB2002 and 2004. It includes many options (K1, K2, K3, K15, K36 and B6), see https://www.batronix.com/shop/oscilloscopes/Rohde-Schwarz-RTB2002EDU.html for example. I‘m tempted … but if USB decoding won’t work … or is it included with UART/RS232 decoding?

Stefan Wolfrum

I very recently received an RTB2004 as a gift. The segmented memory is an additional option that does not come on the base model (RTB-K15). I don't recall USB decoding being an option, I think it's SPI, I2C, UAR/RS232, CAN, and LIN - all of which are separate options (RTB-K1 thru K3), unless you get a package. So far it seems like a great scope, but they do seem to nickel and dime you with the features.

Tyler Arbogast

Awesome video!! These are exactly the things I wanna learn. While watching this I was wondering if „my dream oscilloscope“, the Rohde & Schwarz RTB2K, is capable of all this woodoo, too?! Does anyone know by any chance? Especially the segmented capturing and USB decoding should work, hopefully. I haven’t bought it yet, it’s quite an invest. But I’m very much looking into it.

Stefan Wolfrum

The usefulness of segmented capture is elided. I assume it's because each segment is a short length, so you're not sampling the empty gaps where nothing happens, and therefore the scope can save its sampling memory for times when signals are transmitted? It might be worth stating this as the trade off between resolution and total sample time will not be obvious to people who don't use oscilloscopes.

rhc

You said "Zero'th" (9:45)....that term always makes my brainstem snap. Zero is the "INDEX"; therefore, index 0 is always the FIRST element.

Don Costello

Well, I think I got lost there in a sea of data sheets, and lost the plot a bit. You probably could skip quite a bit before you write it to USB and then re-analyse in the spreadsheet. I’m not really complaining, if it weren’t for your videos, I’d never have appreciated the value of data sheets, and I’m loving this series as a whole. Thanks for all the hard work.

David Dawkins

I guess you already knew this, but since the physical layer is not important anymore in the series, you could use wireshark to analyse the traffic. Seems easier then exporting the csv from the oscilloscope.

I never thought learning about a technical specifications, especially something so convoluted as USB and HID could be interesting, but once again i'm proven wrong. The video was very interesting and I can't wait to see how the full key rollover is implemented!

You are the best.! Love your videoes. Thank you

Jakob Dannesboe

This is great, perhaps you can show some of these descriptors showing up in device manager on a windows box and make that connection for people

Brian Gregorka

I don't know what i will do with this knowledge, but i am glad i have it. This whole channel has given me a much deeper understanding of how computers and digital logic work.

Michael McDonnell

my understanding is endpoint 0 is always used for setup and "control" related comms, then depending on the device it could have 1 or more other endpoints for normal comms, where this keyboard just has 1 which is uses to report the key presses

Martin Noble

spotted one "mispoken" word around 7:57 where the document on screen reads "Default Control Pipe", but say "Default Control Path"

Martin Noble

another great detailed video. really interesting to see just how much back and forth is happening in those first ms after plugging in to enable the devices to talk.

Martin Noble

Maybe I missed it, was it discussed what an end-point is? It seemed like the keyboard was talking about end-point 0, then later in the exchange switches to talking about end-point 1, why does it do this?

I never realized how much happens before my keyboard (or any other device) starts working after I plugged it in. Fascinating video, thanks for making it.

Jay


More Creators