Forum Replies Created
-
AuthorPosts
-
bmanskeParticipant
In reality the reload did nothing to solve the problem. Reading through the man page for xboxdrv it says in the -EVDEV option (refering to use of xboxdrv to work with non xbox controllers) that the driver can leave joystick devices around when setting up the controllers. The old devices can be deleted and the new devices renamed.
Looking at /etc/init.d/xboxdrv I saw a workaround. It looked like this workaround was for a 4 controller setup and if devices 0-3 were old then devices 4-7 would replace them. What I needed was a solution for my one controller.
This is not a complete solution for the problem. If I boot and the controller comes up in a strange state then it doesn’t automatically reset the joystick. What it does is leave the joystick devices in a state to that when I unplug and plug in my controller then it attaches correctly.
It SHOULD work for up to 4 controllers but I only have one so it hasn’t been tested for 2-4.
The other improvement I made was to allow the choice of wired or wireless controller in the /etc/default/xboxdrv file. This choice can be made for each controller individually.
I changed the LED for the 4th controller on a 4 controller setup. I moved the code for run-time checking of the parameters in the defaults file into the do_start to simplify the signaling of an error.
I’m attaching my files below and hope that it helps out. Let me know if there are any questions or ideas for improvement.
bmanskeParticipantI did get it working on my second attempt. I think it runs very nicely but I have only tried the SNES emulator so far.
The difference between this attempt and the first is that I had the xboxdrv files that go in the /etc/default and /etc/init.d dirs prepared. There was some problems on the first attempt and xboxdrv didn’t load so it didn’t unload the default driver for the joystick to unload. That driver must have reserved a joystick slot because from that point I couldn’t get the Xbox360 controller to load as /dev/inout/js0. Even after I forced the driver to be unloaded it still defaulted to js1. This makes me think that the slot was then reserved based on the driver and the UID from the USB HID controller. Does anyone know it this is in fact how it works? There should also be a way to remove this information from the system. Can anyone tell me how to reset the device info. This would save people in the future from starting from scratch in a case like this.
For those interested in why the driver didn’t load… Debian uses dependency based scheduling for loading drivers. The comment at the front of the file actually contains instructions for loading it. It is the format of the text that is very finacky. It is sensitive to multiple spaces so horizontal space should be added with tabs. Some of my editing is done in windows and the line ending chars are different. So I will load a file in nano and write it back out with <ctrl>-o and before accepting the name press <alt>-m if it says that is going to write in MS-DOS format or in MAC format. I think more people would try loading drivers as daemons and writing the needed shell scripts if the shell would ignore white space properly or at least gave you a message that says that the problem is one of those chars that you can’t see instead of telling you that you have a mismatched IF statement or some other bogus indication.
I hope that all this helps someone else
bmanskeParticipantI’ll give it a shot. Is there anything about the steps outlined above that I should change or just do it the same way? If you recommend loading the driver as a daemon, then I’ll probably retain the xboxdrv in /etc/init.d/ and /etc/defaults/.
Thanks, I’ll let you know what happens.
-
AuthorPosts