culbe
Posts: 4
Joined: Fri Dec 28, 2012 5:26 pm

Logitech USB Gamepad F310

Fri Dec 28, 2012 6:19 pm

hey I'm relatively new to hacking around on this thing, but I've at least got EmulationStation working pretty well and I'd like to get a gamepad working with it.

http://www.logitech.com/en-us/product/gamepad-f310

This is the pad I've got lying around. At first, I couldn't get it to show up under /dev/input but now it seems to come up no problem. I didn't do anything differently either, just kept rebooting/unplugging/plugging back in.

So now it's seeing the pad, but when I run jstest for a simple input test I'm not getting anything. What is weird is that at first I could press the MODE button and have the LED next to it light up, but now this is not working. Also, if the switch on the back is in "x input mode" then the gamepad doesn't show up, it needs to be in "direct input mode".

Still, even with it in the correct mode and the RPi recognizing the gamepad, I can't get jstest to receive anything from the device. I'm begging to think I may need a powered hub for this to work properly? Are there any gamepads that will work without having to do this?

Any help is appreciated.

6677
Posts: 386
Joined: Wed Mar 14, 2012 9:23 pm

Re: Logitech USB Gamepad F310

Sat Dec 29, 2012 5:35 pm

XInput is a windows only thing, that wont work on the pi.

Anyway, have you connected to controller directly to the pi or have you used a powered hub? My xbox 360 wired controller draws 400mA of current, the pi can barely sustain a little over 100mA.

culbe
Posts: 4
Joined: Fri Dec 28, 2012 5:26 pm

Re: Logitech USB Gamepad F310

Sun Dec 30, 2012 1:18 am

Unfortunately I do not have a hub to use. Does your wired Xbox controller not work plugged directly into the RPi? Are there any options for a controller that don't require a powered hub? If it can run a keyboard why not a controller? What is the difference?

6677
Posts: 386
Joined: Wed Mar 14, 2012 9:23 pm

Re: Logitech USB Gamepad F310

Sun Dec 30, 2012 12:16 pm

most keyboards only draw a small handful of mA, even them hitting 50 would be rare (unless they are backlit). I believe the USB host makes a request to the keyboard which then just returns the state of a small multiplexer formatted correctly, specifically on USB it is limited to just 5 keys. A gamepad has alot more logic going on reading the thumbstick pots etc, how they hit 400mA is beyond me though, seems more likely that the sticker on wired controllers should have been on the wireless ones.

Either way there are 2 solutions.

a) get a powered USB hub, its basically a necessity for the pi.

b) get a powered USB cable. They look like regular USB cables but have 2 connectors, one for data and one for power, you connect data to the pi, power to something like a phone or ipod charger (any mains adaptor with a USB port on it). You may need another adaptor to convert whatever connector the cable has to be a USB socket to connect to controller too. Its alot messier than just getting a powered hub.

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

Re: Logitech USB Gamepad F310

Thu Jan 03, 2013 5:03 pm

I have the same gamepad, how did you get it to appear in /dev/input? I can't even get that to happen.

6677
Posts: 386
Joined: Wed Mar 14, 2012 9:23 pm

Re: Logitech USB Gamepad F310

Fri Jan 04, 2013 6:24 pm

Move the switch on the back from x input to direct input and ensure it has enough power.

fazdogg
Posts: 3
Joined: Fri Jan 11, 2013 7:55 pm

Re: Logitech USB Gamepad F310

Fri Jan 11, 2013 7:58 pm

Bought this gamepad yesterday and have been having the same problems. However I have tried using a USB hub and it wont even appear in /dev/input when plugged into the hub. When directly connected to the Pi it appears after a few restarts but retroarch-joyconfig doesnt get any input from it. and if plugged into the hub, it wont even be detected by the Pi. Really hoping there is a fix and I didn't just waste 30$

Rev Andy
Posts: 1
Joined: Wed Apr 18, 2012 1:52 pm

Re: Logitech USB Gamepad F310

Tue Mar 05, 2013 11:24 am

I am having the same problem - the Pi won't even see the gamepad. It's not looking good is it?

tofuprod
Posts: 4
Joined: Wed Feb 20, 2013 6:26 pm

Re: Logitech USB Gamepad F310

Mon Mar 25, 2013 8:57 pm

Has anyone figured this one out? :?

Tubbykiller
Posts: 1
Joined: Thu Apr 04, 2013 9:40 am

Re: Logitech USB Gamepad F310

Thu Apr 04, 2013 9:49 am

So...

I have the same problem as mentioned above. To summarize:
- gamepad switched to direct input
- gamepad connected to Pi via powered USB hub (same setup tested on a windows PC, gamepad gets enough power=
- gamepad sometimes does and sometimes doesn't show in dev/input
- even when it does show up in dev/input (and is correctly displayed by lsusb), pushing buttons on the gamepad will not result in any input to the Pi, for example when trying to set up the gamepad using retroarch-joyconfig

To me, this seems to be a hardware issue of some kind, or an issue of the OS. Usually generic gamepads like the F310 should work fine under linux...

Is there anybody out there who is not a total linux noob like me and has an idea how to fix this?

JDSunny46
Posts: 2
Joined: Tue May 07, 2013 11:02 pm

Re: Logitech USB Gamepad F310

Tue May 07, 2013 11:05 pm

I'm having similar issues.

When I plug the gamepad into a windows computer for the first time, I can't get the mode light to come on until after the driver installs.

I'll bet this thing needs a driver like the xbox gamepad.

GregTheHun
Posts: 1
Joined: Fri May 10, 2013 5:54 am

Re: Logitech USB Gamepad F310

Fri May 10, 2013 5:56 am

Has anyone solved this yet?

I have the same controller and would like to not have to buy a new one.

Thanks in advance. ^_^

JDSunny46
Posts: 2
Joined: Tue May 07, 2013 11:02 pm

Re: Logitech USB Gamepad F310

Fri May 10, 2013 3:02 pm

I got as far as getting the controller to be recognized by the pi, I can run the joystick configs, but when I run configs in GUI mode or when I try to configure for emulation station, no key presses are identified by the software.

I'm trying to find a suitable driver. Otherwise, I return this controller and get a non Logitech.

milkmandan
Posts: 9
Joined: Thu Jun 06, 2013 12:07 am

Re: Logitech USB Gamepad F310

Thu Jun 06, 2013 12:14 am

Still no solution for this? I don't have xbox controllers, so I can't install xboxdrivers.
JDSunny46 wrote:I got as far as getting the controller to be recognized by the pi, I can run the joystick configs, but when I run configs in GUI mode or when I try to configure for emulation station, no key presses are identified by the software.

I'm trying to find a suitable driver. Otherwise, I return this controller and get a non Logitech.
If you had to get non-Logitech gamepads that works out of the box with the RPi, what would you get?

I have the dual action logitech gamepad, and I just bought a Raspberry Pi for the intent of an emu station. Am I also going to run into controller problems?

User avatar
Aloshi
Posts: 359
Joined: Sat Jun 23, 2012 6:42 pm

Re: Logitech USB Gamepad F310

Thu Jun 06, 2013 11:16 am

This might sound crazy, but has anyone tried setting it to XInput and then running xboxdrv (the xbox controller driver)?

6677
Posts: 386
Joined: Wed Mar 14, 2012 9:23 pm

Re: Logitech USB Gamepad F310

Fri Jun 07, 2013 9:08 am

milkmandan wrote:Still no solution for this? I don't have xbox controllers, so I can't install xboxdrivers
I am failing to see your logic here. The drivers for the Xbox controllers on pi are a free download.

Someone should test the f310 with the switch on xinput and the Xbox drivers actually.

That said, was over on some android forums the other day and they are also having issues with the f310, someone else mentioned that it wouldn't work on his Linux desktop either. Seems to be a general case of f310 disliking Linux.

AlexWKUF
Posts: 3
Joined: Tue Jul 02, 2013 4:51 am

Re: Logitech USB Gamepad F310

Tue Jul 02, 2013 4:59 am

I've gotten it working - and it plays awesome. :) I'll do a full write up in a little bit, I just need to clean up my setup.
In short you, you are all correct. You need to have the latest version of xboxdrv (not the version available through apt-get; you will need to build from the latest source), a powered USB hub, and have the switch set the "X" mode.
If you want to use it with dgens, you either need to wait for version 1.33, or apply each of the patches (in order) on this page: https://sourceforge.net/p/dgen/bugs/18/

ke0kie
Posts: 3
Joined: Sat Jul 06, 2013 7:50 pm

Re: Logitech USB Gamepad F310

Mon Jul 15, 2013 7:48 pm

AlexWKUF wrote:I've gotten it working - and it plays awesome. :) I'll do a full write up in a little bit, I just need to clean up my setup.
In short you, you are all correct. You need to have the latest version of xboxdrv (not the version available through apt-get; you will need to build from the latest source), a powered USB hub, and have the switch set the "X" mode.
If you want to use it with dgens, you either need to wait for version 1.33, or apply each of the patches (in order) on this page: https://sourceforge.net/p/dgen/bugs/18/
This sounds promising...For the non linux-guru (me), could you put a step-by-step tutorial on how to accomplish this?

I wish I knew more about writing scripts, it would be nice to have a "Logitech F310 + Pi" driver-install script.

I so want to get my Logitech F310 controller s working with Retro Pie !!!!

--Scott

LoopHoles
Posts: 2
Joined: Tue Sep 10, 2013 5:10 pm

Re: Logitech USB Gamepad F310

Tue Sep 10, 2013 5:16 pm

Hi all,

Any news on the recipe for the F310 controller?
I tried to build the latest xboxdrv 0.85 but I got swp {b} warnings...

BR

LoopHoles
Posts: 2
Joined: Tue Sep 10, 2013 5:10 pm

Re: Logitech USB Gamepad F310

Tue Sep 10, 2013 5:21 pm

Hi,

Any news about the recipe? ...I got issue while building the 0.85 version with scons : swp {b} usage depricate

cohiba
Posts: 1
Joined: Sun Oct 06, 2013 2:15 am

Re: Logitech USB Gamepad F310

Sun Oct 06, 2013 2:18 am

Anything on this?

New user here and I would love to see an actual step by step with this issue since im trying to get up to speed

any help would be appreciated

thanks

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

Re: Logitech USB Gamepad F310

Sun Oct 06, 2013 9:31 am

Guys
I think this has been confirmed elsewhere on the Forum that the xbox360 drivers and set up work with the Logitech F310, following the instructions

Here - https://github.com/petrockblog/RetroPie ... controller

If you are not using RetroPie only the driver install and rc.local file changes are required, all other emulators should work effectively using this set-up.
"The list of things I have heard now contains everything!"

mattc
Posts: 8
Joined: Fri Oct 11, 2013 2:27 am

Re: Logitech USB Gamepad F310

Fri Oct 11, 2013 2:50 am

I got my set of 4 Logitech F310 working on my pi, all connected through my d-link DUB-H7 powered usb hub.

My pi is running Raspbian. I had to download the following packages:

Code: Select all

sudo apt-get install libboost-all-dev scons libusb-1.0.0-dev libx11-dev libudev-dev x11proto-core-dev libdbus-glib-1-dev
and then I downloaded the latest xboxdrv source from here:

Code: Select all

wget http://pingus.seul.org/~grumbel/xboxdrv/xboxdrv-linux-0.8.5.tar.bz2
and then extracted the file and compile the whole thing:

Code: Select all

tar xjvf xboxdrv-linux-0.8.5.tar.bz2
cd xboxdrv-linux-0.8.5.tar.bz2
scons
Almost took 2h to compile, so be patient.

After it was done compiling, I installed it on my system

Code: Select all

sudo make install
and then had to edit my modules files as root:

Code: Select all

sudo nano /etc/modules
And added 'uinput' to the list of modules.

Code: Select all

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.

snd-bcm2835
uinput
Then I had to edit the /etc/rc.local as root:

Code: Select all

sudo nano /etc/rc.local
and here is how my file look now

Code: Select all

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi

/usr/local/bin/xboxdrv --id 0 --deadzone 4000 --silent &
sleep 1
/usr/local/bin/xboxdrv --id 1 --deadzone 4000 --silent &
sleep 1
/usr/local/bin/xboxdrv --id 2 --deadzone 4000 --silent &
sleep 1
/usr/local/bin/xboxdrv --id 3 --deadzone 4000 --silent &
sleep 1

exit 0
After rebooting, I can see js0, js1, js2 and js3 in /dev/input:

mattc
Posts: 8
Joined: Fri Oct 11, 2013 2:27 am

Re: Logitech USB Gamepad F310

Fri Oct 11, 2013 6:06 pm

Unfortunately, xboxdrv seem to consume a lot of CPU, even with the --silent flag.

When idle, all 4 instance of xboxdrv consume 2.3% each (9.2% total)

And when the analogue sticks are used, they all climb up to 15%-18% each (60%-72% total), which leaves not enough resource for my project.

When I try connecting these 4 logigetch f310 on my laptop, which runs on Ubuntu 12.04LTS, they don't even need the xboxdrv and they don't seem to consume any CPU at all.

I really wish there was an easy solution. xboxdrv works great, but it's too expensive on my pi.

mattc
Posts: 8
Joined: Fri Oct 11, 2013 2:27 am

Re: Logitech USB Gamepad F310

Sat Oct 12, 2013 8:14 pm

I upgraded my kernel on raspbian to the latest (3.10.15+ in my case) using this command

Code: Select all

sudo BRANCH=next rpi-update


Now, the four logitech f310 works with built-in kernel modules. No need to build xboxdrv with this solution, and the cpu usage raises to only 5.2% when all four gamepads axis are all moving at the same time.

Return to “Gaming”