Skip to content

USB Serial

USB Serial

The USB serial feature allows the target host to access One-KVM via a virtual serial port, or to be used in other serial-communication scenarios.

USB endpoint limits

Each emulated USB function consumes limited hardware resources (endpoints).

Configuration

  1. Edit /etc/kvmd/override.yaml to enable the serial function:

    1
    2
    3
    4
    otg:
        devices:
            serial:
                enabled: true
    
  2. Add the serial TTY to securetty:

    sudo echo ttyGS0 >> /etc/securetty
    
  3. Configure the serial getty service:

    1
    2
    3
    4
    5
    # Create the override directory
    sudo mkdir -p /etc/systemd/system/getty@ttyGS0.service.d
    
    # Edit the override file
    sudo nano /etc/systemd/system/getty@ttyGS0.service.d/override.conf
    

    Add:

    1
    2
    3
    4
    [Service]
    TTYReset=no
    TTYVHangup=no
    TTYVTDisallocate=no
    
  4. Enable the service and reboot:

    sudo systemctl enable getty@ttyGS0.service
    sudo reboot
    

Usage

After reboot, the target host can access One-KVM via the virtual serial port. Possible device names include:

  • /dev/ttyAMA0
  • /dev/ttyACM0

Example:

sudo screen /dev/ttyACM0 115200

Serial Console Example