Th3 W01f
Posts: 9
Joined: Mon Oct 07, 2013 11:26 pm

F310 controller issues.

Tue Oct 08, 2013 12:23 am

I have a pi running raspbian with mame4all (and some working roms) installed.
For the last few hours, I've been trying (and failing), to get my Logitech F310 (wired) gamepad to work with the raspberry pi.
What I've done so far:
Installed driver: sudo apt-get install xboxdrv.
Editted /etc/rc.local, adding the following line above "exit 0": xboxdrv --trigger-as-button --wid 0 --led 2 --deadzone 4000 --silent &
sleep 1.
When I boot the pi it gives me an error saying: "No Xbox or Xbox360 controller found".
Same result when I run the "sudo xboxdrv" command.
The message is the same both for X input and for Direct input. However, I noticed that when I boot the pi with the Direct input, it gives the following error while trying to populate /dev: "connect-debounce failed, port 3 disabled".
Also, when set to X input the gamepad shows up when I type "lsusb", but doesn't show up in /dev/input/.
At some point I found the command "sudo xboxdrv --device-by-id 046d:c21d --type xbox360" (the original id was different, so I replaced it with the id of my controller from lsusb), after typing the command the pi showed values which changed when I pressed buttons/moved sticks on the controller.
From looking at all those different forums I figured the problem is in one of the following:
A. Lack of an externally powered usb hub (not enough power is being provided to the controller for proper operation).
B. Some system text file or something that I need to edit.

So before going with A, and spending 30$ on a hub, I wanted to make sure it's really not B...
Sorry if I left out some critically important info... I've only been using the pi for about 3 weeks...

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: F310 controller issues.

Tue Oct 08, 2013 8:56 am

Th3 W01f
It could be the drivers are looking for a 'Wireless' Pad as the re.local script is incorrect

xboxdrv --trigger-as-button --wid 0 --led 2 --deadzone 4000 --silent &
sleep 1.

Try
xboxdrv --trigger-as-button --id 0 --led 2 --deadzone 4000 --silent &
sleep 1.

As far as 'not enough power is being provided to the controller for proper operation', this was an early erroneous reported issue, the RPi does in fact produce enough from the USB Port to provide support for a Wired XBox360 controller WITHOUT using a HUB.
"The list of things I have heard now contains everything!"

Th3 W01f
Posts: 9
Joined: Mon Oct 07, 2013 11:26 pm

Re: F310 controller issues.

Tue Oct 08, 2013 9:51 am

welshy wrote:Th3 W01f
It could be the drivers are looking for a 'Wireless' Pad as the re.local script is incorrect

xboxdrv --trigger-as-button --wid 0 --led 2 --deadzone 4000 --silent &
sleep 1.

Try
xboxdrv --trigger-as-button --id 0 --led 2 --deadzone 4000 --silent &
sleep 1.

As far as 'not enough power is being provided to the controller for proper operation', this was an early erroneous reported issue, the RPi does in fact produce enough from the USB Port to provide support for a Wired XBox360 controller WITHOUT using a HUB.
I forgot to change "wid" to "id" when writing the post, but it's set to the correct value in the re.local script (I double checked anyway).
Thanks for the info about the hub.

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: F310 controller issues.

Tue Oct 08, 2013 10:54 am

Ok, the obvious question you have plugged the Joypad in? lol
Another check you can do is download the 'standard' drivers
sudo apt-get install joystick

then run jstest
./jstest /dev/js0
and see if the inputs are being recongnised
"The list of things I have heard now contains everything!"

Th3 W01f
Posts: 9
Joined: Mon Oct 07, 2013 11:26 pm

Re: F310 controller issues.

Tue Oct 08, 2013 11:08 am

welshy wrote:Ok, the obvious question you have plugged the Joypad in? lol
Another check you can do is download the 'standard' drivers
sudo apt-get install joystick

then run jstest
./jstest /dev/js0
and see if the inputs are being recongnised
Yes the device is plugged in, I double checked anyway :)
As I said in my first post the controller won't show up in the /dev/input/ directory, so there isn't a js0 to run the jstest command on...

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: F310 controller issues.

Tue Oct 08, 2013 11:20 am

Th3 W01f
Mmm, it may be the other commands you entered have changed priorities. I do know the F310 is a bit of a pain (from what I have read in the Forum, but I recall I did assist a user and it did work). Try a 'Fresh' Wheezy Image, install the drivers, change the rc.local and save it (left Ctrl & x, y, Enter) then plug the Pad in and reboot (sudo reboot). See if that solves it. But before you do this just try ./jtest and see if it gives you any options.
"The list of things I have heard now contains everything!"

Th3 W01f
Posts: 9
Joined: Mon Oct 07, 2013 11:26 pm

Re: F310 controller issues.

Tue Oct 08, 2013 12:12 pm

welshy wrote:Th3 W01f
Mmm, it may be the other commands you entered have changed priorities. I do know the F310 is a bit of a pain (from what I have read in the Forum, but I recall I did assist a user and it did work). Try a 'Fresh' Wheezy Image, install the drivers, change the rc.local and save it (left Ctrl & x, y, Enter) then plug the Pad in and reboot (sudo reboot). See if that solves it. But before you do this just try ./jtest and see if it gives you any options.
Formatted SD card, installed newest raspbian (2013-09-25), did all the first time setup things (expand file system etc.), installed drivers, edited rc.local (with the correct line), plugged in the controller, rebooted. Same result, the device won't show in /dev/input/ and xboxdrv says it can't detect any xbox devices.
I found something that might explain where the problem is coming from though:
In the xboxdrv website (http://pingus.seul.org/~grumbel/xboxdrv/) support for the F310 was added in the 0.8.5 release. But when I downloaded the driver for the pi through apt-get the version was 0.8.4-1. Could it be that my particular gamepad driver just ISN'T THERE? And if it is so, is there any way I can add it?

welshy
Posts: 1667
Joined: Mon Oct 29, 2012 2:07 pm

Re: F310 controller issues.

Tue Oct 08, 2013 12:16 pm

Th3 W01f
Could be! You would have to download the source code for the drivers and compile them and install yourself. Have you checked the Forum via a search? I'm sure this has been reported before, it may give you some answers.
"The list of things I have heard now contains everything!"

outsider
Posts: 21
Joined: Tue Jul 03, 2012 2:16 pm

Re: F310 controller issues.

Thu Oct 10, 2013 8:45 am

You need the xpad driver, it isn't in the current kernel, but you can install 3.10 to get it to work: https://github.com/raspberrypi/linux/issues/187

regis57
Posts: 4
Joined: Tue Jul 22, 2014 2:47 am

Re: F310 controller issues.

Wed Jul 23, 2014 2:08 am

Hello,

Any news about this topic, how do you manage to get it works?
I am myself in same situation using RetroPie 2.3.

How do I push the 0.8.5 driver into my Rpi since the repository only have the 0.8.4.1?

Did you manage yourself to have it working?
how?

Th3 W01f
Posts: 9
Joined: Mon Oct 07, 2013 11:26 pm

Re: F310 controller issues.

Wed Jul 23, 2014 10:36 am

regis57 wrote:Hello,

Any news about this topic, how do you manage to get it works?
I am myself in same situation using RetroPie 2.3.

How do I push the 0.8.5 driver into my Rpi since the repository only have the 0.8.4.1?

Did you manage yourself to have it working?
how?
Sorry, but no. Tried to figure out the business with compiling the drivers at some point, but that proved too difficult for me, so I ended up buying an xbox 360 controller for PC. Perhaps someday they'll update the drivers and I'll be able to experience two player games in all their glory on the pi...

regis57
Posts: 4
Joined: Tue Jul 22, 2014 2:47 am

Re: F310 controller issues.

Wed Jul 23, 2014 11:58 am

40 SGD wasted -_- not much choice here. I do not have skills to compil stuff. I follow instructions and that's it.
it is not that easy for me to get gamepad in singapore... I will have to import from my hometown or order from china :(

Th3 W01f
Posts: 9
Joined: Mon Oct 07, 2013 11:26 pm

Re: F310 controller issues.

Wed Aug 27, 2014 9:08 pm

The issue has been solved on another F310 thread!
http://www.raspberrypi.org/forums/viewt ... 87#p436687
See mattc's post about upgrading the kernel.
I uninstalled 'xboxdrv' and removed its lines from '/etc/rc.local' to avoid the kernel modules being deactivated.
I then upgraded my kernel according to mattc's instructions.
After the reboot, I set my controller to XInput mode and plugged it in... And everything worked!
It shows up as js0 in '/dev/input/', running jstest on it shows all the controls are functioning properly.
MAME games work like a charm.

PS: Judging by the many controller related threads, people almost always use xboxdrv instead of the built in modules. How did the rarely used built in modules get updated first then?
Also, why does the controller only work in XInput? I thought that was a windows only thing...?

jaybird1905
Posts: 3
Joined: Mon Apr 13, 2015 8:18 pm

Re: F310 controller issues.

Mon Apr 13, 2015 8:24 pm

Th3 W01f wrote:The issue has been solved on another F310 thread!
http://www.raspberrypi.org/forums/viewt ... 87#p436687
See mattc's post about upgrading the kernel.
I uninstalled 'xboxdrv' and removed its lines from '/etc/rc.local' to avoid the kernel modules being deactivated.
I then upgraded my kernel according to mattc's instructions.
After the reboot, I set my controller to XInput mode and plugged it in... And everything worked!
It shows up as js0 in '/dev/input/', running jstest on it shows all the controls are functioning properly.
MAME games work like a charm.

PS: Judging by the many controller related threads, people almost always use xboxdrv instead of the built in modules. How did the rarely used built in modules get updated first then?
Also, why does the controller only work in XInput? I thought that was a windows only thing...?

Hey Wolf,

You reference setting your controller to XInput mode ... how exactly did you accomplish this?

I removed the lines from /etc/rc.local that load up the xbox controller drivers and updated my kernel. So I feel like I may be getting closer, but my F310 isn't working yet.

Thanks,
Jay

Return to “Gaming”