Skip to content

Instantly share code, notes, and snippets.

@michaelspiss
Last active December 9, 2023 16:54
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelspiss/d2e36ffa687a9b5a6d1901e6b2b48ed2 to your computer and use it in GitHub Desktop.
Save michaelspiss/d2e36ffa687a9b5a6d1901e6b2b48ed2 to your computer and use it in GitHub Desktop.
Connect (multiple) EasySMX controller(s) on linux

This simple setup enables a plug-and-play experience for EasySMX controllers on linux. It is based on Florian Gast's solution on amazon, but has been modified to enable force feedback and work with multiple controllers.

Install xboxdrv

Place connect-easysmx-controller.sh in a location of your choosing

If your controller does not support force feedback, remove --force-feedback.

Place easysmxcontroller@.service in /etc/systemd/system

Replace <path_to_script> with the actual path to connect-easysmx-controller.sh.

Place easysmx-controller.rules in /etc/udev/rules.d

You may need to edit idVendor and idProduct values if your model differs from mine:

Run lsusb which should return a list of devices. By running it before and after plugging in the receiver, you can figure out which line it corresponds to. Mine looks like this:

Bus 001 Device 053: ID 2f24:0091    GAME FOR WINDOWS 1.02

2f24 would be the vendor, 0091 the product id.

#! /bin/bash
IFS=: read -r busnum devnum <<< "$1"
busnum=$(printf "%03i" $busnum)
devnum=$(printf "%03i" $devnum)
xboxdrv --device-by-path ${busnum}:${devnum} --type xbox360 --silent --force-feedback
ACTION=="bind", ATTRS{idVendor}=="2f24", ATTRS{idProduct}=="0091", TAG+="systemd", ENV{SYSTEMD_WANTS}="easysmxcontroller@%s{busnum}:%s{devnum}"
[Unit]
Description=Connect EasySMX controller with path %i
[Service]
Type=simple
ExecStart=<path_to_script>/connect-easysmx-controller.sh %i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment