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?

@foone that'd be kinda really interesting? I imagine the biggest problem with Cables of Unusual Size would be things related to wire resistance but I fully admit I'm just guessing there
@psilocervine @foone now imagining ghost in the shell where an internet creature loves in a physical wire.
Except it lowers resistance, and / is complicit or collaborator to a corrupt nation-state.

@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

@foone

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 8 terabytes tx, no errors or retransmits
@gewt @foone I've been running 10Gb ethernet over 50m of 20 years old CAT5e for about half a year, and it worked without problems, then one day it simply stopped (but by then I already installed CAT7 through the stairwell).
@foone I think LTT tried Daisy chaining PCIe extensions a few years ago
@foone I also wonder if you could get past those limits with FANCY cables with extra shielding and better conductors and such
@Canageek @foone uncles infinity or zero is involved, a bigger number is still finite.
@foone i wonder what would happen first: the cable starts looking like a transmission line and phase decoherence makes the protocol undecodable; or the resistance of the cable gets so high that it messes with speed negotiation
@sjolsen
Thanks to you, I have learned a little bit about phase distortion. Kind of reminds me of how different frequencies of light refract at different angles...
@foone
@foone at what point does lightspeed delay become a problem?
@WizardOfDocs @foone About one meter, IIRC? That's about a single clock cycle at 0.3 GhZ.
@xgranade @foone wow, that's a lot less than I expected
@WizardOfDocs @xgranade @foone yeah whaaaat. Altho I'll dig up old physics textbook (yes, Tipler) and try running numbers later
@MxVerda @WizardOfDocs @xgranade @foone Remember then c_copper is not the same as c_vacuum (and is much, much lower as I recall)
@Canageek @WizardOfDocs @xgranade @foone noooo, my ADHD nemesis! Contextual parameters!
@Canageek @MxVerda @WizardOfDocs @xgranade @foone Not *that* much lower; the usual first order estimate is 2/3 c_vacuum.
@WizardOfDocs @foone I don’t think propagation delay is as much of an issue as attenuation. We’re using singlemode fibre USB extenders at work which are related to 10KM (although we’re only using them over a few hundred metres), and the speed of light is much slower in fibre than the propagation delay of electricity in copper.
@WizardOfDocs @foone fibre channel actually has a parameter where you can tweak the system by indicating how many packets are currently on the fiber between the two switches. Transmission speed is so high that the packets are short enough to fit a good dozen on several km distance.
@foone Between resistance and capacitance your signal is gonna be smushed to hell and I bet a device wouldn't even recognize a start packet, and that's pretty much every modern connection standard. Not to mention you'll start picking up noise from powerlines at that distance. Digging back for RS-232 and RS-485 and other old buses might be more interesting. RS-485 theoretically supports up to 4000 feet at low speeds, so it's got a better chance with high quality cables, and you could maybe slow it down enough to overcome the capacitance issue, but that'd be pretty nonstandard UARTs. I feel like you'd get one good episode before it's just repeating, unless you cover other cable problems + things that cause signal integrity issues.
@foone
An old school USB 1.0 mouse, running at 1.5 megabit, might still work?
The cable impedance is the big challenge...
@foone that sounds like an incredibly fucking dull video that i absolutely would watch 2 hours of
@foone I bet resistance works

@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 I'v seen overlength network cables.
@foone I do have evidence that Google Fiber does these experiments on customers without their knowledge

@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 10m HDMI cable: laptops continue to work, except Apple products. Probably because of the 10cm long DP-HDMI adapter.
@gunstick @foone extra long hdmi and usb usually is fiber
@foone That's such a cool idea. 2 km of USB cable! Never again forget where in the flat you put that stupid cable cause it's literally everwhere! I could even have my charging cable at home and at work at the same time!
@foone I am tangentially reminded of https://www.revk.uk/2017/12/its-official-adsl-works-over-wet-string.html where they proved ADSL signals work over wet string.
It's official, ADSL works over wet string

Broadband services are a wonderful innovation of our time, using multiple frequency  bands  (hence the name) to carry signals over wires (us...

@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.

https://www.youtube.com/watch?v=p9nqQuu4lmQ

When Does Cable Length Matter?

YouTube
@foone I need to get a portable power supply at some point so we can discover how far along the barbed wire fence I can convince the network to run… https://bitbang.social/@billgoats/114783670173518561

@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

How many PCIe Extensions is TOO MANY??

YouTube

@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 😁

@trixie @lina @foone A single SerDes for multiple ports??? I want to hear more!

@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

@lina @foone there's another technique where you put USB endpoint hardware on one end of the cable that can respond to EP0 locally but all other endpoints get forwarded. The other end gets a USB device attached and sends the static EP0 response data to the other end. Forwarded endpoints get passed to the attached device. This is how iKVM virtual media works on most BMCs.

@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...

@lina @foone I'm aware. This is effectively doing the same thing that a Linux USB gadget does except shipping some parts of EP0 and all non-EP0 to a remote device. It certainly works for mass storage and CDC-ACM. I have demos of both that I ran from California to a BMC in Oregon. Yes, it's fragile and terrible. Then again, iKVM virtual media also implements an entire SCSI stack including CD-ROM emulation in JavaScript so good ideas kinda went out the window a while ago.

@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.

@lina @foone reminds me of the most asymmetric PCIe bus. PCIe *is* awesome
@lina @foone is this the chip that was built for virtuallink you are talking about or are there more?
@robot @foone I think it's that one! Or at least a newer revision of it.
@foone
The price goes up because no ones got usb cables to sell
Stop it
@foone Screw a 2km USB cable, I've seen impressive video corruption from a 10m "extension" and a cheap webcam. Fun times trying to mount a drive on that same cable, too

@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

Why build an entire computer on breadboards?

YouTube
@foone I know for hdmi it just doesn't function. Work decided to move a projector and the cable run became 75' using a bargain-bin cable... they didn't believe me that it stopped working because it was Too Long and that we needed a better cable & booster. They called in a $$$ person to tell them the same thing.

@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…

@foone one weird bit of trivia that I somehow remember from college is that the 100m length limit on fast Ethernet has nothing to do with signal integrity and much more to do with the physical length of the minimum Ethernet frame. You had to be sure that the whole thing didn't fit on the wire because then collisions were impossible to detect.
@foone
I have seen HD-SDI right on the edge of breaking and it's so glitcheriffic.
@foone something-something TOSLINK over carrier grade fiber thru Greater London and back