[Home]Using A XHC-HB04 Wireless MPG Pendant

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org

XHC-HB04 wireless MPG pendant LinuxCNC HAL module

upload:XHC-HB04.jpg

The xhc-hb04 driver and a sample config are included in LinuxCNC versions starting with 2.6.0. There is no need to download and compile the driver yourself unless you want to use the XHC-HB04 with an older version of LinuxCNC.


For LinuxCNC versions before 2.6.0, download the package from here:

This HAL module is designed for the XHC-HB04 V3.0 identified as USB device 10CE:EB70. Most of the pendant features are handled:

Models/Versions? of XHC-HB04

(It seems there are at least 4 different models out there which all are marked with "XHC" on the wheel and "HB04" on the dial. The Model-Names below are from descriptions/instuction manuals)
ModelVersionDescriptionKey LayoutUSB deviceWorks?/Comment?
HB04see photo above; V3.0; 16 keys + handwheel40 meters wireless distance with electronic handwheel110CE:EB70the one this driver/manual was originally written for
WHB04-S18 keys + 7 keys instead of the handwheel40 meters wireless distance without electronic handwheelunknownunknown
WHB04-L18 keys + handwheel40 meters wireless distance with electronic handwheel2unknownLinuxCNC 2.6.7 works fine
LHB0418 keys + handwheelWith 5 m USB cable with electronic handwheel210ce:eb70 Silicon Labsxhc-hb04-V05.tgz/LinuxCNC? 2.5.3 works fine

Compilation instructions

This module requires standard C development packages and libusb-1.0 You may need to install following packages on your system:

Use the following commands

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

Then go to the directory where you have extracted the module files and use the two following commands:

Now, the xhc-hb04 executable HAL module should be available in /usr/local/bin and directly usable by LinuxCN? after udev configuration and integration of xhc-hb04.hal as described below.

Installation

Also copy xhc-hb04.hal and xhc-hb04-layout*.ini files into your config directory.

Configuration

The xhc-HB04.hal file shows a typical configuration to be integrated by the following line in you .ini file: If halui is not activated in some other way (see integrators manual) make shure HALUI = halui is also in the [HAL] section of your .ini file.

 [HAL]
 ....
 HALFILE = xhc-hb04.hal

It assumes MDI commands 06 to 09 are reserved for the following 4 pendant buttons:

 [HALUI]
 MDI_COMMAND=...
 MDI_COMMAND=...
 MDI_COMMAND=...
 MDI_COMMAND=...
 MDI_COMMAND=...
 MDI_COMMAND=...
 MDI_COMMAND=G10 L20 P1 X0
 MDI_COMMAND=G10 L20 P1 Y0
 MDI_COMMAND=G10 L20 P1 Z0
 MDI_COMMAND=G0 X0 Y0 Z0

In xhc-hb04.hal you can change your keyboard layout preference: loadusr -W xhc-hb04 -I xhc-hb04-layout1.ini -H

The layout can be adapted by editing the layout file.

If you want to test the output for your specific keyboard just run /usr/local/bin/xhc-hb04 on the linux command line and watch the hexdump after pressing specific keys.

You must add the file /etc/udev/rules.d/90-xhc.rules with the following content to get access to USB without root privileges

 SYSFS{idProduct}=="eb70", SYSFS{idVendor}=="10ce", MODE="666", OWNER="root", GROUP="users"

Troubleshooting

If LinuxCNC stops and complains about missing halui items:


LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
This page is read-only. Follow the BasicSteps to edit pages. | View other revisions
Last edited April 13, 2015 4:44 am by MilesWoodcraft (diff)
Search:
Published under a Creative Commons License