Giter Club home page Giter Club logo

xboxdrv's Introduction

Xbox/Xbox360 USB Gamepad Driver for Userspace

Xboxdrv is a Xbox/Xbox360 gamepad driver for Linux that works in userspace. It is an alternative to the xpad kernel driver and has support for Xbox1 gamepads, Xbox360 USB gamepads and Xbox360 wireless gamepads. The Xbox360 guitar and some Xbox1 dancemats might work too. The Xbox 360 racing wheel is not supported, but shouldn't be to hard to add if somebody is interested.

Some basic support for the Xbox360 Chatpad on USB controller is provided, Chatpad on wireless ones is not supported. The headset is not supported, but you can dump raw data from it.

This driver is only of interest if the xpad kernel driver doesn't work for you or if you want more configurabity. If the xpad kernel driver works for you there is no need to try this driver.

Newest version of the driver can be found at:

The development version can be optained via:

Compilation

Required libraries and tools:

  • g++ - GNU C++ Compiler
  • libusb-1.0
  • pkg-config
  • libudev
  • boost
  • scons
  • uinput (userspace input kernel module)
  • git (only to download the development version)
  • X11
  • libdbus
  • glib

Once everything installed, you can compile by typing:

scons

On Ubuntu 10.10 you can install all the required libraries via:

sudo apt-get install \
 g++ \
 libboost1.42-dev \
 scons \
 pkg-config \
 libusb-1.0-0-dev \
 git-core \
 libx11-dev \
 libudev-dev \
 x11proto-core-dev \
 libdbus-glib-1-dev

To load the uinput kernel module automatically on boot add it /etc/modules, to load it manually type:

sudo modprobe uinput

On other distributions exact install instructions might be slightly different.

Installation

Once the compilation process is complete you can install xboxdrv with:

make install

You can also change the install PREFIX and DESTDIR as usual with:

make install PREFIX=/usr DESTDIR=/tmp

Note that there is no need to install xboxdrv, you can run it directly from the source directory if you prefer.

If you want to run xboxdrv in daemon mode on boot, copy data/org.seul.Xboxdrv.conf into /etc/dbus-1/system.d/, otherwise xboxdrv will complain with:

[ERROR] XboxdrvDaemon::run(): fatal exception: failed to get unique dbus name: Connection ":1.135" is not allowed to own the service "org.seul.Xboxdrv" due to security policies in the configuration file

Running

Extensive documentation on running xboxdrv can be found in the RUNNING XBOXDRV section of the xboxdrv manpage. When you haven't installed xboxdrv the man page can be found in doc/xboxdrv.1 and be read with:

man -l doc/xboxdrv.1

Documentation on xboxdrv-daemon, a daemon that will automatically launch xboxdrv when a pad is plugged in can be read via:

man -l doc/xboxdrv-daemon.1

xboxdrv's People

Contributors

analogue avatar barchiesi avatar baztastic avatar evanpurkhiser avatar grumbel avatar hansihe avatar saik0 avatar steveedson avatar tgurr avatar thor27 avatar timo avatar v10lator avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xboxdrv's Issues

Possible issue with ps3 trigger response + shifting

I've been using this setting on my dualshock 3:

rt+y2^dead:2000=REL_WHEEL:-5:100
rt+x2^dead:2000=REL_HWHEEL:5:100

Testing in a browser, most of the time it works fine, and I can hold down the RT to use the right analog as a scroll wheel. However, periodically for some reason, even when holding down the RT, the right analog will not be shifted for a split second. But, if I continue to hold the RT, the analog will then be shifted. When this happens I try very hard to not alter the pressure being applied.

I've been testing this with various amounts of pressure applied to the trigger, because I thought it may be an issue of certain pressure levels not registering. It seems to occur most often when I'm very lightly feathering the trigger.

I know the pressure levels of the dualshock 3's analog triggers were an issue at the very beginning of support for the controller in xboxdrv, but has since been dramatically improved. I was wondering if there is still an issue of xboxdrv receiving accurate readings of the dualshock3's triggers at very low levels, and perhaps that is causing the interruption in shifting. Are the dualshock3's triggers full range of motion supported in xboxdrv?

I don't notice this problem often and and it doesn't seem to happen at all when I apply a normal amount of pressure to the analog stick so it may be something else entirely.

[abrt] xboxdrv-0.8.5-2.fc19: libusb_get_next_timeout: Process /usr/bin/xboxdrv was killed by signal 11 (SIGSEGV)

https://bugzilla.redhat.com/show_bug.cgi?id=1009644

        Bug ID: 1009644
       Summary: [abrt] xboxdrv-0.8.5-2.fc19: libusb_get_next_timeout:
                Process /usr/bin/xboxdrv was killed by signal 11
                (SIGSEGV)
       Product: Fedora
       Version: 19
     Component: xboxdrv
      Assignee: [email protected]
      Reporter: [email protected]
    QA Contact: [email protected]
         Group: private

Version-Release number of selected component:
xboxdrv-0.8.5-2.fc19

Additional info:
reporter: libreport-2.1.7
backtrace_rating: 4
cmdline: xboxdrv --force-feedback --wid 0 --led 2 --deadzone 4000
--mimic-xpad-wireless --detach-kernel-driver --detach -D
crash_function: libusb_get_next_timeout
executable: /usr/bin/xboxdrv
kernel: 3.10.11-200.fc19.x86_64
runlevel: N 5
type: CCpp
uid: 0

Truncated backtrace:
Thread no. 1 (10 frames)
#0 libusb_get_next_timeout at io.c:2335
#1 get_next_timeout at io.c:2061
#2 libusb_handle_events_timeout_completed at io.c:2111
#3 libusb_handle_events at io.c:2198
#4 USBController::~USBController at src/usb_controller.cpp:91
#5 ~Xbox360WirelessController at src/xbox360_wireless_controller.cpp:51
#6 Xbox360WirelessController::~Xbox360WirelessController at
src/xbox360_wireless_controller.cpp:53
#7 release at
/usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:146
#8 ~shared_count at /usr/include/boost/smart_ptr/detail/shared_count.hpp:371
#9 ~shared_ptr at /usr/include/boost/smart_ptr/shared_ptr.hpp:328

Mouse emulation still "jittery" when moving at high speeds

I'm using the latest tarball on the site.

I know you fixed the mouse emulation before when the cursor was very jittery in all directions, so I don't know what else you can do, but I do still notice a jitter, mostly along a diagonal at close to max speed. For day to day use on the desktop it's fine and not that noticeable. It's more apparent when playing a game where the mouse cursor controls the camera (i.e. fps game). My values for the mouse are:

x2^dead:2600^sen:0.12=REL_X:500:-1
y2^dead:2600^sen:0.12=REL_Y:500:-1

Even without adjusting for sensitivity, I still notice choppy movement when moving close to max threshold on the thumbstick. Again, it's not that obvious on the desktop and appears smooth mostly at low speeds. It's at higher speeds and in games where it is most obvious. Just thought I'd mention it, thanks.

edit: actually upon further experimentation I think I have improved the movement by increasing the VALUE number to around 800. The only problem with this is that it increases the speed of the mouse as well.

--mimic-xpad does'n work with --next-controller

If I launch xboxdrv --mimic-xpad it works. But when I try to use several gamepads and launch it as xboxdrv --mimic-xpad --next-controller, it works with xboxdrv mapping, not like xpad driver. I mean the axes's behaviour.
xboxdrv version is 0.8.4

Xboxdrv feature - Better mouse control/emulation (acceleration, etc.)

Xboxdrv's excellent keymapping already takes care of mouse features such as mouse buttons and scrolling; however, the ability to customize the actual movement of the mouse when mapped to a joystick remains somewhat limited and confusing at this time. Right now I have these options set to configure how the mouse handles:

[ui-axismap]
x2^dead:2600^sen:0.18^resp:-32768:-30000:-25000:-17500:-15000:-13000:-10000:-8000:-3000:-1025:0:1025:3000:8000:10000:13000:15000:17500:25000:30000:32767=REL_X:780:-1
y2^dead:2600^sen:0.18^resp:-32768:-30000:-25000:-17500:-15000:-13000:-10000:-8000:-3000:-1025:0:1025:3000:8000:10000:13000:15000:17500:25000:30000:32767=REL_Y:780:-1

(may have to adjust REL_X,Y:VALUE to a higher or lower number to adjust speed)

These settings are using a dualshock 3 and a little bit of Fedora 15 Gnome's mouse acceleration. The main feature I have been using is the responsive curve filter, which I've found has enabled a decent amount of control over how the mouse behaves when mapped to a joystick. The other feature that has been quite helpful is the ability to set the REPEAT value of REL_X and REL_Y to -1. This addition helps a lot in smoothing out the mouse movement. Along with REPEAT, I set the VALUE number to change the speed of the mouse cursor. The sensitivity filter may not even be required; I just set it awhile ago and didn't change it back.

Now all of these features combined have resulted already in quite good mouse control with the joystick. However, I wonder if perhaps mouse emulation can be improved even more. The greatest program I have used thus far to emulate the mouse using the joystick is program JoyToKey (http://www.electracode.com/4/joy2key/JoyToKey%20English%20Version_files/jtk374en.zip) on Windows (unforunately the source code is not available). All of the work I've done in setting up mouse emulation with Xboxdrv has been an attempt to mimic as closely as possible the results I get with JoyToKey. Obviously it would be impossible to get the same results without the source code, but if the program is used as a guide as to how mouse emulation should behave and feel, I think it might be possible to approximate it.

Unforunately I have no idea what really could be added to xboxdrv to achieve a better feel to the mouse emulation. One obvious feature could be the inclusion of real mouse acceleration, but I'm not knowledgable enough on the subject to know how that works exactly. JoyToKey itself does not offer any options to select a specific type of mouse acceleratoin; it just allows the user to adjust the speed of the cursor, which doesn't affect how the mouse fundamently moves. Perhaps someone who is more knowledgable of mouse acceleration could deduce what type is being used by JoyToKey? There is also the problem of seperating the Operating System's acceleration from the application's.

I understand that this may be a somewhat unreasonable request (need Windows access, no source code, etc.), but I make it because xboxdrv has the ability to do many, if not all of the other features of JoyToKey and other key mappers, so the addition of adding excellent mouse emulation on top of these would complete the package.

(P.S. If using JoyToKey remember to Enable "Use Axes other than X and Y" in Others tab. Then a list of axes should appear and, depending on the controller being used, should map to X1,Y1,X2,Y2, etc. Double click on each one to set the mouse speed.)

Segmentation fault

Gentoo AMD64
libusb 1.0.9
Afterglow xbox 360 controller >> Bus 006 Device 006: ID 0e6f:0213 Logic3
here is the gdb output for the segmentation fault

gdb ./xboxdrv
GNU gdb (Gentoo 7.5 p1) 7.5
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
http://bugs.gentoo.org/...
Reading symbols from /home/salamanderrake/src/xboxdrv/head/xboxdrv...done.
(gdb) run
Starting program: /home/salamanderrake/src/xboxdrv/head/xboxdrv
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
xboxdrv 0.9.0 - http://pingus.seul.org/~grumbel/xboxdrv/
Copyright © 2008-2012 Ingo Ruhnke [email protected]
Licensed under GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under certain conditions; see the file COPYING for details.

Controller: Afterglow Gamepad for Xbox 360
Vendor/Product: 0e6f:0213
USB Path: 006:006
Controller Type: Xbox360

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6ff8597 in libusb_get_next_timeout () from /usr/lib64/libusb-1.0.so.0
(gdb) bt
#0 0x00007ffff6ff8597 in libusb_get_next_timeout () from /usr/lib64/libusb-1.0.so.0
#1 0x00007ffff6ff8764 in get_next_timeout () from /usr/lib64/libusb-1.0.so.0
#2 0x00007ffff6ff8862 in libusb_handle_events_timeout_completed () from /usr/lib64/libusb-1.0.so.0
#3 0x00007ffff6ff899f in libusb_handle_events () from /usr/lib64/libusb-1.0.so.0
#4 0x0000000000507ed5 in USBController::~USBController (this=0x88ee00, __in_chrg=) at src/controller/usb_controller.cpp:92
#5 0x000000000050d658 in ~Xbox360Controller (this=0x88ee00, __in_chrg=) at src/controller/xbox360_controller.cpp:88
#6 Xbox360Controller::~Xbox360Controller (this=0x88ee00, __in_chrg=) at src/controller/xbox360_controller.cpp:90
#7 0x00000000004239ba in release (this=0x87cc10) at /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:145
#8 ~shared_count (this=0x7fffffffd688, __in_chrg=) at /usr/include/boost/smart_ptr/detail/shared_count.hpp:305
#9 ~shared_ptr (this=0x7fffffffd680, __in_chrg=) at /usr/include/boost/smart_ptr/shared_ptr.hpp:164
#10 XboxdrvMain::~XboxdrvMain (this=0x7fffffffd640, __in_chrg=) at src/xboxdrv_main.cpp:64
#11 0x000000000040aa80 in Xboxdrv::run_main (this=, opts=...) at src/xboxdrv.cpp:198
#12 0x0000000000408246 in Xboxdrv::main (this=0x7fffffffd94f, argc=1, argv=0x7fffffffda48) at src/xboxdrv.cpp:370
#13 0x0000000000408164 in main (argc=1, argv=0x7fffffffda48) at src/main/main.cpp:24

[Feature Request] PS3 via Bluetooth

After struggling to trying to get qtsixa and sixad to play with some of my Steam games, I leaned about xboxdrv --mimic-xpad. It basically makes my ps3 controller act identical to a standard 360 controller, and allowing me to play my games the way the developers had intended. The only downside, I have to be tethered via USB. The best thing about sixad was how well it worked over bluetooth. Now, I've attempted to find some way of mapping the controller via bluetooth and remapped using xboxdrv, but I could never really get it working.

So, exactly how difficult would it be to add bluetooth capability to xboxdrv so that I could use my ps3 controller wirelessly?

No headset support

As the title says, this driver doesn't seem to work with the standard xbox 360 controller paired with a headset. Would be nice to be able to use the headset through the xbox controller

EDIT: Seems there is some form of support for the headset, but command line parameters have to be used to exploit this. So, I suppose this is more or less a usability issue?

Any progress on mouse acceleration for xboxdrv?

I've been using xboxdrv for quite awhile and have been pleased with the mouse emulation for the most part. I remember you mentioned that you were working on adding mouse acceleration which I think would be beneficial for FPS type games when making quick 180 turns on the x-axis. I think something like 1.2x, 1.3x, 1.4x, etc.. acceleration when the stick is at 90-95% thresh hold would be great to have in xboxdrv. Being able to set the amount of acceleration and when that acceleration is applied relative to stick position would also be great. Anyway just wondering, thanks.

Afterglow USB VID/PID

I have Afterglow wired Xbox 360 controller which has following USB vendor/product ID

0e6f:0113 (Logic3)

Controller works fine with --device-by-id parameter, but it would be nice to have this combination in xpad_device.cpp device array.

Thanks.

Steering wheel support.

I have an xbox 360 steering wheel and I would very much like to be able to read its values under linux.

So far all I can tell is this

xboxdrv --type generic-usb -L

id | wid | idVendor | idProduct | Name
----+-----+----------+-----------+--------------------------------------
0 | 0 | 0x045e | 0x0291 | Microsoft Xbox 360 Wireless Controller (Port: 0)
0 | 1 | 0x045e | 0x0291 | Microsoft Xbox 360 Wireless Controller (Port: 1)
0 | 2 | 0x045e | 0x0291 | Microsoft Xbox 360 Wireless Controller (Port: 2)
0 | 3 | 0x045e | 0x0291 | Microsoft Xbox 360 Wireless Controller (Port: 3)

What can I do to facilitate adding support for this device? How do I add it as a device an then try to map out the individual sensors?
Many thanks
Alan

Issue compiling on raspberry PI

I'm trying to compile this on a raspberry pi running raspbian but I get this error:

g++ -o src/bluetooth.o -c -isystem/usr/include/dbus-1.0 -isystem/usr/lib/arm-linux-gnueabihf/dbus-1.0/include -isystem/usr/include/glib-2.0 -isystem/usr/lib/arm-linux-gnueabihf/glib-2.0/include -pthread -isystem/usr/include/libusb-1.0 -g -O3 -Wall -ansi -pedantic -DPACKAGE_VERSION='"0.9.0"' -Isrc src/bluetooth.cpp
In file included from src/bluetooth.cpp:19:0:
src/bluetooth.hpp:22:33: fatal error: bluetooth/bluetooth.h: No such file or directory

I do have all the required packages (I think) because I see no complains at the beginning of the process:

scons: Reading SConscript files ...
Checking for C++ library X11... yes
Checking for cwiid... (cached) no
Checking for gtk+-2.0... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...

Any ideas where the issue might be?

Output button events are not OR'ed together

Currently when using a configuration such as:

./xboxdrv --ui-clear --ui-buttonmap A=JS_0,B=JS_0 --ui-axismap X1=ABS_X,Y1=ABS_

Where two keys send the same output event, the output events are send without checks for what the status of other buttons sending those events is, thus pressing and holding button A, while pressing and releasing button B will leave the controller in a state where JS_0 is unpressed, even so button A is still pressed.

A solution would be to OR the state of all buttons sending the event together.

static compile/portable version possible?

Would it be possible to release a version of xboxdrv that is portable and doesn't require the additional dependencies to be downloaded? Could be useful to use on other distributions that don't have the additional libraries easily available.

MLG Pro Circuit Controller (Xbox)

1bad:f023

Here's the output of lsusb ID 1bad:f023 Harmonix Music

I've managed to get it working with sudo xboxdrv --device-by-id 1bad:f023 --type xbox360 --mimic-xpad --silent

lookup failure for: 'gamepad.start'

Hi,

Just tried compiling and running master, got output as below:

xboxdrv 0.9.0 - http://pingus.seul.org/~grumbel/xboxdrv/ 
Copyright © 2008-2012 Ingo Ruhnke <[email protected]> 
Licensed under GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> 
This program comes with ABSOLUTELY NO WARRANTY. 
This is free software, and you are welcome to redistribute it under certain conditions; see the file COPYING for details. 

Controller:        Razer Onza
Vendor/Product:    1689:fd00
USB Path:          003:003
Controller Type:   Xbox360

Your Xbox/Xbox360 controller should now be available as:
/dev/input/js0
/dev/input/event13

Press Ctrl-c to quit, use '--silent' to suppress the event output
libusb:warning [libusb_close] internal signalling read failed, closing anyway

-- [ ERROR ] ------------------------------------------------------
SymbolTable<T>::get(): lookup failure for: 'gamepad.start'

I can force it to run on 0.8.4 with --device-by-id and --type without this error. Is there any other information I can provide to help troubleshoot?

Cheers

Rumble with infinite replay doesn't play at all

I noticed a problem with xboxdrv when used together with mupen64plus-input-sdl. The memory/rumble pack switch effects were played but not the ingame effects. The big difference between the two are the length of the effect (or actually the replay.length because it is a FF_RUMBLE/FF_PERIODIC effect). Switching effects have a specific length and ingame effects have no length (aka infinite length) and are stopped when the emulated system requests them to be stopped.

You can find an easy example using SDL2 at https://gist.github.com/ecsv/5771853

Please read more about the the SDL_HAPTIC_INFINITY at http://wiki.libsdl.org/moin.fcg/SDL_HapticRunEffect

The infinite length is really set by replay.length as you can see at following places in the code:

http://hg.libsdl.org/SDL/file/1516fe08e6ec/src/haptic/SDL_haptic.c#l758
http://hg.libsdl.org/SDL/file/1516fe08e6ec/src/haptic/linux/SDL_syshaptic.c#l576

Here the important part from the ff-memless driver which shows that effects are only stopped when the replay.length is != 0 (it is easier to understand than the iforce-ff driver because you don't need the secret hardware specs):

http://lxr.free-electrons.com/source/drivers/input/ff-memless.c?v=3.8#L102
http://lxr.free-electrons.com/source/drivers/input/ff-memless.c?v=3.8#L367

You can also check out hid-pidff.c (pidff_set_effect_report) and compare it with the description of Duration for the value Null on page 15 of http://www.usb.org/developers/devclass_docs/pid1_01.pdf

Issue with exec button filter

I'm trying to use the exec filter to launch a script that increases the volume through pulseaudio. The script is:

!/bin/bash

pacmd dump|awk --non-decimal-data '$1~/set-sink-volume/{system ("pacmd "$1" "$2" "$3+1000)}'

I tested the script normally and it works.

I link to it in xboxdrv using:

du=exec:/home/user/volup

The problem is, I get this message:
No PulseAudio daemon running, or not running as session daemon.

I've also tried another script that does the same thing and get the same problem. I was also wondering if there is a way to run a script (or bash command I guess) with arguments? I tried running a script with arguments simply by tacking them on the end like this:

du=exec:/home/user/script $0 $1

I get this error:
[ERROR] ExecButtonEventHandler::send(): exec failed: No such file or directory

Is this supported or is my syntax wrong?

Daemon mode fails to run as system service

See discussion at:

https://groups.google.com/d/topic/xboxdrv/L-mRi0AIVuA/discussion

If xboxdrv is run as root it will enable "--dbus system" instead of "--dbus session", but in newer versions of Ubuntu this results in:

$ sudo xboxdrv --daemon 
xboxdrv 0.8.5 - http://pingus.seul.org/~grumbel/xboxdrv/ 
Copyright © 2008-2011 Ingo Ruhnke <[email protected]> 
Licensed under GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> 
This program comes with ABSOLUTELY NO WARRANTY. 
This is free software, and you are welcome to redistribute it under certain conditions; see the file COPYING 
for details. 

[ERROR] XboxdrvDaemon::run(): fatal exception: failed to get unique dbus name: Connection ":1.68" is not     allowed to own the service "org.seul.Xboxdrv" due to security policies in the configuration file

Workaround is to run xboxdrv as dbus session with "--dbus session".

Don't work emulator gamepad in games with real PC joystick

I'm disable "joydev" module (js0 disappear), and start xboxdrv --evdev conected to real joystick. After that, there are two devices js0 and js1(joydev loaded again "detach-kernel-driver = true" don't work). If "evdev-grab = false", then games take events from real gamepad. I suppose js0 it's real joypad, js1 virtual(xbodrv prompted what js0).

Distr: ArchLinux
Linux: 3.9.9
xboxdrv: 0.8.5

LED feedback of config selection

With multiple configs, it's sometimes difficult to know which config is currently selected.

Although the status LEDs are currently intended to indicate the controller number, it would be great if it were possible to configure them to indicate which config is currently active. Perhaps this could be achieved with a new config setting (led_config?) that can be specified for each config. When the user switches that a config that contains this setting, the LEDs get set to the specified value.

I had a very quick look at this, and found that the code that changes the config (uinput_message_processor.cpp) is nicely isolated from any ControllerPtr, presumably necessary to set the LEDs. So it looks like a bit of plumbing is required.

A nice further enhancement would be to flash the LED of the new config for a short time, and then set the LED to indicate the controller number.

on-connection exec

Hey there, i would like to do some actions depending on the slot of the newly connected controller. My idea was to put xboxdrv into deamon mode and use the on-connection arg. So far so good, but could you please give me a tip how i could fetch the slot my controller was asigned to?

Wireless Xbox360 controller does not get detected

In Xboxdrv 0.8.0 the wireless controller is sometimes not detected and doesn't send events, even so the LED gets properly set, unplugging the battery pack to reset the controller and then resyncing the controller fixes the problem. Real cause of the issue is unknown.

sync rf module with play & charge kit controller

This copy&paste from:
https://groups.google.com/forum/#!msg/xboxdrv/lMTzKwXqxLg/lt9Uqip26g8J
-- snip --
Hi,
i've just successfully installed xboxdrv 0.8.4 on my ubuntu 12.04, thx a lot for your work.

i was in the process of recycling some xbox 360 rf unit to use wireless controllers on my pc, i followed this tutorial and it works fine : http://diru.org/wordpress/2011/03/wireless-xbox360-controller-on-a-pc-without-the-commercial-dongle/#comment-727

Unfortunately you can't get the rf module to sync your controllers without some additional arduino device but some users commented that you could sync with the rf module when using a play & charge kit (cable) on your controller.

It works in windows but i couldn't get the sync to trigger with xboxdrv.

As i understand it, the p&c controller will try to sync with anything, i tried to see if there was some special command to get xboxdrv to sync controllers but couldn't find anything.

It would be nice to let xboxdrv sync a plugged in p&c controller. Of course once you sync it in windows it then works with xboxdrv too.

Alternate LEDs

I have two controllers setup with 2 seperate configs each, it would be neat to assign led1 (config1, controller1) and led4 (config2, controller1) depending on the config. The same would be true for controller 2, just utilizing led 2 and 3. This would be great for identifying what config the controller is tied to at the moment. BTW this is an amazing driver, I appreciate the work, thank you.

Segmentation Fault :(

Arch Linux, x86-x64
3.11.4-1-ARCH
Microsoft authentic xbox 360 controller

local/libgusb 0.1.6-1
GLib wrapper around libusb1
local/libusb-compat 0.1.5-1
Library to enable user space application programs to communicate with USB devices
local/libusbx 1.0.17-1
Library that provides generic access to USB device

mikeyd@ArchBoxMTD /usr/bin $ gdb ./xboxdrv
GNU gdb (GDB) 7.6.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/bin/xboxdrv...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/./xboxdrv
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
xboxdrv 0.8.5 - http://pingus.seul.org/~grumbel/xboxdrv/
Copyright © 2008-2011 Ingo Ruhnke [email protected]
Licensed under GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under certain conditions; see
the file COPYING for details.

[New Thread 0x7ffff4497700 (LWP 3372)]
Controller: Microsoft Xbox 360 Controller
Vendor/Product: 045e:028e
USB Path: 004:005
Controller Type: Xbox360
[Thread 0x7ffff4497700 (LWP 3372) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff700e229 in libusb_get_next_timeout () from /usr/lib/libusb-1.0.so.0
(gdb)

'couldn't find matching endpoint' with 'TX6500+ Dance Pad'

xboxdrv-linux-0.8.5$ sudo /usr/local/bin/xboxdrv --debug -i 0
xboxdrv 0.8.5 - http://pingus.seul.org/~grumbel/xboxdrv/ 
Copyright © 2008-2011 Ingo Ruhnke <[email protected]> 
Licensed under GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> 
This program comes with ABSOLUTELY NO WARRANTY. 
This is free software, and you are welcome to redistribute it under certain conditions; see the file COPYING for details. 

Controller:        TX6500+ Dance Pad (first generation)
Vendor/Product:    1430:8888
USB Path:          003:048
Controller Type:   Xbox Dancepad
[DEBUG] USBController::usb_find_ep(): Interface: 0
[DEBUG] USBController::usb_find_ep():     Endpoint: 1(IN)

-- [ ERROR ] ------------------------------------------------------
USBController::usb_find_ep(): couldn't find matching endpoint

Convert an analog axis to pulse-width modulated keypresses

In some games, e.g. the ←/→ keys apply a rotational velocity to a steering wheel instead of instantaneously turning it to some fixed position. This lets the player gain analog-ish control by essentially pulse-width modulating their keypresses.

It would be nice if one could have xboxdrv generate pulse-width modulated keypresses with an analog controller axis mapped to the duty cycle. The period probably should be configurable with a sensible default value (something like 10 Hz, I guess).

xboxdrv doesn't init PS3 controller properly.

PS3 controller needs a usb control command sent to it before it can work. Refer to Linux's driver source code to see how it's done. (It's thankfully simple).

xboxdrv isn't doing this, so it only works using -d to replace the kernel driver that as already done that.

This should not be necessary.

Don't error out on detection of Play&Charge cable

I've got a wireless 360 controller with USB dongle, which i keep connected to my PC with a Play&Charge cable, so i don't need to keep batteries in the controller.

Unfortunately, the latest Xboxdrv seems to like to error out when it discovers the P&C cable, before it checks for a wireless dongle--I'm able to disconnect the cable, launch xboxdrv manually, then reconnect the cable and activate the controller, but this is a little awkward to do every boot.

LED not lighted on when XBOX 360 Wireless controller turned on after xboxdrv beeing launched

Hi,

Issue with an XBox 360 Wireless Controller : if you turn on the controller after the launch of xboxdrv, the LED is not lighted on.

After taking a look at the code, it seems that the set_led method of the controller class should accept a "force" option to set the led even if the led state is the same as before.

It seems that xboxdrv can not detects when the controller is turned off or on. As said before, xboxdrv should force set_led when it detects that the controller has been turned on.

In fact, it works well by removing the "state check if" in set_led(), but it makes the LED set signal to be sent at every event.

force-feedback lands on wrong /dev/input/eventX

Starting xboxdrv with:

./xboxdrv --force-feedback

will lead to two event devices to be created, one with the FF one with the regular events. This can be worked around with:

./xboxdrv --force-feedback --no-extra-devices

The problem is caused by ControllerSlotOptions::get_ff_device() returning a hardcoded 0, which is DEVICEID_GENERIC, while regular events get send to DEVICEID_AUTO, which turns into DEVICEID_JOYSTICK.

DBus does not properly work without X11

$ /usr/local/bin/xboxdrv --daemon
xboxdrv 0.8.2 - http://pingus.seul.org/~grumbel/xboxdrv/
Copyright © 2008-2011 Ingo Ruhnke [email protected]
Licensed under GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under certain conditions; see the file COPYING for details.

X11 connection rejected because of wrong authentication.
[ERROR] XboxdrvDaemon::run(): fatal exception: failed to open connection to bus: /bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.

ERROR: SymbolTable<T>::get(): lookup failure for: 'gamepad.start'

i've just built xboxdrv and got this when trying to run it:

xboxdrv # ./xboxdrv
xboxdrv 0.9.0 - http://pingus.seul.org/~grumbel/xboxdrv/
Copyright © 2008-2012 Ingo Ruhnke [email protected]
Licensed under GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under certain conditions; see the file COPYING for details.

Controller: Microsoft Xbox 360 Wireless Controller (PC)
Vendor/Product: 045e:0719
USB Path: 002:003
Wireless Port: 0
Controller Type: Xbox360 (wireless)

Your Xbox/Xbox360 controller should now be available as:
/dev/input/js0
/dev/input/event4

Press Ctrl-c to quit, use '--silent' to suppress the event output

-- [ ERROR ] ------------------------------------------------------
SymbolTable::get(): lookup failure for: 'gamepad.start'

Disconnected devices aren't unregistred - System crash

Today I disconnected a gamepad, then reconnected it and this is what I got from xboxdrv (xboxdrv -D -s --force-feedback) :

[ERROR] USBController::on_read_data(): USB read failure: 32: LIBUSB_TRANSFER_NO_DEVICE
[ERROR] XboxdrvDaemon::launch_controller_thread(): no free controller slot found, controller will be ignored: 007:003 046d:c21f 'Logitech F710'

Futuremore, when I tried to kill xboxdrv (with ctrl + c) the whole system froze.

Hold-button fails in Dosbox games

A simple configuration such as:

du=KEY_2:KEY_6:500
dr=KEY_3:KEY_7:500
dd=KEY_4:KEY_8:500
dl=KEY_5:KEY_9:500

will fail in some Dosbox games, such as Duke Nukem 3d, has the first button is pressed and released instantly without a sync inbetween:

Event: time 1316019389.794371, type 1 (Key), code 3 (2), value 1
Event: time 1316019389.794379, type 1 (Key), code 3 (2), value 0
Event: time 1316019389.794387, -------------- Report Sync ------------

If adding a sync doesn't fix the problem, the button should be held down for a minimum time.

multiple controllers in one conf file

Hello!
I have two wireless Xbox controllers. As far as I konw, there are two methods to use them:

  • launch 2 copies of xboxdrv with additional key (--wid 0, --wid1)
  • launch xboxdrv as daemon with special key too (-D --next-controller )

I think, that it is better to launch xboxdrv as a system service. For example in ArchLinux there is a package in AUR and it has service file and a conf file. So I can enable xboxdrv service, and it will be launched automatically.
Everything is good exept one problem:
The service launches xboxdrv in following form - /usr/bin/xboxdrv -D -c /etc/conf.d/xboxdrv
And if I want that the second controller will work, I need to make another conf file and add links from the first file to this. For example:

[xboxdrv]
silent = true
alt-config = /etc/conf.d/xboxdrv-2
next = true
next-controller = true

In view of the above, could you add possibility to use only one config file for several controllers?

XboxdrvDaemon ignores controllers that are already connected

I get the following warning messages when running the deamon with controllers already plugged in.

[WARN] XboxdrvDaemon::process_match(): couldn't get vendor:product, ignoring device
[WARN] XboxdrvDaemon::process_match(): couldn't get vendor:product, ignoring device
[WARN] XboxdrvDaemon::process_match(): couldn't get vendor:product, ignoring device
[WARN] XboxdrvDaemon::process_match(): couldn't get vendor:product, ignoring device

They are completely ignored, I need to unplug and replug them on reboot.

Straight xboxdrv works fine though.

Running latest stable on the Raspberry Pi (raspbian)

Cannot use two controllers

When executing xboxdrv -w 0, a single controller works. However, when executing another session (namely, xboxdrv -w 1), xboxdrv immediately segfaults. Here is the output from the xboxdrv -w 1 via GDB:

gdb --args xboxdrv -w 1
...
(gdb) run
Starting program: /usr/bin/xboxdrv -w 1
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
xboxdrv 0.8.5 - http://pingus.seul.org/~grumbel/xboxdrv/
Copyright © 2008-2011 Ingo Ruhnke [email protected]
Licensed under GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under certain
conditions; see the file COPYING for details.

Controller: Microsoft Xbox 360 Wireless Controller (PC)
Vendor/Product: 045e:0719
USB Path: 001:006
Wireless Port: 1
Controller Type: Xbox360 (wireless)

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff720a5e7 in libusb_get_next_timeout ()
from /usr/lib64/libusb-1.0.so.0

Support for Rock Candy Wired 360 controller

Hi,

I would like to help get the Rock Candy controller working with xboxdrv. I ran usb-devices with the following output:

T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#=  6 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS= 8 #Cfgs=  1
P:  Vendor=0e6f ProdID=021f Rev=01.00
S:  Manufacturer=Performance Designed Products
S:  Product=Rock Candy Gamepad for Xbox 360
S:  SerialNumber=0001F2BD
C:  #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=5d Prot=01 Driver=(none)
I:  If#= 1 Alt= 0 #EPs= 4 Cls=ff(vend.) Sub=5d Prot=03 Driver=(none)
I:  If#= 2 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=5d Prot=02 Driver=(none)
I:  If#= 3 Alt= 0 #EPs= 0 Cls=ff(vend.) Sub=fd Prot=13 Driver=(none)

If anyone could tell me how to proceed, that would be great.

Thanks.

Segmentation fault

gdb ./xboxdrv
GNU gdb (GDB) 7.6.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/bin/xboxdrv...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/./xboxdrv
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
xboxdrv 0.8.5 - http://pingus.seul.org/~grumbel/xboxdrv/
Copyright © 2008-2011 Ingo Ruhnke [email protected]
Licensed under GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under certain conditions; see the file COPYING for details.

[New Thread 0x7ffff44a3700 (LWP 2301)]
Controller: PLAYSTATION(R)3 Controller
Vendor/Product: 054c:0268
USB Path: 006:002
Controller Type: Playstation 3 USB
[Thread 0x7ffff44a3700 (LWP 2301) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7012229 in libusb_get_next_timeout () from /usr/lib/libusb-1.0.so.0

xboxdrv-daemon doesn't always end xboxdrv process on disconnect

I am running 64 bit linux, and when I unplug a controller with the daemon running, I cannot reconnect the controller because the xboxdrv process never actually ends so the daemon gets hung up on the os.waitpid call. This seems to be because when xboxdrv is given ctrl-c, it sometimes says press ctrl-c again to exit. I propose a simple workaround for this by waiting a short period then sending a second SIGINT. Patch is attached, it has worked about 15/15 times so far for me.

--- xboxdrv-daemon.orig 2010-10-05 14:45:54.846050984 -0400
+++ xboxdrv-daemon 2010-10-05 16:08:49.768049809 -0400
@@ -123,6 +123,8 @@

         pid = self.processes[udi]
         os.kill(pid, signal.SIGINT)
  •        time.sleep(0.3);
    
  •        os.kill(pid, signal.SIGINT)
         os.waitpid(pid, 0)
         del self.processes[udi]
    

Not all rumble effects working on F710.

I tried fftest to see if rumble works. When starting it gave this errors:

Upload effects[2]: Invalid argument
Upload effects[3]: Invalid argument

And it didn't play effect 1 (Constant Force), 2 (Spring Condition) and 3 (Damping Condition).
Also no rumble with mupen64plus (1.5), even if it says:

[blight's SDL input plugin]: Rumble activated on N64 joystick #1

Deadzone with Sixaxis keeps axis at minimum value

I'm on v0.8.4 and when I apply a --deadzone setting a constant value of < -30000 (not exactly -32768 but close) is returned when the stick is centered. Moving it right/down makes the value change up to the maximum value, moving it left/down keeps it near the minimum. I think the problem is that the Sixaxis reports it's position with the range [0, 255], however the filter uses a 0 for the deadzone. I played around with the three value version, however the docs aren't really clear about what each value is supposed to be (the man page lists MIN:CENTER:MAX which can't be right, looking at the code MIN:MAX:SMOOTH seems to be what they mean), however that didn't help either.

xboxdrv should provide a virtual keyboard

xboxdrv should provide a virtual keyboard that can be opened up on the press of a button and be navigated with the gamepad. The virtual keyboard should act has a fully functional keyboard replacement.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.