raelgc / ubuntu_xboxdrv

Ubuntu xboxdrv Integration
https://launchpad.net/~rael-gc/+archive/ubuntu-xboxdrv
GNU General Public License v3.0
165 stars 16 forks source link

Develop multiple instances 1 #34

Closed BurninTurtles closed 9 years ago

BurninTurtles commented 9 years ago

Here you have it, my modified more dynamic ubuntu-xboxdrv :) I feel that my modified default file fits the required documentation well for now but i do intend to update that also. until then, follow the default file and when you create your custom udev rule here is my example: ACTION=="add",SUBSYSTEM=="usb",ATTR{idVendor}=="045e",ATTR{idProduct}=="028e",RUN+="/sbin/initctl emit gamepad-present ID=045e:028e"

I am going to assume any reader would know where to look to make [sense?] of that. however the important piece is the run field. specifically the event that initctl will emit. make sure you provide your id pair again as the variable ID, no quotes. happy coding :)

raelgc commented 9 years ago

Wow, impressive... I need to test here (I have just 2 wireless gamepads).

But, to be honest, this is beyond my basic (lack of) knowledge about udev.

BurninTurtles commented 9 years ago

I know nothing of udev also, just those rules and how to run scripts from them. Typical quick tutorial stuff. However upstart I feel too proficient in and its probably not even right by the cookbook lol

BurninTurtles commented 9 years ago

Bit of a PSA: if anyone knows why I can't find USB in /sys/class/ I may be able to optimize this a lot more. That was My biggest bridge to get around for my shotty implementation of hotplugging with udev

raelgc commented 9 years ago

Maybe we can find some useful info here: http://www.signal11.us/oss/udev/

BurninTurtles commented 9 years ago

sort of yes. really cleared udev for me lol i think i found out how to use the usb-added event from the udev bridge though so my next try will be a lot simpler. had an artifact in my logs that i want to look at and experiment with.