[HN Gopher] usbredir: A protocol for sending USB device traffic ...
       ___________________________________________________________________
        
       usbredir: A protocol for sending USB device traffic over a network
       connection
        
       Author : sipofwater
       Score  : 88 points
       Date   : 2024-04-16 17:13 UTC (5 hours ago)
        
 (HTM) web link (www.spice-space.org)
 (TXT) w3m dump (www.spice-space.org)
        
       | naikrovek wrote:
       | Does this offer anything over USB/IP?
        
         | k8svet wrote:
         | I think just that it's plugged in at the SPICE level. So I
         | guess you could redirect a USB device into a guest that isn't
         | running Linux and can't run usb/ip? But also, this is how usb
         | redirection works with virt-viewer/virt-manager, I'm fairly
         | sure.
        
           | naikrovek wrote:
           | USB/IP works fine on Windows and MacOS, though MacOS has no
           | ability to use devices shared by USB/IP; it can only share
           | devices to others.
           | 
           | What is this "SPICE level" you mentioned?
        
             | touisteur wrote:
             | https://www.spice-space.org/spice-user-manual.html that
             | qemu uses a lot.
        
             | k8svet wrote:
             | Imagine you had a qemu/libvirt guest that understands USB,
             | but doesn't have support for USB/IP in "kernel/userspace".
             | 
             | usbredir gets your device to qemu, looking like it's a USB
             | device attached to the VM, without cooperation from the
             | guest.
        
           | touisteur wrote:
           | Now I'm wondering whether someone has built support for this
           | in rust-vmm...
        
       | WhatIsDukkha wrote:
       | The one hack I keep hoping <someoneelse> will do the actual work
       | for is -
       | 
       | redirecting my steamdeck control via usb to my linux gaming rig
       | and expose it as a usb device(s) for steaminput.
       | 
       | It seems like a natural and perhaps even "straightforward" hack
       | but I've seen no evidence of one so far, perhaps there is
       | something in usb that limits the ability to proxy it correctly.
        
         | KeplerBoy wrote:
         | Sounds like something Valve should make. Kinda weird they
         | haven't so far.
        
           | ShamelessC wrote:
           | Valve's "remote play" allows one to play games on another
           | host computer via your Steam Deck as though you are plugged
           | straight. If you don't need the video streaming, you can
           | lower the settings.
           | 
           | edit; oh nm, user wants a direct wired connection to work.
        
         | jxy wrote:
         | it may not be practical given the possible high latency.
        
           | crtasm wrote:
           | over USB. what might introduce high latency?
        
             | all2 wrote:
             | Oh, oh, I get what you're saying. You want the steamdeck to
             | expose its controls as a hotpluggable USB device on another
             | machine.
             | 
             | That would depend on the USB hardware on the device, I
             | think.
        
         | all2 wrote:
         | Maybe allow mounting of the the steamdeck input devices in
         | steamdeck:/dev over network on your linux box so it is exposed
         | as an additional device? Something like plan9 does.
        
         | delecti wrote:
         | It seems people have achieved that:
         | https://www.reddit.com/r/SteamDeck/comments/v22ddf/guide_how...
        
           | WhatIsDukkha wrote:
           | That's over wifi not usb.
           | 
           | Even a bluetooth mouse has too much latency for many games.
        
             | ranger_danger wrote:
             | Demonstrably false:
             | 
             | https://www.rtings.com/assets/pages/46ieCfmI/mxvertical1-2g
             | r...
             | 
             | https://old.reddit.com/r/MouseReview/comments/hf1vrd/is_inp
             | u...
             | 
             | https://www.youtube.com/watch?v=orhb7Njj3h8
             | 
             | https://www.youtube.com/watch?v=yy0xmcBg_IY
             | 
             | https://www.rtings.com/mouse/tests/control/latency
        
               | delecti wrote:
               | I didn't watch those youtube videos, but the text links
               | either agree with the opinion that bluetooth is worse, or
               | don't refute it.
               | 
               | That rtings graph shows that bluetooth is pretty clearly
               | worse in the majority of cases from wired or wireless
               | (which is distinct from bluetooth).
               | 
               | "Bluetooth" doesn't appear anywhere on that Reddit
               | thread.
               | 
               | And from the second rtings:
               | 
               | > The mouse's connection type affects the click latency.
               | Generally, wired mice have the lowest latency, and
               | Bluetooth mice have the highest latency. A Bluetooth
               | connection isn't recommended for gaming, but it's still
               | good for office use, and most people won't notice any
               | delay unless the latency is extremely high.
        
               | WhatIsDukkha wrote:
               | Few/none of the wireless gaming mice are using bluetooth,
               | its proprietary radio protocols and usb dongles.
               | 
               | Click latency is not too useful vs swipe latency.
               | 
               | Bluetooth has a pretty low polling rate iirc and that
               | kills the swipe latency.
               | 
               | More generally and responsive to what we were talking
               | about, proprietary radios are not bluetooth and they are
               | not WiFi which is the latency we are actually talking
               | about (which is usable but not for me to play elden ring
               | by direct experience).
        
             | mike_d wrote:
             | VirtualHere will run over any network connection, that user
             | just happened to use wifi.
             | 
             | All the mice I am aware of that use Bluetooth are travel
             | mice and the like. Even cheap gaming mice use RF dongles
             | that do not have the Bluetooth polling limitations.
             | 
             | You can tell your friends in Fortnite you died because of
             | mouse latency, but lets keep HN discussions grounded in
             | reality please.
        
         | yjftsjthsd-h wrote:
         | To clarify: You want the Steam Deck to run USB gadget mode and
         | use that to expose its input devices to the other machine?
         | 
         | If so... while searching to see if the SD supports gadget mode
         | (answer: yes) I happened across
         | https://github.com/Frederic98/GadgetDeck - have you tried that?
        
           | WhatIsDukkha wrote:
           | This looks closer then anything I've seen so far, thanks!
           | 
           | From what I can discern its missing important bits of the
           | controller and doesn't have any steaminput profile etc so
           | it's clunky still.
           | 
           | Worth poking at though.
           | 
           | edit - to clarify, ideally steaminput would be tricked on the
           | host to think that it "was" a steamdeck so all the mapping
           | features would be available. I don't really need another usb
           | game controller its more the steamdeck touchpad etc.
        
       | MisterTea wrote:
       | On Plan 9 I just rimport the remote machines /dev/usb. Since this
       | is all over 9P it can go over any 2-way pipe, even rs232.
        
         | all2 wrote:
         | And, the linux kernel has plan 9 FS drivers. [0]
         | 
         | [0] https://www.kernel.org/doc/html/latest/filesystems/9p.html
        
         | alchemist1e9 wrote:
         | Is Plan 9 alive and kicking?
        
           | MisterTea wrote:
           | http://9front.org/releases/
        
           | rcarmo wrote:
           | Depends. There are still many enthusiasts (even new ports to
           | random chipsets), but there is also a bit of a schism between
           | the 9front folk and... let's say our current timeline. The
           | good news is that there are interesting things going on,
           | fortunately none of which related to current tech trends.
        
             | MisterTea wrote:
             | > but there is also a bit of a schism between the 9front
             | folk and... let's say our current timeline.
             | 
             | As a 9front user who attended IWP9 the past two years (just
             | was in Philly this past weekend) this really isn't the case
             | anymore.
        
           | yjftsjthsd-h wrote:
           | Plan 9 is like BSD; the original is no longer developed, but
           | its forks ( https://en.wikipedia.org/wiki/Plan_9_from_Bell_La
           | bs#Derivati... ) are healthy enough.
        
       | tombert wrote:
       | There was a thing that was around 10 or 11 years ago called
       | "Wireless USB", and it was actually kind of cool. It did exactly
       | what it sounds like, you could plug in two different arbitrary
       | USB devices into hubs or a computer that supported wireless USB,
       | and the computer would just recognize it as a vanilla USB device.
       | I don't actually know why it never caught on, I thought it was
       | neat, and it seemed to work fine. I guess due to the popularity
       | and ubiquity of bluetooth?
       | 
       | https://en.wikipedia.org/wiki/Wireless_USB
       | 
       | EDIT: Looks like it was more than 10 years ago, circa 2009 or so.
       | Time has no meaning.
        
         | codetrotter wrote:
         | First time I heard about Wireless USB was just the other day,
         | in a video looking at a luggable computer from 2006.
         | 
         | https://youtu.be/OO5hYhdxIuk
         | 
         | Video is worth a watch although it also doesn't give an answer
         | for _why_ Wireless USB actually disappeared.
         | 
         | I was wondering after watching that video, if it could be due
         | to security concerns? Like, is the Wireless USB protocol
         | encrypted? And if so, does it use sufficiently strong
         | encryption?
         | 
         | I did find a document that talks a bit about Wireless USB
         | encryption.
         | 
         | https://cdn.teledynelecroy.com/files/appnotes/wireless_usb_e...
        
           | tombert wrote:
           | I actually saw that video, but I had heard of Wireless USB
           | for awhile. My manager at my first job after dropping out of
           | college the first time got it for his computer and he was
           | super excited.
           | 
           | At least according to Wikipedia, it was encrypted.
        
             | lupusreal wrote:
             | There's "encrypted", and there's _encrypted_. WEP for wifi
             | was encryption, but cracking it was so trivial that for
             | some years it was practical to crack yourself access to
             | wifi wherever you were on a casual whim.
             | 
             | Still, even if the encryption was very weak, wireless wifi
             | sounds appealing to me, at least for my old trusty wired
             | mouse. Somebody snooping on or spoofing my mouse seems like
             | an academic threat.
        
               | gruez wrote:
               | > Somebody snooping on or spoofing my mouse seems like an
               | academic threat.
               | 
               | You're not concerned that anyone within a 100 ft radius
               | of you can inject arbitrary keystrokes/mouse movements to
               | your PC?
        
               | lupusreal wrote:
               | No, definitely not. The intersection of people who would
               | think to do that, have the skill for it, and the
               | inclination to view me personally as their target is
               | probably zero.
        
               | tombert wrote:
               | Not to mention that I don't think anyone but a few niche
               | enthusiasts even have the hardware to do it even if they
               | had the skills and inclination. Who's going to walk
               | around with a 15 year old laptop brute-forcing wireless
               | USB encryption, or find some obscure hub and do it on a
               | modern laptop?
               | 
               | I'm not going to say the likelihood is "zero", but I am
               | going to say it's so close to zero that it's really not
               | worth even considering.
        
               | toast0 wrote:
               | Anyone within a 100 ft radius of my PC is in my house and
               | could just come over and poke at the mouse.
        
               | chrsig wrote:
               | That's somehow both a much less elaborate and
               | significantly more invasive approach to pranking wfh
               | coworkers.
        
               | codetrotter wrote:
               | > wfh coworkers
               | 
               | I usually call her my girlfriend, but I suppose that's
               | another way to refer to one's significant other :p
        
               | Terr_ wrote:
               | Imagine someone driving around neighborhoods with a
               | laptop and a very good antenna.
               | 
               | 1. Detect vulnerable networks in computers
               | 
               | 2. Pretend to be a USB keyboard.
               | 
               | 3. Trigger blind key combos that will visit a website,
               | confirm downloading a file, execute that file, and "OK"
               | privilege escalation prompts.
               | 
               | 4. Move on to the next block or cul-de-sac, while the
               | malware finishes unpacking and reporting home for further
               | use.
        
               | eichin wrote:
               | That doesn't need wireless USB, we already have
               | CVE-2023-45866
               | https://news.ycombinator.com/item?id=38661182 for
               | "bluetooth stack more than 6 months old"
        
         | hbossy wrote:
         | Most USB devices either rely on the connection to provide power
         | or are too clunky to move around, so having a wire doesn't
         | really matter.
        
         | y04nn wrote:
         | I recently found out that a manufacturer (TI, NXP, murata,
         | infineon?) was demonstrating a USB2 live camera capture using a
         | UWB (Ultra-Wide-Band) short range wireless transmission. But I
         | can't found the source again.
        
       | sandreas wrote:
       | Sounds a bit like USB/IP
       | (https://wiki.archlinux.org/title/USB/IP).
       | 
       | Is this a new thing?
        
         | eqvinox wrote:
         | Both projects seem to be >10 years old at this point... might
         | be a case of "convergent evolution"?
        
           | sandreas wrote:
           | Probably... I thought of passing my iPod Nano 7g through
           | USB/IP to my Proxmox Windows iTunes VM, but I never had the
           | urge to do it. Although it'd probably work and would be great
           | in combinaton with Wireguard on vacation, I did not want to
           | setup a "risky" driver / kernel module on my main proxmox
           | server :-) USB passthrough always was enough.
        
           | ktm5j wrote:
           | I'm on my phone so I can only do so much digging, but from
           | the usbip sourceforge page that's linked above, it says that
           | development has moved into the Linux kernel:
           | For Linux, the source code of usbip was merged into the
           | staging tree, and finally has been moved to the mainline
           | since Linux-3.17. Development is ongoing in the kernel
           | community, not here. Linux distributions will provide binary
           | packages of usbip.*
        
       | andrewmcwatters wrote:
       | Remember Remote Disc from Mac OS X? https://support.apple.com/en-
       | us/101323
        
       | paulkon wrote:
       | I'm running virtualhere on thousands of raspberry pi's sharing
       | various USB devices to cloud machines over vpn. It's been working
       | without issues for years now. Seems to be a solo developer in
       | Australia that's been working on it for a really long time.
       | https://www.virtualhere.com/
        
         | brcmthrowaway wrote:
         | What possible use case is this for
        
         | kotaKat wrote:
         | $49 and a byzantine per-server-cannot-be-transferred license is
         | not palatable to me. I hate hardware-bound licensing.
        
       ___________________________________________________________________
       (page generated 2024-04-16 23:00 UTC)