GIMX stands for Game Input MultipleXer or Game Input MatriX. The purpose of this free software is to control a video game console with a computer (e.g. a PC or a Raspberry Pi). It works with the PS3, the Xbox 360, the PS4 and the Xbox One.
It operates:
¤ over bluetooth: works with GNU/Linux (PS3, PS4) only. A compatible bluetooth dongle is required.
¤ over usb: works with GNU/Linux and Windows (PS3, PS4, 360, XOne). A USB adapter is required.
The application gets data from the peripherals (mice, keyboards and joysticks) and sends controls to the game console over bluetooth or usb. Other controls such as gesture or voice are possible through the use of external software that emulate peripherals.

GIMX donation campaign.

Posted on by Matlo | Leave a comment

GIMX 5.4

This release adds force feedback support for the G27 wheel emulation (#307), fixes pedal issues when using the i386 version (#358), and fixes mouse to axis translation defects when using a GPP/Cronus/Titan device (#360).

More info on the forum: link.

Posted in Gaming wheel, PS3, PS4 | Tagged | Leave a comment

GIMX 5.3

This release improves force feedback management in case of transmission errors (#357). It includes USBDK 1.0.7 which fixes issues with some USB host controllers (#345) and makes GIMX i386 able to run on 64bit Windows (#343).

More info on the forum: link.

Posted in Gaming wheel, PS4 | Tagged | Leave a comment

GIMX 5.2

More info on the forum: link.

Posted in Gaming wheel, PS4 | Tagged participate | Leave a comment

Logitech wheels support improvements

In a previous post I explained that I built a cross-platform (GNU/Linux and Windows) HID communication layer with asynchronous read and write capabilities. On GNU/Linux, it uses the libusb, which sadly can’t be used at the same time as the HID input driver. Fortunately, the UHID driver allows to pipe the HID input reports from libusb (userspace) to the HID input driver (kernelspace). One issue that arises when using UHID is that the generic HID input driver applies deadzones to all axes, which is a questionable choice… Anyway, this complicates the setup as this requires to calibrate the wheel. I realized that modifying all the Joystick and Gamepad usages to the Multiaxis Controller usage in the HID report descriptor makes the kernel not to apply undesired deadzones. This removes the need for a calibration step!

When using Logitech wheels in both GNU/Linux and Windows, the pedals axes are translated by the operating system from an absolute range (e.g. [0..255] with 255 the rest value) to a relative range ([-32767..32767] with 32767 the rest value). The existing GIMX axis translation parameters (dead zone, sensitivity, acceleration) do not allow to translate the pedal axes back to an absolute range. To fix this, I added joystick correction parameters to the configuration files, that can be configured in a new “Joystick corrections” panel of the existing “Overall” panel (in gimx-config). The default configuration files for the Momo Racing, the DFGT and the G27 contain these new parameters. These files can be downloaded using the “Help>Download Configs” menu item (in gimx-launcher).

When connecting a Logitech wheel to the Raspberry Pi running Raspbian Jessie, the wheel remains in compatibility mode (making the wheel behave as a Driving Force wheel for example). This makes the default configurations unusable. One work-around to this is to use LTWheelConf to enable the native mode, but it’s not convenient as it has to be done again after each reboot. I decided to automatically enable the native mode in GIMX. When starting GIMX, all Logitech wheel connected to the system are switched to their native modes.

Expect these improvements in GIMX 5.2!

Posted in Gaming wheel, PS4 | Tagged | 2 Comments

Force feedback wheel support in action

Thanks to Edu for making these videos!

Posted in Gaming wheel, PS4 | Tagged | 4 Comments

GIMX 5.1

More info on the forum: link.

Posted in Gaming wheel, PS4 | Tagged | Leave a comment

GIMX 5.0

This release has the following new features:

  • force feedback support for Logitech wheels on the PS4
  • touchpad support for the DIY USB adapter on the PS4
  • rumble support and performance improvements for the GPP/Cronus/Titan devices

More info at: link.

Posted in Gaming wheel, PS4 | Tagged | 7 Comments

Force feedback wheel support – status 5

I built a test package that was tested by Edu with his Driving Force GT wheel. We discovered a few issues that I was able to fix.
Since the DFGT wheel supports adjusting the wheel range, I decided to add support for the wheel range change command (which is an extended command in the Logitech protocol). I also added support for the set rpm leds command.

Posted in Gaming wheel, PS3, PS4 | Tagged research | 2 Comments

Force feedback wheel support – status 4

I made the FFB support generic in GNU/Linux. The following wheels should be supported:

  • G27
  • Driving Force GT
  • G25
  • Momo Racing Force Feedback (tested)
  • Momo Force
  • Driving Force Pro
  • Logitech Speed Force Wireless
  • Formula Force GP (tested, the only working effect is vibration)

My current task is to make the code generic on Windows.

Posted in Gaming wheel, PS3, PS4 | Tagged | 1 Comment

Joystick calibration in GNU/Linux

Note: joystick correction parameters can now be set in the GIMX configurations, so there’s no need anymore to do any calibration at the operating system level.

The reference tool to tweak joysticks from userland in GNU/Linux is jscal. It is a command line tool that can be used to calibrate or remap joystick controls. Its calibration mode (jscal -c /dev/input/jsX) sadly does not work for calibrating the pedals from my Logitech Momo Racing wheel. Surprisingly, the manual is very vague about how the correction works:

 -s, --set-correction <nb_axes,type,precision,coefficients,...>
Sets correction to specified values. For each axis, specify the
correction type (0 for none, 1 for "broken line"), the precision,
and if necessary the correction coefficients ("broken line" 
corrections take four coefficients).
-p, --print-correction
Prints the current correction settings. The format of the output
is a jscal command line.

What’s a “broken-line” correction? What are the coefficients used for? I only found the answer in the kernel source code:
static int joydev_correct(int value, struct js_corr *corr)
  switch (corr->type) {
  case JS_CORR_NONE:

    value = value > corr->coef[0] ? (value < corr->coef[1] ? 0 : 
            ((corr->coef[3] * (value - corr->coef[1])) >> 14)) : 
            ((corr->coef[2] * (value - corr->coef[0])) >> 14);

    return 0;

  return value < -32767 ? -32767 : (value > 32767 ? 32767 : value);

The value calculation can be expanded like this:
if (value > corr->coef[0])
  if (value < corr->coef[1])
    value = 0;
    value = corr->coef[3] * (value - corr->coef[1])) >> 14;
  value = corr->coef[2] * (value - corr->coef[0])) >> 14;

This leads to the following deductions:

  • coef[0] and coef[1] are two axis values
  • coef[2] and coef[3] are the correction factors that apply respectively below and above these axis values
  • coef[0] < coef[1] means there is a dead zone between these two axis values
  • coef[1] = coef[0] means there is no dead zone
  • coef[0] > coef[1] means coef[1] is ignored: it behaves as if coef[1] = coef[0]
  • the resulting value is divided by 16384

Let’s see what are the default correction settings for a Logitech Momo Racing wheel:

matlo@matlo-desktop ~ $ jscal -p /dev/input/js1
jscal -s 3,1,0,511,511,1050628,1050628,1,0,127,127,4227330,4227330,1,0,127,127,4227330,4227330 /dev/input/js1

Both gas and brake pedals have the same correction: 1,0,127,127,4227330,4227330
This maps a value from the [0,255] range to the [-32767,32767] range. The rest value 255 is mapped to 32767 when I expect it to be mapped to 0, and the “fully pressed” value 0 is mapped to -32767 when I expect it to be mapped to 32767…
To fix this, it’s possible to set coef[0] to 255 (which means coef[1] and coef[3] are not used and can be set to 0), and to set coef[2] to 32767 x 16384 / -255 = -2105312. The resulting jscal command is:
matlo@matlo-desktop ~ $ jscal -s 3,1,0,511,511,1050628,1050628,1,0,255,0,-2105312,0,1,0,255,0,-2105312,0 /dev/input/js1

Finally, it’s possible to save the calibration values:
matlo@matlo-desktop ~ $ sudo jscal-store /dev/input/js1
matlo@matlo-desktop ~ $ cat /var/lib/joystick/joystick.state 
NAME="Logitech  Logitech MOMO Racing "
jscal -u 3,0,1,2,10,288,289,290,291,292,293,294,295,296,297
jscal -s 3,1,0,511,511,1050628,1050628,1,0,255,0,-2105312,0,1,0,255,0,-2105312,0

Posted in Joystick | Tagged | 3 Comments