[SOLVED] Bluetooth no longer working correctly on a previously working system. 'org.bluez.Error.NotReady'
-
Hi,
[EDIT]
I'm having problems with a Bluetooth keyboard, and BT in general, on an up-to-date Retropie installation where it previously worked fine. No changes of note have been made. Hardware is a Raspberry Pi 3 (original model)
sudo uname -a
returns:
Linux retropie 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux
Within EmulationStation, in the RetroPie | Bluetooth configuration tool, the bluetooth keyboard which previously worked is still registered, but will no longer pair.
'Register and Connect to Bluetooth device' returns:
(Creating device failed: org.bluez.Error.AlreadyExists)
A previously working Xbone One S controller (which I unpaired a while ago) is not detected by this process.
It is not possible to remove the existing entry via
'Remove Bluetooth device' (no error is shown, but the entry persists).Bluetooth is not disabled in
/boot/config.txt
#disable onboard bluetooth #dtoverlay=pi3-disable-bt
At the command line, after exiting ES, I uninstalled and reinstalled bluetooth, then rebooted. This made no difference:
sudo apt-get remove pi-bluetooth sudo apt-get install pi-bluetooth
Via ssh, using
bluetoothctl
, a similar error is returned:
org.bluez.Error.NotReady
Discovery via
scan on
and removal of the existing entry, both fail:pi@retropie:~ $ bluetoothctl [NEW] Controller B8:27:EB:AD:FC:96 retropie [default] [NEW] Device 70:73:00:13:9E:03 Bluetooth 3.0 Keyboard [bluetooth]# scan on Failed to start discovery: org.bluez.Error.NotReady
The
hcitool
cannot be used, however thehciuart.service
is enabled and active:pi@retropie:~ $ hcitool scan Device is not available: No such device
pi@retropie:~ $ systemctl status hciuart.service ● hciuart.service - Configure Bluetooth Modems connected by U Loaded: loaded (/lib/systemd/system/hciuart.service; enabl Active: active (running) since Fri 2019-01-11 00:35:21 GMT Process: 324 ExecStart=/usr/bin/btuart (code=exited, status Main PID: 442 (hciattach) CGroup: /system.slice/hciuart.service └─442 /usr/bin/hciattach /dev/serial1 bcm43xx 9216 Jan 11 00:35:16 retropie systemd[1]: Starting Configure Bluet Jan 11 00:35:21 retropie btuart[324]: bcm43xx_init Jan 11 00:35:21 retropie btuart[324]: Flash firmware /lib/fir Jan 11 00:35:21 retropie btuart[324]: Set BDADDR UART: b8:27: Jan 11 00:35:21 retropie btuart[324]: Set Controller UART spe Jan 11 00:35:21 retropie btuart[324]: Device setup complete Jan 11 00:35:21 retropie systemd[1]: Started Configure Blueto lines 1-15/15 (END)
[Edit: added test for bluetooth.service]
systemctl status bluetooth.service
Returns that the bluetooth service is active, however there are 'Failed to obtain ha...' and 'failed to set mode' entries listed
● bluetooth.service - Bluetooth service Loaded: loaded (/lib/systemd/system/bluetooth.service; ena Active: active (running) since Fri 2019-01-11 00:35:21 GMT Docs: man:bluetoothd(8) Main PID: 447 (bluetoothd) Status: "Running" CGroup: /system.slice/bluetooth.service └─447 /usr/lib/bluetooth/bluetoothd Jan 11 00:35:21 retropie systemd[1]: Starting Bluetooth servi Jan 11 00:35:21 retropie bluetoothd[447]: Bluetooth daemon 5. Jan 11 00:35:21 retropie systemd[1]: Started Bluetooth servic Jan 11 00:35:21 retropie bluetoothd[447]: Starting SDP server Jan 11 00:35:21 retropie bluetoothd[447]: Bluetooth managemen Jan 11 00:35:21 retropie bluetoothd[447]: Failed to obtain ha Jan 11 00:35:21 retropie bluetoothd[447]: Sap driver initiali Jan 11 00:35:21 retropie bluetoothd[447]: sap-server: Operati Jan 11 00:35:21 retropie bluetoothd[447]: Failed to set mode: Jan 11 00:35:21 retropie bluetoothd[447]: Endpoint registeredlines 1-19/19 (END)
systemctl status bluetooth.target
appears okay:● bluetooth.target - Bluetooth Loaded: loaded (/lib/systemd/system/bluetooth.target; stat Active: active since Fri 2019-01-11 00:35:21 GMT; 56min ag Docs: man:systemd.special(7) Jan 11 00:35:21 retropie systemd[1]: Reached target Bluetoothlines 1-6/6 (END)...skipping... ● bluetooth.target - Bluetooth Loaded: loaded (/lib/systemd/system/bluetooth.target; stat Active: active since Fri 2019-01-11 00:35:21 GMT; 56min ag Docs: man:systemd.special(7) Jan 11 00:35:21 retropie systemd[1]: Reached target Bluetooth~
I'm at a loss here. I cannot recall any recent changes or updates to my installation that could begin to account for the problem, and cannot find the core error mentioned anywhere on retropie.org.uk's forum.
Can anybody help?
-
Hi,
I've now solved the problem. After all the low-level diagnostics, as is often the case, the solution came whilst I was nowhere near the system, and was simple.
I recalled I'd disabled Bluetooth via the lxde Desktop (accessible from the EmulationStation Ports menu, after installation via retropie setup) quite some time ago. The Bluetooth icon on the desktop menu bar was grey; right-clicking allowed me to enable the stack fully.
I've no idea why I disabled Bluetooth via the desktop, as I've not actively used it since the full reinstall of the current RetroPie on this RPi 3.
I also have no idea exactly what subsystem or service was disabled by this action.
Regardless, after a reboot, the Bluetooth configuration tool, accessed via EmulationStation | RetroPie, then worked exactly as it should. I was able to remove and add the keyboard, connect, and use it with no problems.
Unlikely as it is, maybe these posts will help somebody in the future.
Cheers,
RR -
An addendum:
To auto reconnect Bluetooth device on reboot, the following may be required
(Solution via: https://retropie.org.uk/forum/topic/10456/loosing-bluetooth-connection-after-reboot/4 )
create a udev rule for each device, if required
via EmulationStation | RetroPie,
Bluetooth Configuration
select option:
'Setup udev rule for joypad (required for... 8bitdo...)'Displays
Added
SUBSYSTEM=="input", ATTRS{name}=="Bluetooth 3.0 Keyboard", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
to /etc/udev/rules.d/99-bluetooth.rules
Testing
Reboot, with keyboard powered on and left in connected mode (no led showing): worksreboot, with keyboard powered off; wait for EmulationStation to load; power on keyboard (green led): works
-
Hi RR, I had the exact same problem and it was driving me insane... thanks for figuring this out and sharing your solution!
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.