I want someone to make a video series where they exceed cable lengths and show what happens.
what happens if you have a 2km USB cable? what works and what breaks?
I want someone to make a video series where they exceed cable lengths and show what happens.
what happens if you have a 2km USB cable? what works and what breaks?
@psilocervine Resistance is a big factor if you want to transmit power, but your data transmit will cut out way earlier...the capacitive coupling between the different wires increases with longer wires and you will need to tune down the transmission speed to get stuff through. (Higher frequency -> more capacitive coupling).
That is why (slow) USB 2 cables are basically just four separate wires and HDMI cables are shielded and twisted and what not. And this is on just 2 meters of length..
@foone two of the racks i'm in at FMT2 are doing 10gig copper via cat5e well beyond the limits
works perfectly fine
Last clearing of "show interface" counters 62 days, 3:11:42 ago
3194667268 packets input, 270179047803 bytes
Received 439428388 broadcasts, 97504687 multicast
0 runts, 0 giants
0 input errors, 0 CRC, 0 alignment, 0 symbol, 0 input discards
0 PAUSE input
5637761409 packets output, 8317184003162 bytes
Sent 453174 broadcasts, 3256950 multicast
0 output errors, 0 collisions
0 late collision, 0 deferred, 0 output discards
0 PAUSE output
@foone 2km is really far of what is possible and the USB host or driver will just disconnect the device long before due to excessive retries.
USB 2.0 will do about 5m (Full-/Hi-Speed), then the signal is too degraded for a reliable connection. With an active cable you can do 25m. For USB 3.1 this is 3m and 18m respectively. The same if you use Hubs, maximum length is the same due to signal run time.
USB doesn't really have effective error correction, for example USB 3.2 allows 1 in 10^12 bit error on the cable before you get into trouble.
If you want more you can use USB over Ethernet where the USB Host is in the adapter, but this is cheating as the USB part isn't really any longer.
@foone vdsl2 degrades somewhat gracefully up to multiple kms. And adsl2 will happily do 20km over a single unbalanced twisted pair (full moon conditions). Ah fun days.
But now we have GPON - still travelling wave but very different failure scenarios.
Great idea though.
@foone Had a computer at one job that was powered off of basically USB power (5 volts, couple amps, little SBC)
We needed a longer cable and customer advised that AC extension cords were categorically a fire hazard. I advised my boss that all things equal, 20 more feet of low-current was safer than 20 more feet of 2 amps.
Customer didn't budge, we tried to run 5 volt lines 20 feet (or 10 or whatever)
Had to buy VERY thick wires. 5 volts does NOT want to go far through copper.
@foone @psilocervine LTT made a video on this some time ago, still enjoying to watch.
@foone USB1/2 has strict timing requirements, so it simply won't work at all past a certain point. It's not about signal quality, the protocol just can't handle delay. I think USB3 fixed that, but sadly USB2 over USB3 is not a thing, so that only works for USB3 native devices.
Most other protocols can handle distance fine if the signal integrity is maintained (which is how you get fiber converters and such). Or you can just be LTT and chain a bunch of PCIe extenders together and it works anyway because PCIe is awesome: https://youtu.be/q5xvwPa3r7M
So how do USB3 over fiber extenders work? They use this cursed thing that converts USB2 to USB3 at the protocol level. It doesn't conform to any specification, doesn't work with all devices, and literally makes software see USB2 devices as USB3 devices: https://www.via-labs.com/product_show.php?id=96
@lina @foone literally two days ago looked at what's inside a USB3.2 over fiber extender. Wasn't very surprised to see a direct connection of USB SS lanes to an SFP+ cage with a 10k bidirectional optical transceiver, only caps an ESD protection chip in-between.
Many SoCs share a single SerDes for high speed interfaces like sata/usb3/xfi/pcie so why not?
Want to see a PCIe riser over fiber next. Just need so send reference clock somehow 😁
@robot @trixie @foone Not multiple ports, one port that can be configured to multiple modes. For example, Apple's Type C controllers support USB3 Gen1 & Gen2, USB4/TB3/4, and DisplayPort modes with the same serdes/PHY.
It's actually a standard: https://cdrdv2-public.intel.com/643108/PIPE7_0_releasecandidate_2024July11-1.pdf
@mxshift @foone EP0 isn't just static data for a lot of device classes, so either this would only work for certain things or they still have to forward some requests...
Whatever you do, it can never be fully transparent/compatible. It's just not possible to tunnel USB2 at the wire layer invisibly, there's always corner cases...
@mxshift @foone It works if you have knowledge of the high level protocol and that the emulation strategy used is compatible with it. Mass storage is the easiest one because it's always a request/response protocol, and CDC-ACM only has corner cases around port open/close which isn't that common.
The issue is with things like a host that decides to stop listening on an IN endpoint, while the device still replies with data. A translator or tunnel in between can't synchronize that, so it would receive a data packet from the device and then have nowhere to deliver it... the device thinks it delivered data but the host has no idea.
@foone Can you get bit skew between the lines on a parallel cable to become a problem before other analogue nonsense ruins your day?
For general "nature abhors a nice clean square wave", ben eater did a great little video on why he chose 1MHz as the speed of his breadboard 6502 microcomputer; think it's about halfway into https://www.youtube.com/watch?v=fCbAafKLqC8
@foone relatedly, using the wrong cables types (with the right connectors)
i recently got a 10G multimode fiber link over 2m of single mode fiber :) i wonder how far…