Skip to content
Get 5% off your entire order with a minimum purchase of $30 – automatically applied at checkout ! Black Friday Exclusive Deals Await!
X680 Input Switching and ATX Control | Geekworm

X680 Input Switching and ATX Control


  • 1) Can the input be switched thru a GPIO command (and not just ctrl-ctrl-x)?

    2) Does the ATX control follow the selected input? 

    3) Can the ATX control be selected via GPIO?

    4) Is the cable between the X680 and the X630-A5 just a normal network patch cable?
    Edit: I just tried, and yes, a standard network cable works



  • 1) Can the input be switched thru a GPIO command (and not just ctrl-ctrl-x)?

    == No.

    2) Does the ATX control follow the selected input? 

    ==Yes.

    3) Can the ATX control be selected via GPIO?

    ==No

    4) Is the cable between the X680 and the X630-A5 just a normal network patch cable?
    Edit: I just tried, and yes, a standard network cable works

    ==Yes,  Must be 568B line sequence NOT 568A.


  • ATX cable is an ordinary network cable, but the line sequence must be 568B


  • Great, thank you for sharing, join wordle hint to get the most accurate answer. 

     

     


    1. Yes, the input can be switched through a GPIO command. In Raspberry Pi, you can use the GPIO utility to manipulate the pins and switch the input/output mode. For example, in PSUControl switching system commands, the 'gpio -g mode 23 out' command is used to switch on the system, and 'gpio -g mode 23 in' is used to switch off the system.

    2. The ATX control does not inherently follow the selected input. ATX control is typically used for power management, and its function is independent of the GPIO pin states. However, it's possible to set up a system where the ATX control is influenced by the GPIO pin states, but this would require additional programming and hardware setup.


  • @Harry Huang 

    1) Can the input be switched thru a GPIO command (and not just ctrl-ctrl-x)?

    The PC input can be switched via the GPIO webterm menu feature of PiKVM:

    add the following to /etc/kvmd/override.yaml

    kvmd:
        gpio:
            drivers: 
                switch_input_1:
                    type: cmd
                    cmd: [/usr/bin/bash, /etc/kvmd/scripts/switch_input.sh, 1]
                switch_input_2:
                    type: cmd
                    cmd: [/usr/bin/bash, /etc/kvmd/scripts/switch_input.sh, 2]
                switch_input_3:
                    type: cmd
                    cmd: [/usr/bin/bash, /etc/kvmd/scripts/switch_input.sh, 3]
                switch_input_4:
                    type: cmd
                    cmd: [/usr/bin/bash, /etc/kvmd/scripts/switch_input.sh, 4]
            scheme:
                switch_input_1_button:
                    driver: switch_input_1
                    mode: output
                    switch: false
                switch_input_2_button:
                    driver: switch_input_2
                    mode: output
                    switch: false
                switch_input_3_button:
                    driver: switch_input_3
                    mode: output
                    switch: false
                switch_input_4_button:
                    driver: switch_input_4
                    mode: output
                    switch: false
            view:
                header:
                    title: PC Input
                table:
                    - ["#PC Input"]
                    - ["switch_input_1_button|input 1"]
                    - ["switch_input_2_button|input 2"]
                    - ["switch_input_3_button|input 3"]
                    - ["switch_input_4_button|input 4"]

    and create /etc/kvmd/scripts/switch_input.sh

    #!/bin/bash

    # Check for a valid argument (1, 2, 3, or 4)
    if [ "$#" -ne 1 ] || ! [[ "$1" =~ ^[1-4]$ ]]; then
        echo "Usage: $0 [1, 2, 3, or 4]"
        exit 1
    fi

    # Define the USB keyboard codes for 1, 2, 3, and 4
    usb_codes=("1e" "1f" "20" "21")

    # Send two Ctrl key presses
    echo -ne "\x1\0\0\0\0\0\0\0" > /dev/kvmd-hid-keyboard
    echo -ne "\0\0\0\0\0\0\0\0" > /dev/kvmd-hid-keyboard
    echo -ne "\x1\0\0\0\0\0\0\0" > /dev/kvmd-hid-keyboard
    echo -ne "\0\0\0\0\0\0\0\0" > /dev/kvmd-hid-keyboard


    # Send the USB keyboard code corresponding to the argument value
    usb_code="${usb_codes[$1 - 1]}"
    echo -ne "\0\0\x$usb_code\0\0\0\0\0" > /dev/kvmd-hid-keyboard
    echo -ne "\0\0\0\0\0\0\0\0" > /dev/kvmd-hid-keyboard


  • @Mark Berndt This is great.  Any chance you think there's a way to also make the PC Input dropdown show LEDs that indicate which input is selected?  Looks like your sciprts only pass CTRL-CTRL-# and don't use a full driver like the ezcoo one.


Please login to reply this topic!