[HN Gopher] I turned my ThinkPad into a programmable USB device
___________________________________________________________________
I turned my ThinkPad into a programmable USB device
Author : true_pk
Score : 179 points
Date : 2024-02-22 17:37 UTC (5 hours ago)
(HTM) web link (xairy.io)
(TXT) w3m dump (xairy.io)
| evanjrowley wrote:
| I'm grateful for this extremely detailed article. Great quality
| here.
|
| The fact that this has been achieved gives me hope that a
| networkless Synergy / Mouse Without Borders setup might be
| possible using just a modified USB cable. That's great for people
| like me who need to operate multiple computers simultaneously.
| taskforcegemini wrote:
| there is kvm switches (or just usb km without the video), but
| your suggestion sounds intriguing
| icodefuture wrote:
| Great article, thanks for sharing.
| rubatuga wrote:
| Woah it's the stuff of dreams.
| freedomben wrote:
| This reminds me so much of the early internet hacker culture that
| it's actually triggering nostalgia. What a great write-up! When
| ESR talked about becoming a hacker (hacker in the _Hacker News_
| sense), this is the type of person he was talking about.
|
| The combination of curiosity, dedication, and technical ability
| is exceedingly rare, and majorly impressive. Thanks so much for
| sharing!
| tamimio wrote:
| I quickly skimmed through it but great detailed article, and love
| the excessive use of emojis, not the typical boring wall of
| texts!
| aendruk wrote:
| One thing I've always wondered is why it's not common to be able
| to use a laptop as a generic keyboard and monitor for another
| computer. For doing maintenance on a headless machine it feels
| silly to go buy a keyboard and monitor when my laptop already is
| those.
| leonheld wrote:
| Everyone uses ssh to do that.
| dingnuts wrote:
| That's a completely different use-case. SSH doesn't let me
| control the GUI on the remote
|
| And no, X11 forwarding is not what I mean either
| jeffbee wrote:
| So, you'll accept any solution, except the existing ones
| that work?
|
| XDMCP solves this exact issue. You use one device which
| becomes virtually an attached terminal of another device
| which is actually headless and with no input devices of its
| own. We've had this for 30+ years.
| pessimizer wrote:
| No, we already use the solutions that actually work, and
| are speculating why there isn't one with the simple,
| obvious user experience. Why shouldn't we?
| exe34 wrote:
| > XDMCP
|
| muh wayland
| bee_rider wrote:
| There is/was a tool called x2x, which somehow let you send
| your input (mouse/keyboard) to another machine (I think via
| X forwarding tricks, although I don't know how it worked,
| so I could be wrong).
|
| I tried it around a decade ago and at the time it felt a
| bit abandoned. I vaguely remember that it might not have
| worked with every window manager? Anyway, I assume it
| hasn't got better supported since then. But it did feel
| magical.
| aendruk wrote:
| ...except for when they can't. The relevant retort would be
| that I could instead be using hardware with a remote
| management interface like IPMI, and building a custom OS
| installation image with remote access preconfigured. But even
| then I'm not sure how you'd have me troubleshoot surprise
| network issues.
| calamari4065 wrote:
| And what do you do when your ssh server stops working, or
| there's a hardware fault, a network fault, a failed OS
| upgrade?
| filoleg wrote:
| Idk about all machines ever, but I remember being able to
| access ssh over a serial port.
|
| Though in that specific case for me, it was more of a
| necessity rather than just a quirky way of using ssh (due
| to the "machine" just being a dev board with a UART ESP32).
| ThrowawayTestr wrote:
| The inability to simply connect one computer to another has
| always bothered me. Apparently there's a mode in USB 4 which
| will allow this.
| rusk wrote:
| RS232 null modem ftw!
| myself248 wrote:
| Seriously. A friend of mine built a cyberdeck specifically for
| this -- his mouse and keyboard can be switched to an external
| port and then cabled to another machine, and there are two HDMI
| ports on the side, one output and one input, with an internal
| switch to select either the deck's own machine, or the external
| input, as the source for the deck's monitor.
| WillAdams wrote:
| Has your friend done a write-up or parts list or build?
|
| I think this would be a big hit on Hackaday or some similar
| site.
| speed_spread wrote:
| An OrangePi 5 Plus would be a good starting platform for
| this because of the HDMI input port.
| nfriedly wrote:
| The GPD Pocket 3 has a KVM module that lets you do exactly
| this: HDMI & USB-C inputs and it acts as a display, keyboard,
| and mouse for whatever machine it's connected to:
| https://gpd.hk/gpdpocket3
|
| There's also the up-and-coming Minisforum V3 tablet that has a
| video input so that it can act as an external monitor, but I
| don't think it'll be able to share it's keyboard and mouse.
|
| I agree with you, though, it really would be nice if this were
| a more common feature.
| molave wrote:
| My laptop's monitor went bust and now serves as a glorified
| CPU.
| actionfromafar wrote:
| Being able to emulate a USB block device is really neat! Talk
| about easy way to copy files to another computer. :)
| erik wrote:
| This goes to an impressive level of depth.
|
| The ability to use a PC as a USB device opens up lots of fun
| possibilities. It's a little bit tragic that the required xDCI
| option is there in the hardware on this device, but it's not
| exposed and requires firmware hacking to access.
|
| The hardware is capable, but the vendor has just turned it off
| and locked away the controls.
| steelbrain wrote:
| This is really interesting. I've been researching some viable
| options like this. I have a beefy Network Attached Storage (NAS)
| server that I actively look for excuses to make use of. I have
| connected with some 40g and 10g interconnects for it across the
| house. I also have a PS5 & XBox that use USB hard-drives for
| additional storage.
|
| I looked into whether I could expose my NAS storage to PS5 &
| XBox. Turns out that it's possible! It's possible by mounting the
| NAS shares over iSCSI or NFS, and then emulating a USB storage
| device using the g_mass_storage module that exposes said storage
| to USB hosts.
|
| Besides time and cost, one major blocker for me right now is the
| bandwidth that such a system would provide. It's just not that
| big of an upgrade. Raspberry Pi very famously supports USB-OTG
| (similar/same as xDCI), but it only does so with USB 2.0 speeds,
| and so do all the other SBCs in that class that I found, except
| for one, RockPi4. RockPi has a Gigabit ethernet port, so if you
| max out ethernet, you can provide stable HDD speeds to both the
| PS5 & Xbox.
|
| It would be really interesting to explore a solution where you
| have the ability to plug in a custom PCIe network card (or an
| express card) that lets you go beyond 1gbe because then you can
| really saturate the USB 3.0 interface.
| Topgamer7 wrote:
| > However, dealing with a Raspberry Pi is a hassle: plugging in
| the wires, booting the board, accessing the shell, etc
|
| Probably just could have configured USB OTG, so its powered by
| the device you plug in, enable shell, then scripted this. Then
| you can configure mounts over ssh, commands over ssh, probably
| even mount the device.
|
| That being said, I encourage people to try to understand their
| devices, read the kernel, etc. Its something I strive to
| continually improve. Lets fix our own shit :D.
| lima wrote:
| The whole point of the exercise is playing with USB OTG, and
| the Pi has only one OTG port, so you need another way to
| connect to it
|
| (been there, done that)
| k8svet wrote:
| The "Zero" variants of boards tend to allow power over the
| OTG port, so you can do some interesting things. (Of course,
| annoying if your powering-device resets power to it).
| Particularly, if I didn't suck at DTS/u-boot stuff, you could
| make a PiKVM for <$75. (You can get $10 1080p/60fps HDMI
| capture cards, you use the OTG port for kb/mouse).
|
| Still, even if you had to external power it, those little
| boards have pins for power in. It would still be cheap/fairly
| elegant. And or a USB-C Hub should power it, and give you a
| place to put more non-host usb devices like a usb-eth dongle.
|
| I would like to make one with some of the (Raspberry|Orange)
| Pi 3, but again, I've lost too much of my life to dts/u-boot
| stuff. BSP/mainline woes. It's just easier to be a software-
| only, cloud-machines-only guy and live minimally.
|
| This article was exciting because I'd love to imagine cheap
| old laptops being salvagable as little KVM instances, but it
| seems like OTG/xDCI is just not a priority.
| controversial97 wrote:
| This reminds me of a thing from a few years ago, my vague memory
| is that it was by Travis Goodspeed.
|
| A smart TV would accept a firmware update from a file on a
| standard USB stick.
|
| The TV reads the file start to finish to check the digital
| signature then reads it again to update.
|
| A device that is pretending to be a USB storage device can send a
| manufacturer firmware file the first time then send your
| unofficial firmware after.
| zrail wrote:
| Nice. This is a class of error with the delightful acronym
| TOCTOU (Time of Check to Time of Use) which is present in an
| astonishing number of places.
|
| https://en.m.wikipedia.org/wiki/Time-of-check_to_time-of-use
| imhoguy wrote:
| Pity I can't do that with my AMD Ryzen ThinkPad.
___________________________________________________________________
(page generated 2024-02-22 23:00 UTC)