how do usb hubs that split one usb port into multiple ones work? i know nothing about hardware but that seems like something that definitely shouldnt work

this is kind of complicated. one of two things is happening. but first:

when you plug in a USB device, a number of communication signals are sent back and forth between the computer & device according to the official protocol outlined by the USB implementers forum (big group of engineers from multiple companies working together to make the USB standard). these critical, initial communications principally inform the host computer what the USB devices does and how it operates

this is all software

look at a usb drive, inside the connector. you see 4 pins/rails/wires/connection pads/whatever. two of those are power & ground, simply completing a circuit so the device is powered. the other two are transmit & receive. they cycle between a single high voltage and zero voltage to tap out 1s and 0s. exactly the same as the female port it plugs into (on your computer) except the transmit & receive pins are swapped (so that the USB device’s transmit is connected to the host’s receive and vice versa)

everything after that is just software

anyway, one of two things: either (1), the usb hub describes itself as a hub and the host acknowledges that description, and then a bunch of complicated circuitry tries to orchestrate 3 or 4 or however many hub ports communications over the main hub-host USB pins, and each hub port can communicate with the host machine with a relatively small communication rate decrease. this would only feasibly happen with a cerified USB 3.0 device and a host with 3.0 ports (pretty blue)

this almost never is the case and when it is something almost certainly fucks up and you revert to the second case, where (2) a bunch of onboard circuitry chooses a very high communication rate (baud rate), four or five or whatever USB “ports” are described, and whatever is plugged into the hub-side ports communicates with the host at effectively 1/x the baud rate where x is the number of other hub-side ports being used simultaneously

what i’m really trying to get here is that it’s just software. standardized software, which is one of the worst kinds of software

don’t know about USB, but if it’s anything like SD then part of the initialization process involves the host-side firmware repeatedly asking the device to send CIDs (card IDs). if its a simple SD card, it will only present one CID. if it is an SDIO device (mystical rare creatures & firmware author nightmare) it may present a bunch because an SDIO device can kind of act like a hub for SD cards. if there’s multiple cards (or in our metaphor, multiple USB drives) resulting in multiple IDs being sent, then there is usually a marshalling message sent from host to device like OK IM WRITING 1024 BLOCKS TO DEVICE ‘A’ AT THIS ADDRESS and then 1024 data bits are sent and the device reverts back to waiting for a marshalling message

does this answer your question? i feel like i whiffed this one