mirror of
https://github.com/jetkvm/kvm.git
synced 2026-03-02 22:58:00 -05:00
Emulate serial port via USB #383
Labels
No labels
component/keyboard-layout
component: cloud
component: device screen
component: extensions
component: hid/keyboard
component: hid/mouse
component: network
component: timesync
component: ui
component: updater
component: usb
component: usb/hid
component: usb/storage
component: video
component: webrtc
component: webserver
need-more-details
status: working-in-progress
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/kvm#383
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @splack on GitHub (Aug 8, 2025).
A note for the community
Is it possible with the existing hardware to use the USB connection to add a serial port emulation (similar to kb/mouse) so the additional serial hardware is not required?
I wanted to get a quick idea if it's at all possible.
Disclaimer
Subsystem
None
Feature description
Plug in the JetKVM and it appears to the host as a USB serial port at the same time as the KB/mouse emulation.
@DatDucati commented on GitHub (Sep 4, 2025):
Okay, so I fiddled around a bit with the code, and I managed to configure the serial gadget. I am able to send messages back and forth between the JetKVM and the host, or with a screen binary get a shell over the serial port. I can open a pull request for those (very few!) lines of code, but I've got no idea how to proceed from here.
Things that would have to be done:
@splack commented on GitHub (Sep 5, 2025):
@DatDucati That's great! I'd be happy to just ssh in and run picocom. That was the bit I was unsure of. Do you have a fork or branch I can grab the code from?
@DatDucati commented on GitHub (Sep 5, 2025):
Then the shell solution might be a better fit for you (for now). I'd still like if the feature would be native to the webui, so one could just enable it.
If no output got produced, it will create /dev/ttyGS0. Now all that remains is to compile your favorite serial client for the jetkvm.
Please don't close this (partial solved) issue yet.
My changes are @ https://github.com/DatDucati/kvm/tree/add-serial-gadget-mode
@splack commented on GitHub (Sep 6, 2025):
Thanks @DatDucati! I'd love to see this through.
The bigger use case for me is so I can have better automation of system activities like typing in BIOS passwords from scripts or unlocking LUKS devices or detecting why a boot fails without resorting to OCR. I've not tested this yet as I'm doing a migration this weekend but I'll get to it early next week and will keep this issue open for tracking progress.
I tried to get some kb automation going but the WebRTC was a real pain to automate without a full browser, which I didn't want in my environment as a browser is a very large dependency for system level things. I was able to take screen captures from the video cap device directly via root ssh and OCR, but I had to disconnect from the web ui first. It did make me think that a terminal server approach (like the old rs232 ones) might be a better interface for text as is should be much easier to drop in some existing OSS tool and integrate it into traditional management systems that talk to network kit etc.
@rloomans commented on GitHub (Sep 15, 2025):
I'm using my JetKVM for a TrueNAS box, which natively has a text-based console once it's booted up, so if the JetKVM emulated a serial terminal over USB it would be much more convenient than the video, as I'd be able to cut and paste :)