Xbox One S controllers

Hello everyone, I was wondering if anybody has had luck connecting the new Xbox one s Bluetooth controller to Lakka using Bluetooth? I tried disabling the Bluetooth ertm and it still didn’t work. I’m running Lakka 2.1rc5 on a tinkerboard and also Lakka 2.1 x64 on a pc and I can’t get the controller to connect.

1 Like

Hi,

Please provide some log at least dmesg and lsusb output.

Why did you disable bluetooth service if you need to use bluetooth ?

Thank you.

I followed the instructions in this post https://www.reddit.com/r/Lakka/comments/6qvy2y/is_the_xbox_one_s_gamepad_working_with_bluetooth/ Since it wasn’t working the regular way. I fixed it and now it works. The instructions were missing part of the command on the autostart.sh file. Thank you for the reply though.

Glad it works ! Thank you for the tips ! Add to /storage/.config/autostart.sh

echo 1 > /sys/module/bluetooth/parameters/disable_ertm

The whole line should be

bash -c ‘echo 1 > /sys/module/bluetooth/parameters/disable_ertm’

Hello,

I managed to connect my ‘Xbox Wireless Controller’ to a raspbery pi 3 running Lakka 2.1, but when I use the direction cross in the menu, it behaves as if the inputs were repeated twice. A short pression of the cross jumps over the menu enties. Note that the controller behaves correctly when connexted via USB.

Does anyone know how to debug this?

Mine did the same thing, I fixed it by rebinding the keys using a keyboard to navigate the menu. Here’s my config file put it in “Joypads>udev” if the udev folder is not there create it. https://www.dropbox.com/s/rlt270qm8mtg5ax/Xbox%20Wireless%20Controller.cfg?dl=0

Some keys won’t register but I got my keys with jstest and saved the config file.

Hi. I am a novice. I need help. I am a U disk boot lakka, my windows adapter does not recognize, did not start, I use the xbox one handle and Lakka-Generic.x86_64-2.1.img. Platform is PC. The original system is win10, xbox one handle no problem. Is lakka does not support xbox one, or need to change other settings Thank you.

Are you using the new Xbox one Bluetooth controllers? I don’t have the original controllers so I can’t help with the adapter problem sorry…

Yes . I am using the new Xbox one Bluetooth controllers. Thanks for your reply. Where can I get the answer?_7$($F5$YT6W9J7$OFDBF%U

If your controllers are the bluetooth version you do not need the wireless adapter.

First add the following line to your autostart.sh file located in /storage/.config/autostart.sh

bash -c ‘echo 1 > /sys/module/bluetooth/parameters/disable_ertm’

Then you connect them using the same procedure as a PS4 controller following the instructions on this link.

http://www.lakka.tv/doc/Wireless-Dualshock/

1 Like

@mataisma With me being the noob I am, could you explain what did or how you got into “/storage/.config/autostart.sh”?

I used WinSCP to connect and I went into “/Storage/.config” and there was no “autostart.sh” file there. Again, I’m new here and I’ve been reading up on the FAQ’s and looking up a bunch of terms I don’t know still.

I’ve connected A dualshock 4 controller before so I got that part down.

(I’m running the latest version of Lakka on a bootable USB through my Laptop if that helps)

If the “autostart.sh” file is not there you have to create it.

1 Like

It worked, it’s connected but now when it connects and says it’s configured, it’s impossible to navigate though the UI. Whenever I try to move up or down using D-pad or joystick it would skip to the last selection and I can’t manually configure it because it’s the same thing when i try to navigate using keyboard keys. but then it’s fine when the controller is disconnected. Does it have something to do with the authorizing of the controller?

The autoconfig file on mine had the keys all messed up on my system that’s why it acted crazy. I linked my configuration file a post above try it and hope it works.

1 Like

If only I could read the posts prior :stuck_out_tongue_closed_eyes: got it working thank you so much :grin:

Hello,

in first my english is not so good.

I installed Lakka on my Raspberry 3. All works good but my xbox one s controller with Bluetooth not works.

On my Windows PC i installed WinSCP but in the Directory storage i dont found the directory .config or autostart.sh

What can i do?

Greets

Alec

@alecgreat, I’m not familiar with WinSCP myself, but I do know that on linux (which is what Lakka runs on), any file or folder starting with a “.” is considered to be a “hidden” file/folder. You’ll need to tell WinSCP to show hidden files and folders in order to see it, or just manually navigate to it (it’s there, it just isn’t visible).

Now for an issue I had: autostart.sh is apparently no longer called by default in Lakka - at least it wasn’t on my Lakka installation (on an odroid xu4). As a fix to this, knowing that on all but a select few systems Lakka uses systemd, I made a systemd unit that calls a script to disable ertm:

Service file

Script

Place the service file in /storage/.config/system.d and place the script in /storage/.config and chmod +x the script or otherwise make it executable (as with any script, have a look at it first to make sure it isn’t doing anything it shouldn’t be).

–Arek

P.S. Is there any reason a Lakka box might actually need bluetooth ERTM? If not, perhaps this, along with a working config file for xbox one bt controllers, could be put in a future version of Lakka?

2 Likes

Hi, just so people can see step by step, first ensure you have a bluetooth xbox controller and get a bluetooth wireless adapter (if needed) that is supported by Linux drivers e.g. this one works according to Amazon

Then, follow the commands to start bluetoothctl and enable pairing and discovery as documented: http://www.lakka.tv/doc/Wireless-Dualshock/

Then, here’s is what happens if you try to connect (it fails):

[bluetooth]# info C8:3F:26:5D:C5:51
Device C8:3F:26:5D:C5:51
        Name: Xbox Wireless Controller
        Alias: Xbox Wireless Controller
        Class: 0x00000508
        Icon: input-gaming
        Paired: no
        Trusted: no
        Blocked: no
        Connected: no
        LegacyPairing: no
[bluetooth]# trust C8:3F:26:5D:C5:51
[CHG] Device C8:3F:26:5D:C5:51 Trusted: yes
Changing C8:3F:26:5D:C5:51 trust succeeded
[bluetooth]# pair C8:3F:26:5D:C5:51
Attempting to pair with C8:3F:26:5D:C5:51
[CHG] Device C8:3F:26:5D:C5:51 Connected: yes
[CHG] Device C8:3F:26:5D:C5:51 ServicesResolved: yes
[CHG] Device C8:3F:26:5D:C5:51 Paired: yes
Pairing successful
[CHG] Device C8:3F:26:5D:C5:51 ServicesResolved: no
[CHG] Device C8:3F:26:5D:C5:51 Connected: no
[bluetooth]# connect C8:3F:26:5D:C5:51
Attempting to connect to C8:3F:26:5D:C5:51
Failed to connect: org.bluez.Error.Failed
[CHG] Device C8:3F:26:5D:C5:51 Connected: yes
[CHG] Device C8:3F:26:5D:C5:51 Connected: no
[bluetooth]# info C8:3F:26:5D:C5:51
Device C8:3F:26:5D:C5:51
        Name: Xbox Wireless Controller
        Alias: Xbox Wireless Controller
        Class: 0x00000508
        Icon: input-gaming
        Paired: yes
        Trusted: yes
        Blocked: no
        Connected: no
        LegacyPairing: no

Here is my controller info:

[bluetooth]# show
Controller 00:1A:7D:DA:71:13
        Name: %h
        Alias: %h
        Class: 0x0000010c
        Powered: yes
        Discoverable: yes
        Pairable: yes
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        Modalias: usb:v1D6Bp0246d052F
        Discovering: no

However, disable “ertm” ( enhanced retransmission mode) as folks have mentioned and everything works magically: echo 1 > /sys/module/bluetooth/parameters/disable_ertm

[bluetooth]# info C8:3F:26:5D:C5:51
Device C8:3F:26:5D:C5:51
        Name: Xbox Wireless Controller
        Alias: Xbox Wireless Controller
        Class: 0x00000508
        Icon: input-gaming
        Paired: no
        Trusted: no
        Blocked: no
        Connected: no
        LegacyPairing: no
        UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
[bluetooth]# trust C8:3F:26:5D:C5:51
[CHG] Device C8:3F:26:5D:C5:51 Trusted: yes
Changing C8:3F:26:5D:C5:51 trust succeeded
[bluetooth]# pair C8:3F:26:5D:C5:51
Attempting to pair with C8:3F:26:5D:C5:51
[CHG] Device C8:3F:26:5D:C5:51 Connected: yes
[CHG] Device C8:3F:26:5D:C5:51 Modalias: usb:v045Ep02E0d0903
[CHG] Device C8:3F:26:5D:C5:51 UUIDs: 00001124-0000-1000-8000-00805f9b34fb
[CHG] Device C8:3F:26:5D:C5:51 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device C8:3F:26:5D:C5:51 ServicesResolved: yes
[CHG] Device C8:3F:26:5D:C5:51 Paired: yes
Pairing successful
[CHG] Device C8:3F:26:5D:C5:51 ServicesResolved: no
[CHG] Device C8:3F:26:5D:C5:51 Connected: no
[bluetooth]# connect C8:3F:26:5D:C5:51
Attempting to connect to C8:3F:26:5D:C5:51
[CHG] Device C8:3F:26:5D:C5:51 Connected: yes
Connection successful
[CHG] Device C8:3F:26:5D:C5:51 ServicesResolved: yes

great, so how to persist these changes?

If you use the above methods, you might see autostart.sh possibly encountering errors. To check, look at the status of the autostart.sh:

systemctl status retroarch-autostart

Lakka sh[356]: /storage/.config/autostart.sh: line 2: can’t crea te /sys/module/bluetooth/parameters/disable_ertm: nonexistent directory

and check the status of ertm (“N” means not disabled): cat /sys/module/bluetooth/parameters/disable_ertm

If you get an error like above, then similar to @Arek75 I created the following service, to be placed in: /storage/.config/systemd/bluetooth.target.wants/bluetooth-disable-ertm.service:

[Unit]
Wants=bluetooth.service
After=bluetooth.service

[Service]
ExecStart=/bin/sh -c 'Y > /sys/module/bluetooth/parameters/disable_ertm 2>&1'

[Install]
WantedBy=bluetooth.target

just to be safe: chmod 775 /storage/.config/system.d/bluetooth.target.wants/bluetooth-disable-ertm.service

You should test running it and verify it toggles the setting from “N” to “Y”:

systemctl start bluetooth-disable-ertm
systemctl status bluetooth-disable-ertm

You should see:

Process: 754 ExecStart=/bin/sh -c Y > /sys/module/bluetooth/parameters/disable _ertm 2>&1 (code=exited, status=127) Main PID: 754 (code=exited, status=127)

So as long as ertm gets disabled on bluetooth becoming active, you should be able to connect wirelessly after rebooting again and again!