RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    [SOLVED] Bluetooth no longer working correctly on a previously working system. 'org.bluez.Error.NotReady'

    Scheduled Pinned Locked Moved Help and Support
    bluetoothbluetoothctlhciuartpairingdiscovery
    4 Posts 2 Posters 10.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      RetroResolution
      last edited by RetroResolution

      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 the hciuart.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?

      If a post has helped you, please encourage the author by up-voting via the ^ icon located in the bottom-right corner.

      RetroResolution.com - Adventures in retro gaming on original hardware and via emulation with RetroPie on the Raspberry Pi.

      1 Reply Last reply Reply Quote 0
      • R
        RetroResolution
        last edited by

        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

        If a post has helped you, please encourage the author by up-voting via the ^ icon located in the bottom-right corner.

        RetroResolution.com - Adventures in retro gaming on original hardware and via emulation with RetroPie on the Raspberry Pi.

        G 1 Reply Last reply Reply Quote 1
        • R
          RetroResolution
          last edited by

          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): works

          reboot, with keyboard powered off; wait for EmulationStation to load; power on keyboard (green led): works

          If a post has helped you, please encourage the author by up-voting via the ^ icon located in the bottom-right corner.

          RetroResolution.com - Adventures in retro gaming on original hardware and via emulation with RetroPie on the Raspberry Pi.

          1 Reply Last reply Reply Quote 0
          • G
            gginelli @RetroResolution
            last edited by

            @retroresolution

            Hi RR, I had the exact same problem and it was driving me insane... thanks for figuring this out and sharing your solution!

            1 Reply Last reply Reply Quote 0
            • First post
              Last post

            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.