C&C USB2 Controller

The supported controller for C&C PCB is the USB2Controller

The USB2Controller is a simple 2 channel signal driver.

The HID based interface does not require any drivers to install, and no simulated COM-ports.

It is easy to detect connected devices and address them, making usage simple and straightforward.

SOFTWARE DOWNLOADS

Typically software for these devices is Windows only and supplied by the seller.

An alternative to the seller supplied software is the V-USB Driverless controller software.

(V-USB Software is available for both Linux & Windows or you may compile yourself if required)

Note:

V-USB is the open source software (Recommended).

usb2relay is the close source seller supplied software.

SOFTWARE/USB2CONTROLLER TESTING

We will be using the V-USB binaries package for this example because it covers both Linux & Windows.

Preparation

  1. Please download and unpack the V-USB Binaries package.
  2. Navigate to the bin directory relevant to your operating system.
  3. Linux users please read the information regarding permissions at the end of this text.

Report Status

  1. Ensure your USB2Controller is plugged into the USB port.
  2. Open a Terminal at the bin directory relevant to your operating system.
  3. Execute the hidusb-relay-cmd program with the state inquiry option.
hidusb-relay-cmd state

The program should report back the state of the device.

Board ID=[BITFT] State: R1=OFF R2=OFF

Test the USB2Controller

  1. Test the controller using the on & off commands for 1, 2 or all outputs.
hidusb-relay-cmd on all
hidusb-relay-cmd off 1
hidusb-relay-cmd off 2
etc.

The controller LED's for each channel should activate when switched to the on state.

SOFTWARE INSTALLATION

The "hidusb-relay-cmd" does not require installation.

Just copy the program to a convenient location.

For Example: Your system path or location of your emulator.

SOFTWARE INTERGRATION

Typically you would use a wrapper to run hidusb-relay-cmd before and after your main emulator.

Your menu program would call the wrapper the same way it would call your main emulator.

Here are some very basic wrapper examples for both Linux & Windows.

(Replace emulator with relevant program name)

Windows

emulator_wrapper.bat

@ECHO OFF
::
:: emulator wrapper
hidusb-relay-cmd on all
emulator %*
hidusb-relay-cmd off all

Linux

emulator_wrapper.sh

#!/bin/bash
#
# emulator wrapper
hidusb-relay-cmd on all
emulator "$@"
hidusb-relay-cmd off all

Linux Permissions

Linux Executable Files

Often when programs are packaged in archives they loose their executable permission.

Please ensure the "hidusb-relay-cmd" file permissions are set to executable.

chmod +x hidusb-relay-cmd

Linux User Hardware Permissions

Linux protects hardware by default and permission must 1st be granted before users can gain access.

Located in the "Linux udev rules" folder is the "21-usb2controller.rules" file.

To grant user hardware access, Please copy this file to the etc udev rules folder.

As root/administrator

cp 21-usb2controller.rules /etc/udev/rules.d/

Once you have copied the rules file, Re-plug your USB2Controller for the new permissions to be applied.