36 ms·
I can't install Barrier on my work laptop for policy reasons, but I don't want to buy a KVM, so a project I've been interested in building when I have time is p
by zanecodes 5y ago
I can't install Barrier on my work laptop for policy reasons, but I don't want to buy a KVM, so a project I've been interested in building when I have time is porting enough of the Barrier/Synergy protocol to the Particle Photon [1] or BeagleBone Black [2] I've had lying around for a while, and then configuring it to emulate a keyboard and mouse via its USB gadget driver, allowing it to control my work laptop over USB.
On the Photon at least, emulating a keyboard and mouse is incredibly easy and is baked into the firmware, but implementing the Barrier protocol so that it can appear as a client on the network and pass on the keyboard/mouse input seems like it's going to take some effort.
[1] https://docs.particle.io/photon/ https://docs.particle.io/photon/
[2] https://beagleboard.org/black https://beagleboard.org/black
- grepfru_it 5y agoThey provide a version of some other keyboard and mouse sharing software that was approved. Then you can run that on the one work laptop with that problem while still using barrier, input director, synergy, etc on your other work computer
- avidiax 5y agoThe annoying/challenging part is that you need to drive the 2nd machine using relative motions, but place the cursor accurately and keep track of it. If the 2nd OS skips frames or has acceleration, you are pretty quickly implementing a Kalman filter.
- robocat 5y agoI recall some touchscreens use USB internally for the touch interface. A touchscreen has absolute coordinates, which does the trick, compared with the usual mouse/trackpad interfaces. I remember remote controlling an OS that needed me to install absolute touchscreen drivers to work best (probably a VM, but maybe Synergy drivers??)
- zanecodes 5y agoAccording to the Particle Photon docs [1] it's actually capable of moving the mouse to absolute coordinates, but I haven't tried that yet. [1] https://docs.particle.io/reference/device-os/firmware/#moveto- https://docs.particle.io/reference/device-os/firmware/#movet...
- loxias 5y agoIt's been a while since I was deep in the guts of implementing USB HID devices, but I think you can specify in the descriptor if you're sending relative or absolute values. There's a rewarding UX that can be made by switching the touchscreen to relative instead of absolute, you get more fine grained control.
- yencabulator 5y agoJust about every virtual machine runner works around this by emulating a USB tablet (touchpad) and not a USB mouse. Should be simple to do same via USB gadget driver. https://qemu-stsquad.readthedocs.io/en/doc-updates/system/usb.html https://qemu-stsquad.readthedocs.io/en/doc-updates/system/us...
- ridgered4 5y agoThere are/were standalone off the shelf USB devices that sort of did this, minute the network part which I had some interest in. I own an old one, but since my main machine is linux it's lack of linux drivers made it of dubious usefulness to me. I could control a linux machine with it, but the software that captures keystrokes/mouse and then sends them off through a simulated keyboard/mouse only had Windows/Mac versions.
- maicro 5y agohttps://pikvm.org https://pikvm.org might be relevant; the BBB and Pi are pretty comparable for most purposes, so wouldn't be surprised if that code/configured would work with only minimal tweaks on your BBB.
- 1MachineElf 5y agoI would love more projects like this, especially ones that utilize the BBB. Personally I've had the same need (shared keyboard and mouse) and same requirement (work policy preventing additional software) for many years now so have resorted to using a KM switch (no V) bought off eBay. If you look up "KM switch", the first thing you'll notice is that most search engines will automatically assume you meant "KVM switch" instead. This is what I believe contributes to the highly niche market and niche prices for KM switches. Anything under $100 is rare, hence used ones on eBay being the better option. It should be possible to have a series of Atmel 32u4 microcontrollers acting as a keyboard/mouse devices controlled by a single host device over I2C. The problem is that people with the skills and people with the motivation haven't overlapped in a significant way.
- loxias 5y ago> The problem is that people with the skills and people with the motivation haven't overlapped in a significant way. Yeah... I, uh, have the skills (and I'm guessing you do too), but I don't see the point of the product. But you're right, a KM switch could be made very inexpensively. Could also be made modular, and wireless (for people who are into that thing). You don't even need heterogeneous nodes, I think. All the nodes could be the same -- an RP2040 (now my favorite microcontroller for personal projects) can handle being a USB device, and host. The nodes could connect to each other through a daisy chained i2c, with another layer above for autoconfig. What would be a price people would pay for such a thing? Say, 1 control node and 3 client nodes (allowing you to control 4 computers with 1 keyboard and mouse)? You say under $100 is rare?
- loxias 5y agoI'm not entirely sure I see what your describing with certainty, but are you talking about essentially a "barrier client appliance?" A dongle you plug into all the machines you want to control using barrier, which connects wirelessly to the barrier server daemon running on your main computer? If so, neat idea, and I've done stuff like that before. You can even have the client appliances be configuration free -- they announce themselves to the network and the server pushes out after pairing. Interesting and fun to build, but I don't quite see the use of such a thing. It would still require running the barrier server on your laptop. I'd try to possibly go a different direction: A cheap device (RP2040 based?) that sits in between an external keyboard and your laptop. Other copies of the same hardware plug into the usb ports of other computers you'd wish to control.
- zanecodes 5y agoMore or less, but in my case I would only have to run the barrier server on my personal desktop, and won't have to install any software on the client I wish to control (in this case, my work laptop). I'd like to piggyback off of the existing Barrier code, since I already use Barrier to control my personal Surface Pro, which also sits on my desk. I really wish my 49" Samsung Odyssey G9 supported DDC over DisplayPort, so I could also switch my monitor input via software, and essentially have a KVM without buying any additional hardware. A major consideration for me is avoiding introducing any extra input latency between my input/output devices and my personal desktop, since I use it for gaming. I'm okay with trading off additional latency when controlling my work laptop in exchange for lower latency on my main desktop. That said, I may end up using my BeagleBone rather than my Photon, since it has an ethernet port, and running Linux may prove advantageous.