jasjeet
Posts: 90
Joined: Thu May 31, 2012 6:00 pm

Re: Xbox360 USB control pad

Thu Sep 27, 2012 11:07 pm

Once you use cd command to reach the directory that contains xboxdrv file run: sudo ./xboxdrv

teeth_03
Posts: 284
Joined: Sat Sep 08, 2012 12:02 am

Re: Xbox360 USB control pad

Thu Sep 27, 2012 11:24 pm

cool,that worked

except its Controller 3....

teeth_03
Posts: 284
Joined: Sat Sep 08, 2012 12:02 am

Re: Xbox360 USB control pad

Fri Sep 28, 2012 1:33 am

ok,so I just spent a while trying to get the driver to boot up automatically,and the boot wont continue after loading it,it just sits at "Press CTRL+C to Continue"

tried launching it directly from etc/init.d/rc.local
tried creating a script that loads it,initiated from rc.local
I used --silent
tried sudo and non sudo
made sure to use exit 0

I'm kind of stumped, but I think it has something to do with the fact the command is always getting launched with sudo access, and it needs non sudo to not get stuck, but I dont know to launch it without sudo automatically

jasjeet
Posts: 90
Joined: Thu May 31, 2012 6:00 pm

Re: Xbox360 USB control pad

Fri Sep 28, 2012 10:11 am

Create a script in the
/home/pi/xbox/ folder for example load.sh.
Inside paste the following

Code: Select all

!/bin/bash
cd /home/pi/xbox
xboxdrv --config /home/pi/xbox/mapping --silent
Then run: nano /etc/rc.local

Above exit 0, paste: /home/pi/xbox/load.sh

Save and reboot.

If you place a file called mapping in
/home/pi/xbox/ you can map the keyboard to Xbox pad controls

teeth_03
Posts: 284
Joined: Sat Sep 08, 2012 12:02 am

Re: Xbox360 USB control pad

Fri Sep 28, 2012 10:35 am

Thats essentially what i did....

jasjeet
Posts: 90
Joined: Thu May 31, 2012 6:00 pm

Re: Xbox360 USB control pad

Fri Sep 28, 2012 10:38 am

What happens if you run
Sudo ./load.sh
?

teeth_03
Posts: 284
Joined: Sat Sep 08, 2012 12:02 am

Re: Xbox360 USB control pad

Fri Sep 28, 2012 10:45 am

Basically, it kind of does the same thing if i launch it from terminal after it boots.

However, if i dont use sudo, i get a libusb error. But if i use sudo, it launches it fine, the controller connects, but it also stays at Press ctrl+c without returning to the prompt.

teeth_03
Posts: 284
Joined: Sat Sep 08, 2012 12:02 am

Re: Xbox360 USB control pad

Fri Sep 28, 2012 10:47 am

Actually, i could be wrong, i think sudo did return it to tge prompt. I messed with it for like 2 hours last night, and plan on continueing when i get home from work...

jasjeet
Posts: 90
Joined: Thu May 31, 2012 6:00 pm

Re: Xbox360 USB control pad

Fri Sep 28, 2012 10:52 am

You definitely need to run it with root privalages.

Try run chmod 777 * over the whole xboxdrv directory and your script file

teeth_03
Posts: 284
Joined: Sat Sep 08, 2012 12:02 am

Re: Xbox360 USB control pad

Fri Sep 28, 2012 9:52 pm

http://i40.photobucket.com/albums/e208/ ... 58_831.jpg
http://i40.photobucket.com/albums/e208/ ... 03_544.jpg

cell phone came crappy quality,but it shows the point

Basically,when I execute the script, or just the command, it launches, and the controller connects, but the driver will not exit or let me take control unless I hit ctrl+c to shut down the driver. The worst part is,is if I put it in a boot script,I can't even use ctrl+c to exit, it doesn't take me back to the prompt. I've been using a xubuntu boot CD to make changes when I break the Pi from booting.

I guess the driver itself is just not launching right for me...

Kean
Posts: 3
Joined: Sat Sep 22, 2012 3:57 pm

Re: Xbox360 USB control pad

Sat Sep 29, 2012 8:13 am

I'm hitting exactly this problem, too... adding the pi user to the root group doesn't appear to help, either. Neither does specifying --daemon.

Any ideas?

teeth_03
Posts: 284
Joined: Sat Sep 08, 2012 12:02 am

Re: Xbox360 USB control pad

Sat Sep 29, 2012 12:33 pm

I wonder if there is something wrong with the precompiled driver vs compiling it yourself. I havent seen anyone before me mention anything about this problem.

I went through and double checked the libraries, and they are all there.

I had to use libboost 1.49 because emulationstation requires the specific version. 1.48 and 1.50 will not work with both.

Kean
Posts: 3
Joined: Sat Sep 22, 2012 3:57 pm

Re: Xbox360 USB control pad

Sat Sep 29, 2012 4:48 pm

I did wonder the same.

I've just downloaded the latest stable source version of xboxdrv (0.6.6) and built from that, but get the same behaviour (when my pi boots it goes directly into capture mode, saying "Ctrl-C to cancel" and echoing the mapped input from the controller).

I have to believe I'm missing something obvious.

Kabbone
Posts: 2
Joined: Wed Jul 04, 2012 7:40 pm

Re: Xbox360 USB control pad

Sat Sep 29, 2012 8:43 pm

Try putting a "&" behind your command.

Kean
Posts: 3
Joined: Sat Sep 22, 2012 3:57 pm

Re: Xbox360 USB control pad

Sun Sep 30, 2012 8:05 am

Thanks - that worked. I knew it had to be obvious. :-)

Does anyone have advice on how best to get the Xbox 360 wired controller configured for EmulationStation/RetroArch? I've tried the standard EmulationStation first-run configuration as well as retroarch-joyconfig, but I haven't had much luck. Maybe someone has a pre-rolled cfg file they can share?

teeth_03
Posts: 284
Joined: Sat Sep 08, 2012 12:02 am

Re: Xbox360 USB control pad

Sun Sep 30, 2012 10:14 am

It didnt actually work for me, i tried putting the & at the end of the command in the script and in rc.local and it still ended up hanging at boot. But i was able to get it to work if i launch it manually after it boots, and messed with it for a while.

I can try posting my config if i have time. I used the tool found in retroarch-rpi/tools that can help you map the buttons, but you still need to manually edit the retroarch.cfg with them. The tool also didnt recognize all the buttons and axis, so i had to do some trial and error.





But iwas able to play a game of asteroids using the

teeth_03
Posts: 284
Joined: Sat Sep 08, 2012 12:02 am

Re: Xbox360 USB control pad

Sun Sep 30, 2012 10:16 am

Posting from phone, couldnt edit that last line.

I was saying i was able to play a game of asteroids with the left joystick mapped to the d pad and A as fire 8-)

Also, i briefly tried connecting a 2nd controller, and it seemed like it wouldnt connect. I restarted the rpi, and it actually connected before my first one, but then it wouldnt connect the other one, so only 1 at a time worked.

So how do i get more than one controller working?

teeth_03
Posts: 284
Joined: Sat Sep 08, 2012 12:02 am

Re: Xbox360 USB control pad

Tue Oct 02, 2012 12:55 am

I finally figured it out, used a few scripts to load it,but essentially,the command is:

sudo ./xboxdrv --wid 0 --silent & sudo ./xboxdrv --wid 1 --silent &

loads up the driver twice to look up 2 controllers. I didnt add the driver to autostart,but rather to the script I have that loads up emulationstation

petrockblog
Posts: 272
Joined: Wed Jul 04, 2012 6:12 am
Location: Germany
Contact: Website

Re: Xbox360 USB control pad

Wed Oct 03, 2012 7:13 pm

teeth_03 wrote:
I can try posting my config if i have time. I used the tool found in retroarch-rpi/tools that can help you map the buttons, but you still need to manually edit the retroarch.cfg with them. The tool also didnt recognize all the buttons and axis, so i had to do some trial and error.
Posting your config here would help a lot of people :-)
fun stuff for technics enthusiasts: www.petrockblock.com

alexcamp
Posts: 7
Joined: Wed Oct 10, 2012 12:32 am

Re: Xbox360 USB control pad

Wed Oct 10, 2012 12:39 am

I wonder if anyone can help

I have successfully setup the xboxdrv on my raspberry pi. Every input is being recognized and I tested it with the "showkey" command via ssh. For example, pressing "A" on the gamepad issues keycode 28, which is "Enter". Good!

The only thing, inside XBMC, absolutely nothing happens. Have you guys tested it on xbmc ?
I wonder if it's a settings issue inside XBMC or a bug?

Please help

Alex

Durazell
Posts: 31
Joined: Sun Aug 12, 2012 3:50 pm
Location: Finland

Re: Xbox360 USB control pad

Tue Oct 23, 2012 5:02 pm

Can you use this with any wireless receiver (dlink dwl-g132), or only the microsoft one? I've looked at this before but instructions tell to either pay 40€ for the microsoft receiver dongle or flash dvd drive and extract something from there to make controller work with pc.

BasicObject
Posts: 3
Joined: Thu Oct 11, 2012 12:45 am

Re: Xbox360 USB control pad

Sun Dec 02, 2012 4:14 am

I (and I'm sure others) would greatly appreciate if someone could post the Xbox 360 wired/wireless xboxdrv config files. I can get my Xbox 360 wired controller recognized by xboxdrv. But that's about it.

PoLiTvS
Posts: 4
Joined: Wed Jan 23, 2013 8:35 am

Re: Xbox360 USB control pad

Wed Jan 23, 2013 9:10 am

teeth_03 wrote:I wonder if there is something wrong with the precompiled driver vs compiling it yourself. I havent seen anyone before me mention anything about this problem.

I went through and double checked the libraries, and they are all there.
Raspbmc user here trying to use the precompiled driver with a classic XBox controller with no luck at all :(

I can use the mouse mode, but that's all. The controller gets recognized and I can see the info in the console (ssh) while I press buttons et al, but that's all...

Any hints?

User avatar
dudeman
Posts: 22
Joined: Sun Jan 20, 2013 1:20 am
Location: USA

Re: Xbox360 USB control pad

Fri Jan 25, 2013 2:41 am

Maybe you guys need to set up your xboxdrv-mouse.ini files? It is a manual process :(

http://pingus.seul.org/~grumbel/xboxdrv/

Adanteh
Posts: 2
Joined: Thu Dec 27, 2012 4:10 pm

Re: Xbox360 USB control pad

Sat Jan 26, 2013 9:28 pm

It's because of a faulty mapping file. I had the same issue here.

I'd recommend making a mapping file with the following code included. It's the default mapping that's included within xboxdrv. That should do the trick:

Code: Select all

# XBMC Configuration
# ==================
#
# This configuration file that with XBMC by emulating a wireless
# Xbox360 controller connected to the xpad kernel driver. It uses the
# configuration files that come with XBMC, so it should work out of
# the box without any further configuration of XBMC.
#
# 
[xboxdrv]
ui-clear = true
extra-devices=false
extra-events=false
deadzone=6000
device-name = "Xbox 360 Wireless Receiver"

[ui-buttonmap]
#A=BTN_A
A=KEY_ENTER
#B=BTN_B
B=KEY_BACKSPACE
X=KEY_X
Y=KEY_ESC

#Steuerkreuz Links macht A, Steuerkreuz Rechts macht B

#DU=BTN_0
DU=KEY_UP
#DD=BTN_1
DD=KEY_DOWN
#DL=BTN_LEFT
DL=KEY_LEFT
#DR=BTN_RIGHT
DR=KEY_RIGHT

START=BTN_START
GUIDE=BTN_MODE
BACK=BTN_BACK

LB=BTN_TL
RB=BTN_TR

#TL=BTN_THUMBL
TL=BTN_RIGHT
#TR=BTN_THUMBR
TR=BTN_LEFT
RT=KEY_EQUAL
LT=KEY_MINUS

[ui-axismap]
#x2=REL_RX:10
#y2=REL_RY:-10

x1=REL_X:10
y1=REL_Y:10


# The resp filter moves the neutral position to zero to work around a
# bug in XBMC, that causes bogus events when neutral position is
# elsewhere. It loses a bit of precision in the trigger as result, but
# that isn't noticable.
LT^resp:127:255=ABS_Z
RT^resp:127:255=ABS_RZ

# EOF #

Return to “Gaming”