Adding buttons to flood/drain

Home Forums AR Sandbox Forum Adding buttons to flood/drain


Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #103576

    Our sandbox has been solid and now we would like to add the button box to flood/drain the terrain. We purchased the recommended Delcom 706502-F w/ the 2 buttons. The problem is I do not understand the instructions as they are written. Could someone please provide instructions to further help me with this? Below is what I copied from another thread:


    There are many brands/makes of USB buttons, but they vary widely in their capabilities, and it’s usually not specified what exactly they do. That’s dangerous.
    In our AR Sandbox, we use a two-button switch, Delcom 706502-F, where the red button drains and the blue button deposits water.
    Delcom also has one-button switches, such as this one, but they are rather pricey. On the upside, they are robust and known to work.
    Delcom’s switches are programmable via a Windows-based utility available from their web site. They can be programmed as mouse buttons, keyboard keys, or joystick buttons. The ideal configuration for the AR Sandbox is one or two joystick buttons. Most cheap USB buttons only emulate keyboard keys, and usually in a dumb way that makes them unusable for the AR Sandbox.
    To use a USB switch that’s configured as joystick button(s), one has to create a patch configuration file that makes it available as an additional input device, and then bind a water management tool to the new device’s button(s) using Vrui’s standard tool binding interface. Alternatively, one can bind a water management tool automatically via the same patch configuration file. Here’s the file I use to bind our two-button box to the add water / remove water functions:
    section Vrui
    section Desktop
    inputDeviceAdapterNames (MouseAdapter, HIDAdapter)

    section HIDAdapter
    inputDeviceAdapterType HID
    inputDeviceNames (ButtonBox)

    section ButtonBox
    name ButtonBox
    deviceVendorProductId 0fc5:b080

    section Tools
    section DefaultTools
    section WaterTool
    toolClass GlobalWaterTool
    bindings ((ButtonBox, Button167, Button166))
    The deviceVendorProductId setting would need to be adapted to the actual switch’s ID, and the actual button names (Button166 and Button167 in our case) might have to be changed.
    The name of this patch configuration file, say SandboxButtons.cfg, is then added to SARndbox’s command line as such:
    $ SARndbox [usual options] -mergeConfig SandboxButtons.cfg


    bumping, hoping someone can help


    There is a problem with Delcom buttons and Linux kernel v4.8 to v4.17. You can read Delcom’s article on the issue.

    One of the options for solving the issue is to change the Product ID of the button. That is the option I chose. The following are the steps I went through to get my buttons working:

    Program the buttons

    1. Program the buttons using the Delcom Setup Utility. Unfortunately, Delcom only offers a Windows version of this utility as of the date of this posting. So connect your Delcom buttons to a Windows machine and run the utility
    2. Program the buttons as
      CODE: JS Button 1 (or 2, or 3, etc for each additional button on your device)
    3. Click the “Program Device” button
    4. Now that your device is programmed, you can connect it back to your Linux computer

    Change the Product ID (PID) of your Delcom buttons

    1. Download the Delcom command line utility for changing the PID.
    2. Run the following command at the location where you downloaded the delcomSetPID utility:
      sudo ./delcomSetPID 0xA080
      The original PID is 0xB080 if you ever want to set it back. For example, if you ever want to use the Delcom Setup Utility, the PID must be set back to 0xB080
    3. If everything worked for you then skip down to the Configure AR Sandbox section. Unfortunately, I ran into an error when I tried to use the delcomSetPID binary provided by Delcom. If you run into the same issue, you will need to compile it yourself.

    Compile delcomSetPID

    1. Create a ~/src/Delcom directory
    2. Download the delcomSetPID.c file I received from Delcom technical support to ~/src/Delcom. You can see this code is very similar to an example provided by Delcom on their website.
    3. Run the following commands in a terminal:
      sudo apt-get update
      sudo apt-get install libhidapi-libusb0 libhidapi-dev libudev-dev libusb-1.0-0-dev libfox-1.6-dev git autotools-dev autoconf automake libtool
      cd ~/src
      git clone git://
      cd hidapi/
      sudo make install
      cd ../Delcom
      gcc -g -O0 -o delcomSetPID delcomSetPID.c -lhidapi-libusb
    4. Run the following command:
      sudo ./delcomSetPID 0xA080
      The original PID is 0xB080 if you ever want to set it back. For example, if you ever want to use the Delcom Setup Utility, the PID must be set back to 0xB080

    Configure AR Sandbox

    1. To get the AR Sandbox configuration to work with the new PID, you will have to change the deviceVendorProductId to the following:
      deviceVendorProductId 0fc5:a080
    2. Button166 (red button) and Button167 (blue button) worked as names for my two button device
    3. The other issue I ran into was needing to run the AR Sandbox using sudo in order for the application to have access to the button. Delcom techincal support recommended the following article: Granting non root USB device access (Linux)

    -Takanudo (hopes this helps)


    Thank you so much Takanudo.

    The older kernels broke too many things and the Delcom supplied setPID utility didn’t work for me either. I followed your instructions to compile a new one and it works great!


Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Comments are closed.