Tutorials
Home > Learn > YKUSH XS Linux Setup Guide
YKUSH XS LINUX SETUP GUIDE
To get started with the YKUSH XS board follow these steps:
1
Build and install the command application
2
Connect the board
3
Use it
BUILD AND INSTALL THE COMMAND APPLICATION

YKUSH XS uses the same control application as other YKUSH boards, the ykushcmd. This application is made available as an open source software. It can be downloaded from YKUSH XS product page. Also an up-to-date version with the latest developments is available in the Yepkit/ykush GitHub repository.

Prerequisites

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.

$ sudo apt-get install libusb-1.0-0-dev

This installed the development files. Now install the binary library.

$ sudo apt-get install libusb-1.0-0

Building and installing

Download the source code package from YKUSH XS 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:

$ sudo ./build.sh

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.

$ sudo ./install.sh
CONNECT THE BOARD

To connect the board just plug the upstream port (the Mini USB terminal) to a host system USB port (eg, the USB port of a PC).

At this point the YKUSH XS board is ready to use.

USE IT

Use the following commands to control the On/Off of the device connected to the YKUSH XS board downstream port.

Disconnect the downstream port:

$ ykushcmd ykushxs -d

Connect the downstream port:

$ ykushcmd ykushxs -u

Get the status of the downstream port:

$ ykushcmd ykushxs -g

Controlling a specific board when multiple YKUSH XS boards are connected to the same host

When more than one YKUSH XS 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 XS board where the action is to be executed.

To find out the serial number of a YKUSH XS board, connect it to the host and execute the command:

$ ykushcmd ykushxs -l

This command will output the serial number of the connected YKUSH XS boards. Note that if more than one board is connected when this command is executed the serial number of all connected YKUSH XS boards will be listed.

As an example, assuming that two YKUSH XS boards are connected with the following serial numbers:

To switch ON the downstream port of board 1 we execute the command:

$ ykushcmd ykushxs -s YK00005 -d


For additional support, you can reach us through the form in our support page.

For more information and resources for the YKUSH XS board please visit the product page.

This site uses cookies to enhance your experience. By continuing to browse the site you accept their use. To find out more read our cookies policy.
Not logged @YEPKIT
Need an account? Register here!
Forgot Password? Recover here!
€ Euro
$ US Dollar
£ British Pound
$ Australian Dollar
$ Canadian Dollar