None of my Steam Games recognized the DroidMote Linux Server as Input Device, but I have found a solution using xboxdrv. I'm posting it here, in case someone has a similar problem.
This works for me in Ubuntu 16.04.
First, make sure you have the droidmote client and server set up correctly and connected. You can test that f.ex. with something like jstest-gtk.
The droidmote gamepad registers as /dev/input/jsX, jstest-gtk should find it even though Steam won't.
You can confirm the device number looking at /proc/bus/input/devices - it should contain something like:
Code: Select all
I: Bus=0003 Vendor=08fe Product=0929 Version=0004
N: Name="droidmote"
P: Phys=
S: Sysfs=/devices/virtual/input/input38
U: Uniq=
H: Handlers=sysrq rfkill kbd mouse1 event17 js1
B: PROP=0
B: EV=f
B: KEY=7fff000100070000 ffffffffffffffff ffffffffffffffff ffffffffffffffff fffffffffffffffe
B: REL=103
B: ABS=3003f
I: Bus=0003 Vendor=08fe Product=092a Version=0004
N: Name="droidmotemt"
P: Phys=
S: Sysfs=/devices/virtual/input/input39
U: Uniq=
H: Handlers=mouse2 event18
B: PROP=1
B: EV=b
B: KEY=400 0 0 0 0 0
B: ABS=260800000000003
I: Bus=0003 Vendor=08fe Product=092b Version=0004
N: Name="droidmotegt"
P: Phys=
S: Sysfs=/devices/virtual/input/input40
U: Uniq=
H: Handlers=mouse3 event19
B: PROP=2
B: EV=b
B: KEY=400 0 0 0 0 0
B: ABS=260800000000003
We will use xboxdrv to simulate a game pad that steam games recognize:
Code: Select all
apt-get install xboxdrv
Code: Select all
[xboxdrv]
evdev = /dev/input/event17
# set evdev-debug to true to see the actual Axis' names
# in case you want to create your own mapping.
evdev-debug = false
evdev-grab = false
mimic-xpad = true
detach-kernel-driver = true
[evdev-absmap]
ABS_HAT0X = X1
ABS_HAT0Y = Y1
ABS_X = LT
ABS_Y = X2
ABS_Z = Y2
ABS_RZ = RT
[evdev-keymap]
BTN_START = start
BTN_Z = back
BTN_Y = Y
BTN_X = X
BTN_TR = TR
BTN_TL = TL
BTN_B = B
BTN_A = A
KEY_LEFT = LEFT
KEY_RIGHT = RIGHT
KEY_UP = UP
KEY_DOWN = DOWN
# EOF #
this is a sample mapping and maps the accelerometer data to X1 and X2.
see /usr/share/doc/xboxdrv/examples or 'xboxdrv --help-all' for further info.
start xboxdrv with this config using:
Code: Select all
xboxdrv -c evdev.xboxdrv
and that's all! you can verify that it works using jstest-gtk on the new, virtual gamepad device.
here's a quick'n'dirty shell script to automate the few steps to start it up. the script waits for you to hit 'enter' once your droidmote client is connected to the server - that has to happen before xboxdrv is started. the script assumes both the droidmote executable and the config file evdev.xboxdrv are in the current directory.
Code: Select all
#!/bin/bash
killall xboxdrv
killall droidmote
sleep 2s
droidmote 2302 asdf 2>&1 >/dev/null &
sleep 2s
read
xboxdrv -c evdev.xboxdrv 2>&1 >/dev/null &