Tutorials
Home > Learn > YKUR Setup Guide
YKUR SETUP GUIDE
To get started with the YKUR board follow these main three steps:
1
Command utility setup
2
Connecting YKUR board
3
Sending commands to YKUR board
Command utility setup

For Windows systems a pre-built executable package is available for download. If you choose to use the pre-built executable on Windows, proceed to Connecting YKUR board section. For Linux or if you choose to build from source on Windows, follow the steps bellow.

Download the control utility source code from ykur product page. With it you can control YKUR board from the command line of Linux and Windows systems. The latest development version is made available in ykurcmd GitHub repository which may have new functionality not yet released in the product page.

After downloading the source code package extract to a folder of your choosing. In our example we extract it to C:\mysources folder.

In C:\ykurcmd\inc folder we provide a version of the hidapi shared libraries. Nonetheless we recommend the download and build of the hidapi in your system to ensure it's updated. The hidapi library can be obtained here.

Windows YKUR utility setup

If you downloaded and built the hidapi library on your system, overwrite the library files which are in the ykur project. Overwrite the following files in C:\ykurcmd\inc:

Open ykurcmd.sln solution file with Microsoft Visual Studio to build the ykurcmd application. A free version of Visual Studio (Community) is available from Microsoft.

Build the solution with Visual Studio.

Note: If errors occur during the build process it may be the case that the hidapi library should be built for your system. To do so the sources and build instructions can be found here.

Now you can move the executable to a folder of your choice. The executable requires the hidapi.dll in run time so it must installed in the system or in the same folder than the ykurcmd.exe executable file.

Test the executable opening the command line console, navigating to the folder containing the ykurcmd.exe executable file and running the following command: ykurcmd.exe -h

Linux YKUR utility setup

Prerequisites

To build the application, and run it, libusb-1.0 and libusb-1.0-dev libraries 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 the ykurcmd

Download the source code package from YKUR product page or from Yepkit/ykurcmd 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
Connecting YKUR board

Connect the YKUR board to an USB port of the computer. YKUR board will appear as a HID USB device.

YKUR can be USB bus powered or externally powered by a 5V power supply. When no external power supply is connected, YKUR function is bus powered mode. The advantage of using external power supply is that YKUR board will maintain the switching status despite being connected to a host computer board or not.

Sending commands to YKUR board

Navigate to the ykurcmd/bin folder and run ykur -h to print all the available command options and syntax.

Switching the on-board relay

To switch ON the on-board relay execute the command:

Windows:
> ykurcmd.exe -u r
Linux:
$ ykurcmd -u r

To switch OFF the on-board relay execute the command:

Windows:
> ykurcmd.exe -d r
Linux:
$ ykurcmd -d r

Switching the external relay driver ports

To switch ON an external relay connected to a YKUR driver port, execute the command:

Windows:
> ykurcmd.exe -u port_number
Linux:
$ ykurcmd -u port_number

Where port_number is 1, 2, 3 or 4 as identified in the YKUR board silk screen. As an example, if we want to switch ON an external port 1 the command is the following:

Windows:
> ykurcmd.exe -u 1
Linux:
$ ykurcmd -u 1

To switch OFF an external relay connected to a YKUR driver port execute the command:

Windows:
> ykurcmd.exe -d port_number
Linux:
$ ykurcmd -d port_number

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

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

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

Windows:
> ykurcmd.exe -l
Linux:
$ ykurcmd -l

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

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

To switch ON the on-board relay of board 1 we execute the command:

Windows:
> ykurcmd.exe -s YK00005 -u r
Linux:
$ ykurcmd -s YK00005 -u r

For more information and resources for the YKUR 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