Bluetooth no longer working after fresh install
-
I can confirm I am having this same issue. I built a RetroPie system for a friend this weekend and ran into the same issue.
Pi Model or other hardware: Pi 3B+
Power Supply used: Official Power Supply
Built From: 4.4 SD Image from retropie.org.uk
USB Devices connected: keyboard
Controller used: 8bitdo SF30 ProAfter the initial installation I ran the updates to both the RetroPie script and the system updates. Installed a few emulators and Steven Selph's scraper. When I went to add the controller it just hangs on searching. In an effort to troubleshoot I checked my build, which I also ran the updates on, and it hangs on searching too.
To troubleshoot I took another SD card, loaded the same image, and then tested BT after every change. It was fine through everything, including running system updates outside of ES, updating packages (core, main and optional) and updating the raspi-config tool. As soon as I updated the RetroPie setup script it would break BT.
The only thing I could find with similar issues had PS3 controllers installed. This was a fresh install from the official image so I was stumped. I believe it's something with the RetroPie script.
I didn't get as far as actually adding the controller through connect all registered and connected devices but it did find all the BT devices.
-
I don't have this particular controller, so this may not be very useful. You have latest firmware and powered on in the right mode before registering?
-
Yes. But, I don't believe the controller is the issue. It hangs on searching and never gets to the list of devices to register. I let it search for about 15 minutes just to see if it would get past it. Obviously, it doesn't.
-
@snoogans would be better to start new topic. Different controller. I have your controller btw and it works on latest. Get 4.1 firmware though.
-
I can do that, but my it works in my build too. But, it was already registered before the updates. Try and add a new device and if it makes it past searching I will start a new thread.
-
@snoogans I re-added my fc30 pro last week after updating them. There was a bug with Bluetooth gui returning to main menu after scanning. That's fixed now though so make sure you have retropie 4.4.8
-
Sorry to tag you @psyke83 - anything related to PS3 changes you can think of that might affect this? You are more familiar with the stack than me.
-
@charleszimm said in Bluetooth no longer working after fresh install:
98:B6:E9:42:4B:35
Can you paste the output of
info 98:B6:E9:42:4B:35
in bluetoothctl?If it says "Trusted: no", try manually trusting via
trust 98:B6:E9:42:4B:35
as well, and then check theinfo
again to see if trust is enabled (and let us know whether that makes the controller start working). -
I just verified that I have the latest firmware for the controller, 1.29, and the Retropie setup script is 4.4.8. It hangs on searching.
-
@snoogans the latest firmware is 4.1 for fc30 pro. Their support site is a bit confusing though.
-
@snoogans try disabling PS3 driver first btw. If that's enabled.
-
@psyke83 Wasn't trusted but behaving the same way:
[bluetooth]# info 98:B6:E9:42:4B:35
Device 98:B6:E9:42:4B:35
Name: Pro Controller
Alias: Pro Controller
Class: 0x002508
Icon: input-gaming
Paired: yes
Trusted: no
Blocked: no
Connected: no
LegacyPairing: no
UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
Modalias: usb:v057Ep2009d0001
[bluetooth]# trust 98:B6:E9:42:4B:35
[CHG] Device 98:B6:E9:42:4B:35 Trusted: yes
Changing 98:B6:E9:42:4B:35 trust succeeded
[CHG] Device 98:B6:E9:42:4B:35 Connected: yes
[CHG] Device 98:B6:E9:42:4B:35 Connected: no
[CHG] Device 98:B6:E9:42:4B:35 Connected: yes
[CHG] Device 98:B6:E9:42:4B:35 Connected: no -
I'd first like to know why the "Register" option is getting stuck in a loop; I suspect that it's caused by bluetoothctl constantly reporting your device "Connected: xxx" non-stop.
Try to remove the offending device (either via the menu option or manually in
bluetoothctl
), then let me know if the "Register and Connect" option works (or at least progresses to the list of devices after 20 seconds without having to be interrupted). -
@psyke83 okay I’ll give that a shot. Don’t be alarmed if I don’t get back to you for a few hours since my calendar is pretty full today. Thanks for your help!
-
@psyke83 Okay finally got to it. Sorry for the delay.
When I went to remove the controller through bluetoothctl, this happened:
[bluetooth]# devices
Device 98:B6:E9:42:4B:35 Pro Controller
[bluetooth]# remove 98:B6:E9:42:4B:35
[DEL] Device 98:B6:E9:42:4B:35 Pro Controller
Device has been removed
[DEL] Controller B8:27:EB:81:C7:4C theaterretropie [default]
Waiting to connect to bluetoothd...I check the bluetooth.service status and crashy crash crash.
pi@theaterretropie:~ $ systemctl status bluetooth.service
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: failed (Result: signal) since Wed 2019-02-20 08:01:45 EST; 1min 32s ago
Docs: man:bluetoothd(8)
Main PID: 571 (code=killed, signal=SEGV)
Status: "Running"Feb 20 08:01:10 theaterretropie bluetoothd[571]: Can't get HIDP connection info
Feb 20 08:01:15 theaterretropie bluetoothd[571]: connect error: Host is down (112)
Feb 20 08:01:21 theaterretropie bluetoothd[571]: Can't get HIDP connection info
Feb 20 08:01:27 theaterretropie bluetoothd[571]: connect error: Host is down (112)
Feb 20 08:01:32 theaterretropie bluetoothd[571]: Can't get HIDP connection info
Feb 20 08:01:38 theaterretropie bluetoothd[571]: connect error: Host is down (112)
Feb 20 08:01:43 theaterretropie bluetoothd[571]: Can't get HIDP connection info
Feb 20 08:01:45 theaterretropie systemd[1]: bluetooth.service: Main process exited, code=killed, status=11/SEGV
Feb 20 08:01:45 theaterretropie systemd[1]: bluetooth.service: Unit entered failed state.
Feb 20 08:01:45 theaterretropie systemd[1]: bluetooth.service: Failed with result 'signal'.I restart bluetooth.service and no errors:
pi@theaterretropie:~ $ sudo systemctl start bluetooth.service
pi@theaterretropie:~ $ systemctl status bluetooth.service
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2019-02-20 08:03:30 EST; 5s ago
Docs: man:bluetoothd(8)
Main PID: 29848 (bluetoothd)
Status: "Running"
CGroup: /system.slice/bluetooth.service
└─29848 /usr/lib/bluetooth/bluetoothdFeb 20 08:03:30 theaterretropie bluetoothd[29848]: Starting SDP server
Feb 20 08:03:30 theaterretropie bluetoothd[29848]: Bluetooth management interface 1.14 initialized
Feb 20 08:03:30 theaterretropie bluetoothd[29848]: Failed to obtain handles for "Service Changed" characteristic
Feb 20 08:03:30 theaterretropie bluetoothd[29848]: setsockopt(L2CAP_OPTIONS): Invalid argument (22)
Feb 20 08:03:30 theaterretropie bluetoothd[29848]: avrcp-controller: Protocol not supported (93)
Feb 20 08:03:30 theaterretropie bluetoothd[29848]: setsockopt(L2CAP_OPTIONS): Invalid argument (22)
Feb 20 08:03:30 theaterretropie bluetoothd[29848]: audio-avrcp-target: Protocol not supported (93)
Feb 20 08:03:30 theaterretropie bluetoothd[29848]: Sap driver initialization failed.
Feb 20 08:03:30 theaterretropie bluetoothd[29848]: sap-server: Operation not permitted (1)
Feb 20 08:03:30 theaterretropie bluetoothd[29848]: Failed to set privacy: Rejected (0x0b)Some of those things don't look good but I continue forward. I go back into bluetoothctl and start the scan (I won't post all of the MAC address that it finds since it obviously finds everything that has Bluetooth enabled in the house, but just the SN30 Pro)
[bluetooth]# devices
[bluetooth]# scan on
[NEW] Device 98:B6:E9:42:4B:35 Pro Controller
[bluetooth]# connect 98:B6:E9:42:4B:35
Attempting to connect to 98:B6:E9:42:4B:35
[CHG] Device 98:B6:E9:42:4B:35 Connected: yes
[CHG] Device 98:B6:E9:42:4B:35 Connected: no
Failed to connect: org.bluez.Error.Failed
[bluetooth]# info 98:B6:E9:42:4B:35
Device 98:B6:E9:42:4B:35
Name: Pro Controller
Alias: Pro Controller
Class: 0x002508
Icon: input-gaming
Paired: no
Trusted: no
Blocked: no
Connected: no
LegacyPairing: no
RSSI: -77
[bluetooth]# trust 98:B6:E9:42:4B:35
[CHG] Device 98:B6:E9:42:4B:35 Trusted: yes
Changing 98:B6:E9:42:4B:35 trust succeeded
[bluetooth]# info 98:B6:E9:42:4B:35
Device 98:B6:E9:42:4B:35
Name: Pro Controller
Alias: Pro Controller
Class: 0x002508
Icon: input-gaming
Paired: no
Trusted: yes
Blocked: no
Connected: no
LegacyPairing: noAt this point I try to turn the controller back on.
[bluetooth]# connect 98:B6:E9:42:4B:35
Attempting to connect to 98:B6:E9:42:4B:35
[CHG] Device 98:B6:E9:42:4B:35 Connected: yes
[CHG] Device 98:B6:E9:42:4B:35 Modalias: usb:v057Ep2009d0001
[CHG] Device 98:B6:E9:42:4B:35 UUIDs: 00001124-0000-1000-8000-00805f9b34fb
[CHG] Device 98:B6:E9:42:4B:35 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device 98:B6:E9:42:4B:35 ServicesResolved: yes
[CHG] Device 98:B6:E9:42:4B:35 Paired: yes
Connection successfulSuccess!
So for entertainment sake, I turn off the controller.
[Pro Controller]# info 98:B6:E9:42:4B:35
Device 98:B6:E9:42:4B:35
Name: Pro Controller
Alias: Pro Controller
Class: 0x002508
Icon: input-gaming
Paired: yes
Trusted: yes
Blocked: no
Connected: yes
LegacyPairing: no
UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
Modalias: usb:v057Ep2009d0001It still showed connected which was weird. So I turned the controller back on and bluetoothctl updated with this:
[CHG] Device 98:B6:E9:42:4B:35 ServicesResolved: no
[CHG] Device 98:B6:E9:42:4B:35 Connected: no
[CHG] Device 98:B6:E9:42:4B:35 Connected: yesI look up at the TV and the controller is working. I decided to reboot the Pi to see if the controller automatically syncs. It does!
pi@theaterretropie:~ $ bluetoothctl
[NEW] Controller B8:27:EB:81:C7:4C theaterretropie [default]
[NEW] Device 98:B6:E9:42:4B:35 Pro Controller
[CHG] Device 98:B6:E9:42:4B:35 Connected: yesSo I'm not sure what this tells us. I started digging through the bluetooth.sh script under scriptmodules/supplementary directory to see if anything strikes me that could be causing it to get stuck between bluez, hcitool, and bluetoothctl.
I did notice something weird though. If I go into RetroArch, it doesn't detect the controller as a "RetroPad" like it use to. Instead it is treating the controller as a keyboard but that might be a different topic for a different post.
-
Despite your success, some of your output is still concerning, and we still need to establish whether there's a potential problem in the Bluetooth script that needs addressing.
A potential fix for the infinite hang has just been merged (https://github.com/RetroPie/RetroPie-Setup/pull/2625). Can you try updating your script to ensure you have this change, and then remove & re-register your device, but this time only using the Bluetooth script?
-
@psyke83 said in Bluetooth no longer working after fresh install:
Totally agree with the output concerns. I felt the same way which was why I started digging around the setup script. Give me a few minutes to update the script and remove the device from the bluetoothctl registration.
-
@psyke83 Update:
Got the latest script and confirmed the commit times matched with the Github post.
I no longer hang on "Searching..." so that's all good. It picked up the SN30 Pro, I got the prompt for the input mode, but then I get:
"An error occurred connecting to the bluetooth device (Creating device failed: org.bluez.Error.AuthenticationFailed: Authentication Failed)"
It shows as a registered device but so does every Bluetooth device in the house. The daemon.log shows:
Feb 20 09:29:00 theaterretropie bluetoothd[545]: Refusing input device connect: No such file or directory (2)
Feb 20 09:29:00 theaterretropie bluetoothd[545]: Refusing connection from 98:B6:E9:42:4B:35: unknown device
Feb 20 09:29:06 theaterretropie bluetoothd[545]: 98:B6:E9:42:4B:35: error updating services: Host is down (112)
Feb 20 09:31:43 theaterretropie bluetoothd[545]: Refusing input device connect: No such file or directory (2)
Feb 20 09:31:43 theaterretropie bluetoothd[545]: Refusing connection from 98:B6:E9:42:4B:35: unknown device
Feb 20 09:31:48 theaterretropie bluetoothd[545]: Refusing input device connect: No such file or directory (2)
Feb 20 09:31:48 theaterretropie bluetoothd[545]: Refusing connection from 98:B6:E9:42:4B:35: unknown deviceBluetoothctl shows the device. I try to start the controller up after the sync through the Setup Script and I no longer get stuck in the Connected yes/no loop, but I got automatically disconnected:
pi@theaterretropie:~ $ bluetoothctl
[NEW] Controller B8:27:EB:81:C7:4C theaterretropie [default]
[NEW] Device 98:B6:E9:42:4B:35 Pro Controller
[CHG] Device 98:B6:E9:42:4B:35 Connected: yes
[CHG] Device 98:B6:E9:42:4B:35 Connected: noI checked info and it does show pair but not trusted. I decided to try to trust it but same connected yes/no:
[bluetooth]# info 98:B6:E9:42:4B:35
Device 98:B6:E9:42:4B:35
Name: Pro Controller
Alias: Pro Controller
Class: 0x002508
Icon: input-gaming
Paired: yes
Trusted: no
Blocked: no
Connected: no
LegacyPairing: no
[bluetooth]# trust 98:B6:E9:42:4B:35
[CHG] Device 98:B6:E9:42:4B:35 Trusted: yes
Changing 98:B6:E9:42:4B:35 trust succeeded
[CHG] Device 98:B6:E9:42:4B:35 Connected: yes
[CHG] Device 98:B6:E9:42:4B:35 Connected: no -
@charleszimm just to confirm, you're running latest firmware on controller and have powered on in the correct mode? Apologies if.you have already answered these. Gets confusing with multiple user issues on one thread :-)
-
@BuZz Yep updated and the SN30 Pro is on firmware 1.29 which is the latest firmware for it I can see on 8bitdo's site.
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.