The ykush command application is made available as an open source software. It can be downloaded from YKUSH product page. Also an up-to-date version with the latest developments is available in the Yepkit/ykush GitHub repository.
To build the application, and run it, libusb and libusb-dev library must be installed in you system. For example, in Debian based systems do the following in a terminal.
This installed the development files. Now install the binary library.
Download the source code package from YKUSH product page or from Yepkit/ykush GitHub repository. Extract the content of the source code archive to a folder of your choosing.
In the root of the source code structure you will find the following two scripts:
As the name indicates one builds the application and the other installs it.
To build the application run:
Please note that this script downloads and builds the hidapi library, so an Internet connection is required. For more detail on the hidapi library please follow this link.
There may be some dependencies that were not satisfied and cause the build process to fail. If that was the case, install the missing dependencies and re-run the build.sh script.
Finally install the hidapi shared libraries and the ykushcmd command by running the following script.
To connect the board, start by powering it up by supplying 5V to one of it's input terminals. You can use the Micro USB terminal (5V PWR) or the alternative connector respecting the polarity as indicated in the bellow picture.
The next step is to connect the Upstream port (the Mini USB terminal) to the host system.
At this point the
YKUSH board
is ready to use.
Use the following commands to control the On/Off of the devices connected to the YKUSH board downstream ports.
Power down a device connected to YKUSH board downstream port 1:
Power up a device connected to YKUSH board downstream port 1:
Power down a device connected to YKUSH board downstream port 2:
Power up a device connected to YKUSH board downstream port 2:
Power down a device connected to YKUSH board downstream port 3:
Power up a device connected to YKUSH board downstream port 3:
When more than one YKUSH board is connected to the host, the action option in the command should be preceded by -s serial_number option. The serial_number is the serial number of the YKUSH board where the action is to be executed.
To find out the serial number of a YKUSH board, connect it to the host and execute the command:
This command will output the serial number of the connected YKUSH board. Note that if more than one board is connected when this command is executed the serial number of all connected YKUSH boards will be listed.
As an example, assuming that two YKUSH boards are connected with the following serial numbers:
To switch ON the downstream port 3 of YKUSH board 1 we execute the command:
To get the current switching status (UP/DOWN) of a downstream port use a command with the following format.
For example, if you want to get the status of downstream port 1 the command is the following.
Again, if more than one YKUSH board is connected to the host "-g" option should be preceded by the "-s serial_number" option to address the command to the board with the specified serial number.
For additional support, you can reach us through the form in our support page.
For more information and resources for the YKUSH board please visit the product page.