-
Search Results
-
So… I am at my wits end.
I have been trying to get this controller working for 2 days and I just can’t figure out what I am doing incorrectly.
I started with a brand new 1.10.1 download and followed all of the directions here:
https://github.com/retropie/RetroPie-Setup/wiki/First-InstallationThen, I followed all of the directions here for enabling the controller:
Now, ES recognizes the controller and I can navigate with it, but the light continues to flash over and over again.
However, when I go to the panel and type in “sudo xboxdrv” i get this error:
Error couldn’t claim the USB interface: LIBUSB_ERROR_BUSY”It tells me to type in “rmmod xpad” and then run “sudo xboxdrv” again. Once I do, the single light comes on.
Now I have figured out that I need to blacklist xpad, but everything I’m finding online isn’t working; they just return different errors.
Thanks in advance!
Topic: Power Issues?
Hello everyone! I’m new to the RetroPie project. I obtained a Pi Model B Rev 2.0 earlier this week and have been playing around with this project with the 1.10.0 distro. I think it’s an awesome idea and can’t wait to get it all working. However, I’m stumbling into a problem that I think I might know the answer to. Just posting it here to confirm. I can get the Pi to bootup, load roms, configure a wired Xbox 360 controller and everything seems fine. When I launch a game in any emulator, the power seems to die on the USB bus. A wireless keyboard and mouse stop responding to the point where I can’t even turn the numlock/capslock/scroll lock lights on and the light goes out on the xbox 360 wired controller. I have a feeling that this might be a power issue. When I bought the Pi, it only came with a 600maH power supply. Could this be the problem? My next step is to try to pick up a new 1500maH power supply to see if it resolves the issue and even possibly pick up a certified powered USB hub. Thoughts?
Okay, so here’s what happened.
So, I start up my retropie for the first time, and the n64 usb controller works fine, it’s mappable, it’s configurable. Then, I rebooted it, in hopes of putting my roms onto it. My controller would no longer responding. Why is this happening?
So I was having trouble getting QtSixA to work, and I started looking for alternatives. I noticed that bluez has built-in sixaxis support since 5.12 or so and wanted to try it out. Unfortunately, raspian only comes with bluez 4.99, so I started working out how to install the newer version. I eventually got it working, and with recent kernel updates, it seems to be pretty solid.
Why use bluez vs qtsixa? A couple reasons:
– Bluez/kernel PS3 support is being actively developed, while qtsixa was discontinued in 2011 as far as I can tell.
– qtsixa requires running a command line utility to program the PS3 controller to talk to your bluetooth device. Plugging the controller back into the PS3 resets it, so if you switch it back and forth this can get annoying. Bluez will automatically do this programming in the background when you plug the PS3 controller into your raspberry pi, which is pretty convenient.Why not use bluez?
– It’s not officially supported by raspian, so there may be some compatibility/stability issues
– Bluez is a bit paranoid about security, and won’t automatically “trust” the PS3 controller until you do a manual pair. But you only have to do this once per controller; it doesn’t get reset if you plug the controller into the PS3.
– The player # light doesn’t seem to work properly with bluez. They just blink continuously. I think this is fixed with newer kernels but I wasn’t able to test.Anyway if you want to try it out, here’s what worked for me:
(Note, this all assumes that you already have your bluetooth dongle set up and working properly.)1) Update packages
sudo apt-get update sudo apt-get upgrade sudo apt-get install libusb-dev libdbus-1-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev
2) Download, & unpackage bluez
Get the latest from http://www.bluez.org/. As of right now, the latest is 5.19, so:
wget https://www.kernel.org/pub/linux/bluetooth/bluez-5.19.tar.xz tar xJvf bluez-5.19.tar.xz cd bluez-5.19
3) Configure and build bluez
You need to configure bluez to use the right directories for raspbian, and also enable the sixaxis plugin while disabling systemd
./configure --prefix=/usr --mandir=/usr/share/man \ --sysconfdir=/etc --localstatedir=/var \ --disable-systemd --enable-sixaxis make
4) Uninstall old bluez and install new
sudo apt-get remove --purge bluez sudo make install sudo install -v -dm755 /etc/bluetooth sudo install -v -m644 src/main.conf /etc/bluetooth/main.conf
5) Create init script to start bluetooth daemon on startup
This part is a little hacky. I modeled it after linux from scratch’s init script http://www.linuxfromscratch.org/blfs/view/svn/introduction/bootscripts.html
sudo nano /etc/init.d/bluetooth
Here’s what I ended up with:
#!/bin/sh . /lib/lsb/init-functions case "${1}" in start) start-stop-daemon --start --background --exec /usr/libexec/bluetooth/bluetoothd ;; stop) start-stop-daemon --stop --background --exec /usr/libexec/bluetooth/bluetoothd ;; restart) ${0} stop sleep 1 ${0} start ;; *) echo "Usage: ${0} {start|stop|restart}" exit 1 ;; esac exit 0
And make it start on startup
sudo update-rc.d bluetooth defaults
And reboot to try it out!
sudo reboot
On reboot, check if the daemon is running with
ps aux |grep bluetoothd
and you should see a line pointing to
/usr/libexec/bluetooth/bluetoothd
6) Set ps3 controller as trusted
First, plug your ps3 controller into the raspi’s USB to program the controller with your bluetooth dongle’s mac address. The bluetooth daemon with the sixaxis plugin should do this automatically. After a second, disconnect the USB.
However, before you can pair the sixaxis with the raspi for the first time, you have to tell bluez to trust it. If you’re running a GUI with a bluetooth agent, you can use that, but I was doing this all through the command line:
Make sure your bluetooth dongle is up and running, then:
sudo bluetoothctl agent on default-agent
Now for the moment of truth: press the PS button on your controller. Hopefully it pairs with your bluetooth dongle, and bluetoothctl will ask if you want to allow it. Say yes!
The quit bluetoothctl:
exit
Double check
/dev/input
too see if you have a joystick device. If so, you’re ready to go!7) Fix up device names in retropie configs
Finaly, check your retropie config files to make sure that the correct description “PLAYSTATION(R)3 Controller” is being used.
Specifically I had to modify
~/.emulationstation/es_input.cfg
to change<inputConfig type="joystick" deviceName="Sony PLAYSTATION(R)3 Controller">
to
<inputConfig type="joystick" deviceName="PLAYSTATION(R)3 Controller">
And modify
~/RetroPie/emulators/RetroArch/configs/PS3ControllerBT.cfg
to changeinput_device = "Sony Computer Entertainment Wireless Controller"
to
input_device = "PLAYSTATION(R)3 Controller"
But this might all depend on what version of retropie you have and what controllers you’ve used with it so far.
8) Enjoy!
Now you can switch your PS3 controller between the retropie and a PS3 willy-nilly. Just plug it into the retropie USB momentarily before attempting to pair it. Sometimes things are still a little wonky, but with the latest raspian kernel update it seems pretty smooth.
If you want to add another PS3 controller, you have to do step 6 for each one. But only once. I was able to get two controllers working without any trouble.
One warning: if you ever run the retropie update script, it will probably re-install the old bluez 4.99 for you. In that case you’ll have to do step 4 again.
EPILOGUE: Getting your bluetooth dongle to start up automatically.
I’m not sure if this is universal, but my bluetooth dongle didn’t automatically start on startup. I had to manually run
sudo hciconfig hci0 up
every time I rebooted, which was annoying. I eventually used advice from https://wiki.archlinux.org/index.php/bluetooth and got it to start up automatically by modifying/etc/udev/rules.d/10-local.rules
with the following lines:# Set bluetooth power up ACTION=="add", KERNEL=="hci0", RUN+="/usr/bin/hciconfig hci0 up"
With all this in place, I can enjoy a “headless” retropie bluetooth experience. Hooray!
Topic: Controller Help Needed
I have my raspi set up with retropie, powered off of an approved powered usb hub, and I’m trying to use custom controllers built with MC Cthulhu PCBs. The documentation says they should be plug and play on Linux, but retropie doesn’t seem to recognize them during the initial controller setup. I have verified that they are plug and play on windows PCs and my PS3, but I have no idea how to even see if Linux is even seeing them. They are plugged into the usb hub, so power to the cthulhus shouldn’t be an issue, and if I got into startx, my keyboard and mouse work through the hub, so I don’t think it’s that. I can’t find anyone using the pi and cthulhu together, can anyone help?
So I have been trying to set up RetroPie as outlined in a few threads I started. I have had several problems along the line – first, xboxdrv won’t work – in order to run it manually, I must run ‘rmmod xpad’ – then xboxdrv will start. The controller works without xboxdrv, but it never stops flashing the LEDs. When trying to set up the service, it kept complaining that a file was missing.
Probably the biggest problem – simply having my USB hub connected to the RPi will cause a Kernel Debug every time – It’ll just hang at the splash screen. I know know it’s crashing because I caught it once by switching to a second terminal screen while it was booting (Alt+F2). I ended up with a <kdb> and a lot of debug info.
I then loaded Raspian and started from there – it didn’t crash with my hub attached, I was able to get xboxdrv installed and ran properly as a service on boot – I then grabbed the RetroPie installer and ran that – the problem there is it seems a bunch of packages can’t be authenticated so they fail to install. I got the following message when trying to run emulationstation after installing all of the emulators: ‘/home/pi/RetroPie/supplementary/EmulationStation/emulationstation: error while loading shared libraries: libboost_filesystem.so.1.49.0: cannot open shared object file: No such file or directory’. Still got the message after installing ‘libboost-system-dev’ (which required that it either be run without the -y switch and be prompted to install, or use the –force-yes command to override the wanting about the packages that couldn’t be verified.
You probably should update the script to use the ‘–force-yes’ switch instead of the ‘-y’ switch so that required packages that can’t be verified still get installed…
When trying to setup my controllers, the D pad doesnt work. I think maybe right works, but nothing else. all the buttons work, this is on both player 1 and 2. I have usb snes adapters
Hi,
I’ve had a good search around but haven’t been able to find an answer, only 1 person with the same problem (http://www.raspberrypi.org/forums/viewtopic.php?t=45723). I’ve setup RetroPie following a guide and can play a game with a keyboard and have tried to get my 2 usb snes controllers working. After multiple deletes of cfg files and redoing the controller setups, I was able to get both controllers running Emulationstation correctly. Now the issue I have is in-game on both controllers, when I press the down key, it also registers a B button press. This first started in Emulationstation and after looking at the .emulationstation/es_input.cfg I found the B key was written as an axis and had the same value as the down axis, I renamed the B as a button and that fixed the problem in Emulationstation but then appeared in the snes emulator itself, even though the /home/pi/RetroPie/configs/all/retroarch.cfg is correct. Is there another .cfg file that may be interfering that I need to change also?
Here is a dump of my /home/pi/RetroPie/configs/all/retroarch.cfg file.
system_directory = /home/pi/RetroPie/BIOS
config_save_on_exit = “false”
video_threaded = true
video_smooth = false
video_aspect_ratio = 1.33
video_shader_dir = /home/pi/RetroPie/emulators/RetroArch/shader/
audio_out_rate = 44100
audio_driver = alsathread
input_autodetect_enable = “true”
joypad_autoconfig_dir = /home/pi/RetroPie/emulators/RetroArch/configs/
input_player1_a = x
input_player1_b = z
input_player1_y = a
input_player1_x = s
input_player1_start = enter
input_player1_select = rshift
input_player1_l = q
input_player1_r = w
input_player1_left = left
input_player1_right = right
input_player1_up = up
input_player1_down = down
input_exit_emulator = escape
input_shader_next = m
input_shader_prev = n
input_rewind = r
input_enable_hotkey = escape
rewind_enable = false
rewind_buffer_size = 10
rewind_granularity = 2
video_gpu_screenshot = true
input_player1_joypad_index = 0
input_player1_b_btn = 2
input_player1_a_btn = 1
input_player1_y_btn = 3
input_player1_x_btn = 0
input_player1_l_btn = 4
input_player1_r_btn = 5
input_player1_start_btn = 9
input_player1_select_btn = 8
input_player1_l_y_plus = -1
input_player1_up_axis = -1
input_player1_l_y_minus = +1
input_player1_down_axis = +1
input_player1_l_x_minus = -0
input_player1_left_axis = -0
input_player1_l_x_plus = +0
input_player1_right_axis = +0input_enable_hotkey_btn = 8
input_exit_emulator_btn = 9input_enable_hotkey_btn = 8
input_save_state_btn = 4input_enable_hotkey_btn = 8
input_load_state_btn = 5input_player2_joypad_index = 1
input_player2_b_btn = 2
input_player2_a_btn = 1
input_player2_y_btn = 3
input_player2_x_btn = 0
input_player2_l_btn = 4
input_player2_r_btn = 5
input_player2_start_btn = 9
input_player2_select_btn = 8
input_player2_l_y_plus = -1
input_player2_up_axis = -1
input_player2_l_y_minus = +1
input_player2_down_axis = +1
input_player2_l_x_minus = -0
input_player2_left_axis = -0
input_player2_l_x_plus = +0
input_player2_right_axis = +0input_enable_hotkey_btn = 8
input_exit_emulator_btn = 9input_enable_hotkey_btn = 8
input_save_state_btn = 4input_enable_hotkey_btn = 8
input_load_state_btn = 5I’m a bit of a noob so any help would be appreciated :)
Hey guys,
I´m running a RetroPie Raspberry Pi Rev. B with the Retropie GPIO Adapter and a SNES controller. Everything works just fine. Now I want to connect a PS3 controller via Bluetooth for PS and N64 games etc.. As Bluetooth dongle I´m using the ASUS BT 211 model and it is connected via powered a USB-HUB. I followed the installation guide, but I get an error while compiling Sixaxis:
pi@raspberrypi ~ $ cd QtSixA-1.5.1/sixad
pi@raspberrypi ~/QtSixA-1.5.1/sixad $ sudo make
mkdir -p bins
g++ -O2 -Wall -Wl,-Bsymbolic-functions sixad-bin.cpp bluetooth.cpp shared.cpp textfile.cpp -o bins/sixad-binpkg-config --cflags --libs bluez
-lpthread -fpermissive
sixad-bin.cpp: In function ‘int main(int, char**)’:
sixad-bin.cpp:84:20: warning: taking address of temporary [-fpermissive]
sixad-bin.cpp:89:18: error: ‘close’ was not declared in this scope
sixad-bin.cpp:100:20: error: ‘sleep’ was not declared in this scope
sixad-bin.cpp:109:22: error: ‘close’ was not declared in this scope
sixad-bin.cpp:117:22: error: ‘close’ was not declared in this scope
sixad-bin.cpp:140:18: error: ‘close’ was not declared in this scope
sixad-bin.cpp:144:14: error: ‘close’ was not declared in this scope
bluetooth.cpp: In function ‘void do_connect(int, bdaddr_t*, bdaddr_t*, int)’:
bluetooth.cpp:104:30: error: ‘close’ was not declared in this scope
bluetooth.cpp:110:24: error: ‘dup2’ was not declared in this scope
bluetooth.cpp:111:22: error: ‘close’ was not declared in this scope
bluetooth.cpp: In function ‘int l2cap_listen(const bdaddr_t*, short unsigned int, int, int)’:
bluetooth.cpp:148:17: error: ‘close’ was not declared in this scope
bluetooth.cpp:162:17: error: ‘close’ was not declared in this scope
bluetooth.cpp: In function ‘void l2cap_accept(int, int, int, int, int)’:
bluetooth.cpp:195:26: error: ‘close’ was not declared in this scope
bluetooth.cpp:201:26: error: ‘close’ was not declared in this scope
bluetooth.cpp:221:26: error: ‘fork’ was not declared in this scope
bluetooth.cpp:228:32: error: ‘dup2’ was not declared in this scope
bluetooth.cpp:229:30: error: ‘close’ was not declared in this scope
bluetooth.cpp:242:57: error: ‘execve’ was not declared in this scope
bluetooth.cpp:254:26: error: ‘close’ was not declared in this scope
bluetooth.cpp: In function ‘int l2cap_connect(bdaddr_t*, bdaddr_t*, short unsigned int)’:
bluetooth.cpp:274:25: error: ‘close’ was not declared in this scope
bluetooth.cpp:291:25: error: ‘close’ was not declared in this scope
make: *** [sixad_bins] Error 1Any ideas how to fix this error ?
The PS3 controller was also connected via the powered USB-HUB the whole time.