Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is it theoretically possible to have 2-way HID (keyboard, mouse) and 1-way video output on a single USB-c cable? It would simplify connection to a KVM or software-emulated display/keyboard/mouse. Low FPS would be enough for dashboards and CLI.


Yes, this theoretically could be done using DP Alt-mode for type-c. It allows up to 4 lanes(commonly 2 lanes) DP signal over typically USB3 assigned lanes. USB2 data lanes are still functional in this mode. https://newnex.com/technology-articles-dp-alt-mode-over-usb-...


I don't think you can do it direcly.

I recently found the Openterface Mini-KVM [1], which is supposed to allow you plug it into your laptop over USB-C, and some arbitrary system with USB+HDMI. Then, using their host software, view the HDMI display output and send mouse and keyboard inputs with ease.

I haven't tried it, so I can't speak to how well it works, but it sounds promising.

It is a crowdfunded project, so the usual caveats apply

[1] https://openterface.com/


This thread has gone from:

  could exist?
   not possible
    specs imply yes?
     exists as open hw/sw
Thanks so much for the pointer! https://www.crowdsupply.com/techxartisan/openterface-mini-kv...

> KVM-over-USB .. macOS, Windows, and Linux [clients], with Android support in development.. HDMI and emulated keyboard/mouse (HID) input.. video up to 1920x1080@30Hz with under 140ms latency.. play target device's audio directly on the host computer.. [send text] from the host to the target device, ideal for copying usernames, passwords.. Switchable USB-A Port.. for transferring files.. or sharing other USB devices.

With USB storage emulation, this approaches BMC remote mgmt, minus network attack surface.


I think most people just weren't sure what you're talking about.

Communications between such a thingamajig capture card and a laptop has nothing to do with DP Alt mode or USB HID, it's whatever custom USB packet types that capture card manufacturer comes up with. That technically wouldn't be an answer to your original comment in strict sense.

The most likely heuristic paraphrasing for your original query is something like "are there ways to multiplex DP _source_ and HID _peripheral_ on a single USB3+DP Alt connection". That made no sense at multiple levels on top of being unlikely to be possible. That lead to people hallucinating wildly.

The alternate question "are there ways to plug an SBC into laptop somehow for remote control, over a single USB-C cable" has that dongle as an answer as we now know in hindsight. But that is not a straightforward interpretation and response for your original comment, especially with your follow-up replies about DP Alt mode specs that would not be used by such a device.


Thanks for the feedback.

As mentioned by others, there are USB-C docking stations/monitors where a single cable provides power to the device, takes video from the device, and sends keyboard/mouse events to the device. I should have asked whether software on a laptop could emulate a USB-C docking station, i.e. DP display sink + keyboard + mouse, since docking stations already exist.

> Communications between such a thingamajig capture card and a laptop has nothing to do with DP Alt mode or USB HID, it's whatever custom USB packet types that capture card manufacturer comes up with.

Revisiting the question above, could a manufacturer make capture card output compatible with existing USB-C docking stations, instead of inventing bespoke USB packet types? If custom hardware is needed, why not emulate standard protocols?

I was surprised to learn that Windows/Linux/Mac/Android userspace software can encode/decode custom USB packets from a USB-C cable, without a custom kernel driver. Could RP2350 implement a similar custom protocol at the other end of the cable, removing the need for a hardware capture device?


The host and peripheral PHYs are different. Protocols going downstream and upstream are different. USB peripherals are literally not allowed to speak unless spoken to. It's always the king and his slaves. It's that way in the hardware.

You can make such a standalone computer, painted in orange and marketed as an ice cream, that works as the king class when a slave-class is connected to its sole USB-C port, and as a slave class when a king-class like a laptop connected to it. This is in fact how many smartphones work. But that's again not what you asked.

Exactly what you're asking in the way you're asking, standard USB protocols(and DisplayPort signals) going in and out of devices and computers freely like Ethernet packets, just isn't possible with USB.


> USB protocols (and DisplayPort signals) going in and out of devices and computers freely like Ethernet packets, just isn't possible with USB

That reminds me of Intel Thunderbolt Share [1][2], which offers sharing of screen/keyboard/mouse between 2 PCs, and is probably software-emulated ethernet over Thunderbolt.

[1] https://download.intel.com/newsroom/2024/client-computing/th...

[2] https://www.pcworld.com/article/2330173/meet-thunderbolt-sha...


Host-to-host connections over USB4 (which is Thunderbolt without Intel's marketing) actually just have a packet interface over which you can pass IP, no need for Ethernet emulation.

Linux driver is here https://github.com/torvalds/linux/blob/master/drivers/net/th...


This already exists, right now...? I've seen tons of USB hubs with an hdmi output and several USB ports that can be used concurrently. Hell I'm using one right now. Are you asking about something else?


This is for connecting an SBC to a laptop via one USB-c cable. The laptop emulates a display and sends kb/mouse events to the SBC.

Another comment pointed out a $100 board that can tunnel USB data + video on one cable.


You can easily have PD+DP+USB (but limited to 2.0).


You can get the RP2XX0 PIO to control an extra USB host port. I've been keeping tabs on RP2040 resources: https://taoofmac.com/space/hw/rp2040


Can someone explain the downvotes?


There's no current specs for dual directional USB over any cable, afaik. There very well should be.

You could present as a device and offer networking and have usb-ip advertised over multicast on that port. Easy, weekend project at most, would be dead obvious to any practitioner.

USB4 as a packetized protocol really should offer something. I do wish there were like a half speed 2.5Gbit usb4 option, that microcontrollers could have some hope of accelerated bit banging.


According to Wikipedia, DisplayPort 2.0+ can coexist with USB data on the same cable, https://en.wikipedia.org/wiki/DisplayPort

[2.0] .. using only two lanes on the USB-C connector via DP Alt Mode to allow for simultaneous SuperSpeed USB data and video

[2.1] .. tightened its alignment with the USB Type-C specification as well as the USB4 PHY specification to facilitate a common PHY servicing both DisplayPort and USB4. In addition, DisplayPort 2.1 has added a new DisplayPort bandwidth management feature to enable DisplayPort tunnelling to coexist with other I/O data traffic more efficiently over the USB4 link.


I thought the comment was talking about both sides of the USB cable exposing devices to the other, when they said:

> Is it theoretically possible to have 2-way HID


Haven't USB hubs done this since USB 1.1?


I believe that the author is talking about plugging in a USB-C cable between your laptop and some headless system, and having your laptop send HID data, while also capturing a display output from the headless system


Isn't that exactly what a USB-C docking station does? It receives display and audio data, and acts as a USB device (keyboard, mouse, webcam). You'd need hardware that can receive DisplayPort, but it's doable.


Looks like an Alt Mode host with DP sink capability is technically allowed...? But it also looks like USB host controllers with Alt Mode support exposes internal DP source driver inputs, rather than handing you bunch of bare copper wires in Alt Mode, so I doubt it realistically has an implementation.

ref: https://vesa.org/wp-content/uploads/2019/10/USB-DevDays-2019...


Afaik this is 100% allowed by the spec. Flash drives are bidirectional (in and out). Hubs present multiple devices to the host through one cable.

IDK why it isn't done more often in one device though.


But neither USB nor DP(or DVI, VGA...) are symmetrical interfaces. They don't work like RS232C or Ethernet ports, a product that use these standards must be designed from beginning as a host or as a peripheral(or as a special 2-in-1 gadget that can exclusively switch roles). I think that's what GP meant by dual directional.


Looks like Belkin has a USB-C cable for VR headsets, which breaks out to DisplayPort (video) and USB-A (data) connectors, https://www.belkin.com/support-article/?articleNum=316883




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: