Closed BurninTurtles closed 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.
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
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
Maybe we can find some useful info here: http://www.signal11.us/oss/udev/
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.
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 :)