Xbox One controller via Bluetooth
-
The trick for me was to first spin up a Windows 10 VM, update it to Win 10 Anniversary Edition (required), and then update my controllers' firmware via the Xbox Accessories app.
I had to do that with my before it would work wirelessly with my PC. So weird that it only works with newest version of Win10!
Xbox One controller via Bluetooth
I didn't even realize the Xbox One controller was Bluetooth? I guess I assumed it used similar tech as the Xbox 360. I actually purchased a Microsoft Xbox Wireless Adapter for Windows ($25) which works great on my Desktop PC but its very awkward to plug into the RPi because of it's size and I don't think the RPi has enough juice to power it. It would never light up when holding down the make discoverable button.
I might have to try this again as Bluetooth!
What does it say for the Select button when you run:
jstest /dev/input/js0
And I also tried just mapping Select to a trigger or shoulder button, but this also doesn't register.
That is odd. That makes me think that the Select button on the controller isn't the problem.
What driver are you using?
Was there a walk-through that you followed?
-
jstest says driver version is 2.1. Is that what you are looking for? If you are asking whether I am using xpad or xboxdrv, I am using xpad.
Every single button responds in jstest, except for the Select button. I know the physical button is fine, because I swapped the controllers (one wired, one bluetooth) and the behavior follows whatever controller is wireless. It seems js0 following whatever controller is wired and js1 for wireless.
I do see that the button mapping is different for the same controller wired vs. wireless.
It does seem that the emulationstation Configure Input sensing the device as "Keyboard" if I press the Select button to start the config is key to this problem.
Btw, it may be only Xbox One controllers that have come out since the release of the Xbox One S console are bluetooth. Their labelling of models are not explicit. It certainly is slick to be able to use on board bluetooth though.. if I can crack this Select key nut!
-
@Dirtrider
It must have something to do with it thinking its a "Keyboard" and not a joystick. I wonder if there's a way to override it.I have the 2nd gen Xbox One controller with the 3.5 mm audio jack in the bottom. I couldn't get it to see it using Bluetooth so it must just be the S model that had Bluetooth.
-
Any progress on this? It's frustrating to be so close.
-
Any progress on this? It's frustrating to be so close.
I had the idea of plugging in the Microsoft Xbox Wireless Adapter for Windows into a powered USB hub but I can't find my hub to test it. My theory is that the RPi doesn't have enough power to power the adapter but a powered USB hub would.
If someone can test this, please let us know if this works.
-
Just reporting that I've also managed to get my Xbox One S Gamepad connected through bluetooth to the Retropie box. Been playing it in a few games (Super Mario Bros in NES and Bano Kazooie on mupen64plus). Some of the key mapping is a bit off in mupen64, since it's a non-lr emulator and so needs manual adjjustments on config files.
The othe problems are that the triggers aren't detected properly on controller setup, and I also encountered the "select" button issue above.
Lastly, it the bluetooth doesn't automatically sync or connect up on reboot, and needs to be manually done each time, and it seems a bit hit or miss each time you try to pair/connect the controller.
So there is progress. It is possible to get the Xbox One S Gamepad working via bluetooth in-game, but there are still kinks to be worked through.
-
@sos_retropie I was wondering if you could share the steps you needed to do in order to get the controller working :) thanks a million!
-
@sos_retropie I would also be interested ina step-by-step set of instruction. Been hitting various forums for a while now. This is the only one that comes close.
-
@rmgreene I just followed the instructions in the first post (edited the bluetooth configuration file to say "N").
- Edit as above
- Launch bluetooth configuration tool from the Emulation Station "Retropie" page
- Detect bluetooth devices
- The device "Xbox One S Wireless" should appear
- Select it - I think I was successful with the first pairing option. If not, keep trying - although it sometimes freezes your system and you have to reboot then start again from step #2
- Once paired, exit back to EmulationStation (don't reboot, or you'll lose the pairing).
- Try to configure your control in the usual fashion in Emulation Station. If your Xbox One S pad is successfully detected, it should work, although you have to fudge the "select button". And the triggers didn't work for me.
- If step 7 works, see if it'll play in a retroarch-capable emulator e.g. lr-glupen64.
Good luck & report back your successes / failures :)
-
I've also been trying to get my xbox one s controller connected and am having little luck.
- Update Controller (Win10 Accessories)
- in terminal: "sudo su"
- then "echo 1 > /sys/module/bluetooth/parameters/disable_ertm"
- Do as @rmgreene does above
Buttons "select" and the xbox button do not seem to register.
Buttons "right trigger"and "left trigger" do some wacky shit (assigns against one of the joystick axis' and then skips the next input....)
So I skip those 4 buttons.I can then use the controller.
Upon restart of the system, "/sys/module/bluetooth/parameters/disable_ertm" has set itself back to "N" and thus won't connect again.Can't seem to find anyone offering alternate solutions....
EDIT: I figured I better try plugging the controller in with USB and see whether it would recognise the device or allow mapping. It did not recognise it
-
I have got my controller working without any faff now. Only the "select" button will not map, but you can use a different input (i remove left thumb and used that for select).
If anyone is interested, give me a shout
-
@OurFriendIrony Yeah, I'm interested. How did you overcome the wacky triggers? Bypass them and use the shoulder buttons instead? How did you get it to recognise and reconnect each boot?
Although I'm perfectly happy with my X360 wireless controller, I would quite like to use (via bluetooth) the slightly nicer Xbox One S sitting on the shelf waiting.
-
@sos_retropie - No problem.
Force bluetooth param to allow pairing
Edit the file /opt/retropie/configs/all/autostart.sh to look like the following:
sudo bash -c 'echo 1 > /sys/module/bluetooth/parameters/disable_ertm' emulationstation #auto
This will stop the error when you try and connect your xbox one s bluetooth controller and insure that when your Pi turns on it will keep the paired device to sync.
Pair Controller
Use the normal mechanism to pair your bluetooth controller (Retropie >> Bluetooth >> Register)
Map Controller
So, baring in mind the Select button does not seem to register but select is typically an important button in games, pick now which button you would like to pretend to be the select button. I chose the left thumb stick button and will explain these steps as such. This set of instructions is a bit dramatic, but i spent about half an hour fighting this damn thing, so save yourself some pain and follow it.
Use the controller mapping feature on emulationstation (Start >> Input) and hold A on your controller.
Skip the following buttons:- select
- left trigger
- right trigger
- left bumper
- right bumper
- left thumb stick button
Now, before you select done, press up on the D pad and travel back up and perform the following actions in order:
- left thumb stick button skip
- right bumper hold right bumper for 2 seconds and let go
- left bumper hold left bumper for 2 seconds and let go
- right trigger hold right trigger for 2 seconds and let go
- left trigger hold left bumper for 2 seconds and let go
- select press left thumb stick in
Go back down to the done button and hit it.
I now have a controller that works perfectly and always connects.
-
@OurFriendIrony Thanks a lot! The controller now pairs at boot up, and after waking from sleep - a major step forward. It configures in ES just as you've outlined.
The only issue for me now is that the triggers (mapped OK in ES) and select button (mapped to left thumb in ES) don't want to work in PSX emulation. Haven't tried with other emulators yet, but will do so tonight.
The terminal / shell shows some error message that SDL doesn't recognise certain input keys, which seem likely the root of the problem, and suggests submitting the error to SDL developers.
Getting closer....
-
@sos_retropie
Damn, they seem to work in n64 emulation, ive been playing Majoras mask which maps somethings to the triggers.Let me know how it goes buddy! It'll be good to find a perfect solution, but at least you can use the controller.
Let me know if you find anything more
-
Help! Trying to get mine to work as well...
RP3B, Latest everything, Xbox One S controller, works wired.
So in the bluetooth settings in Retropie-Setup, it see the controller. When I try to pair it, it asks for a security type. I choose the first one, and I get:
"An error occured connecting to the bluetooth device (Creating device failed: org.bluez.Error.AlreadyExists: Already Exists)."
I tried the next security setting (keyboard something or other) and it errors out and drops me in bash.I tried the echo 1> ... as above, said that I had no permission, even with sudo. So I chmod disable_etrm to 777. Now I have permission, but I'm still not getting anywhere.
Advice? (I'm a linux noob).
-
Alright... so I was getting the prior error when I didn't first "remove" the device and try to re-discover it. After removing and re-discovering the controller (making sure the controller is in discover mode, obv), it drops me out to bash, and this is what I see (copied from a putty window):
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 604, in msg_r eply_handler
reply_handler(*message.get_args_list(**get_args_opts))
File "/home/pi/RetroPie-Setup/scriptmodules/supplementary/bluetooth/bluez-simp le-agent", line 118, in pair_reply
dev_connect(dev_path)
File "/home/pi/RetroPie-Setup/scriptmodules/supplementary/bluetooth/bluez-simp le-agent", line 38, in dev_connect
dev.Connect()
File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 70, in call
return self.proxy_method(*args, **keywords)
File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in call
**keywords)
File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call blocking
message, timeout)
dbus.exceptions.DBusException: org.bluez.Error.NotAvailable: Operation currently not available -
@hippoposthumous I'm not sure to be honest. I haven't made many more configurations/tweaks to any settings in retropie, but there may be a dependency/link to something else you've tweaked???
My permissions for the files in question are:
"autostart.sh" = 755
"disable_ertm" = 644I wonder if that has any impact?
-
@hippoposthumous You mentioned putty. Are you doing all this remotely? check the owner of the autostart and the disable_ertm files
autostart is "pi"
ertm is "root" -
Just a few more (positive) updates:
I now have my Xbox One S Wireless controller (h/w version 1708, latest firmware as of 3/2/17) working 100% in PSX and N64 emus.
For N64 emu, I use the non-lr mupen64plus, so I manually edited the mupen64plus.cfg file (/opt/retropie/configs/n64/) to get the mappings correct.
Similarly, I manually edited the PSX config (/opt/retropie/configs/psx/retroarch.cfg) and adjusted the player 1 input mappings to match what SDL is seeing (see below).
For me, the breakthrough was using 'jstest' to identify which buttons and axis were actually being detected by SDL, since the confusion seems to be how emulation station attempts but fails to correctly write the config for this controller via bluetooth. Of note, the 'select' button is the only button that is still not properly registered by SDL: in jstest, the select button on the controller gives a '@' symbol in the shell, rather than a value next to an axis or button).
The mappings I had for my h/w and firmware combo (and SDL 2.1) are:
On the controller: --> SDL Map:
Left analog stick U,D --> axis 0 (-1,+1)
Left analog stick L,R --> axis 1 (-1,+1)
Left shoulder button --> btn 6
Right shoulder button --> btn 7
Select (left small button) --> ERROR (so I use left joy button, 13)
Start (right small button) --> btn 11
A --> btn 0
X --> btn 3
B --> btn 1
Y --> btn 4
Left Trigger --> axis 5+/-
Right Trigger --> axis 4+/-
D-pad Left / Right --> axis 6- / 6+
D-pad Up / Down --> axis 7- / 7+
Right analog stick U,D --> axis 3 (-1,+1)
Right analog stick L,R --> axis 2 (-1,+1)
Left joy button --> btn 13
Right joy button --> btn 14
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.