1

I'm trying to pair my PS3 remote with my RPi 3, through bluetoothctl. The steps I'm attempting:

  • place the remote in pair mode
  • run
bluetoothctl
[bluetooth]# devices
Device 00:19:C1:5A:24:7B BD Remote Control
[bluetooth]# pair 00:19:C1:5A:24:7B
Attempting to pair with 00:19:C1:5A:24:7B
Failed to pair: org.bluez.Error.ConnectionAttemptFailed

However, if I place the remote in pair mode again, and run connect

[bluetooth]# connect 00:19:C1:5A:24:7B
Attempting to connect to 00:19:C1:5A:24:7B
[CHG] Device 00:19:C1:5A:24:7B Connected: yes
Connection successful
[CHG] Device 00:19:C1:5A:24:7B ServicesResolved: yes

it connects and it works.

The issue is I can't pair it and the remote doesn't connect to the Pi from its side.

The /etc/dbus-1/system.d/bluetooth.conf configuration looks like this:

<!-- This configuration file specifies the required security policies
     for Bluetooth core daemon to work. -->

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- ../system.conf have denied everything, so we just punch some holes -->

  <policy user="root">
    <allow own="org.bluez"/>
    <allow send_destination="org.bluez"/>
    <allow send_interface="org.bluez.Agent"/>
    <allow send_interface="org.bluez.MediaEndpoint"/>
    <allow send_interface="org.bluez.MediaPlayer"/>
    <allow send_interface="org.bluez.Profile"/>
    <allow send_interface="org.bluez.GattCharacteristic"/>
    <allow send_interface="org.bluez.GattDescriptor"/>
    <allow send_interface="org.bluez.LEAdvertisement"/>
    <allow send_interface="org.freedesktop.DBus.ObjectManager"/>
    <allow send_interface="org.freedesktop.DBus.Properties"/>
  </policy>

  <policy at_console="true">
    <allow send_destination="org.bluez"/>
  </policy>

  <!-- allow users of lp group (printing subsystem) to 
       communicate with bluetoothd -->
  <policy group="lp">
    <allow send_destination="org.bluez"/>
  </policy>

  <policy context="default">
    <deny send_destination="org.bluez"/>
  </policy>

</busconfig>

If I run btmon while pairing:

 MGMT Command: Pair Device (0x0019) plen 8          {0x0001} [hci0] 4.616417
        BR/EDR Address: 00:19:C1:5A:24:7B (ALPS ELECTRIC CO.,LTD.)
        Capability: KeyboardDisplay (0x04)
< HCI Command: Create Connection (0x01|0x0005) plen 13     #1 [hci0] 4.617556
        Address: 00:19:C1:5A:24:7B (ALPS ELECTRIC CO.,LTD.)
        Packet type: 0xcc18
          DM1 may be used
          DH1 may be used
          DM3 may be used
          DH3 may be used
          DM5 may be used
          DH5 may be used
        Page scan repetition mode: R2 (0x02)
        Page scan mode: Mandatory (0x00)
        Clock offset: 0x0000
        Role switch: Allow slave (0x01)
> HCI Event: Command Status (0x0f) plen 4                  #2 [hci0] 4.617965
      Create Connection (0x01|0x0005) ncmd 1
        Status: Success (0x00)
> HCI Event: Connect Complete (0x03) plen 11               #3 [hci0] 5.877589
        Status: Success (0x00)
        Handle: 11
        Address: 00:19:C1:5A:24:7B (ALPS ELECTRIC CO.,LTD.)
        Link type: ACL (0x01)
        Encryption: Disabled (0x00)
< HCI Command: Read Remote Support.. (0x01|0x001b) plen 2  #4 [hci0] 5.877895
        Handle: 11
> HCI Event: Command Status (0x0f) plen 4                  #5 [hci0] 5.878276
      Read Remote Supported Features (0x01|0x001b) ncmd 1
        Status: Success (0x00)
> HCI Event: Read Remote Supported Featu.. (0x0b) plen 11  #6 [hci0] 5.878462
        Status: Success (0x00)
        Handle: 11
        Features: 0xbc 0x02 0x04 0x38 0x08 0x00 0x00 0x00
          Encryption
          Slot offset
          Timing accuracy
          Role switch
          Sniff mode
          Power control requests
          Power control
          Enhanced inquiry scan
          Interlaced inquiry scan
          Interlaced page scan
          AFH capable slave
< HCI Command: Remote Name Request (0x01|0x0019) plen 10   #7 [hci0] 5.878511
        Address: 00:19:C1:5A:24:7B (ALPS ELECTRIC CO.,LTD.)
        Page scan repetition mode: R2 (0x02)
        Page scan mode: Mandatory (0x00)
        Clock offset: 0x0000
> HCI Event: Command Status (0x0f) plen 4                  #8 [hci0] 5.878836
      Remote Name Request (0x01|0x0019) ncmd 1
        Status: Success (0x00)
> HCI Event: Remote Name Req Complete (0x07) plen 255      #9 [hci0] 5.947814
        Status: Success (0x00)
        Address: 00:19:C1:5A:24:7B (ALPS ELECTRIC CO.,LTD.)
        Name: BD Remote Control
@ MGMT Event: Device Connected (0x000b) plen 32      {0x0003} [hci0] 5.947894
        BR/EDR Address: 00:19:C1:5A:24:7B (ALPS ELECTRIC CO.,LTD.)
        Flags: 0x00000000
        Data length: 19
        Name (complete): BD Remote Control
@ MGMT Event: Device Connected (0x000b) plen 32      {0x0002} [hci0] 5.947894
        BR/EDR Address: 00:19:C1:5A:24:7B (ALPS ELECTRIC CO.,LTD.)
        Flags: 0x00000000
        Data length: 19
        Name (complete): BD Remote Control
@ MGMT Event: Device Connected (0x000b) plen 32      {0x0001} [hci0] 5.947894
        BR/EDR Address: 00:19:C1:5A:24:7B (ALPS ELECTRIC CO.,LTD.)
        Flags: 0x00000000
        Data length: 19
        Name (complete): BD Remote Control
< HCI Command: Authentication Req.. (0x01|0x0011) plen 2  #10 [hci0] 5.947961
        Handle: 11
> HCI Event: Command Status (0x0f) plen 4                 #11 [hci0] 5.950317
      Authentication Requested (0x01|0x0011) ncmd 1
        Status: Success (0x00)
> HCI Event: Link Key Request (0x17) plen 6               #12 [hci0] 5.950332
        Address: 00:19:C1:5A:24:7B (ALPS ELECTRIC CO.,LTD.)
< HCI Command: Link Key Request N.. (0x01|0x000c) plen 6  #13 [hci0] 5.950430
        Address: 00:19:C1:5A:24:7B (ALPS ELECTRIC CO.,LTD.)
> HCI Event: Command Complete (0x0e) plen 10              #14 [hci0] 5.950789
      Link Key Request Negative Reply (0x01|0x000c) ncmd 1
        Status: Success (0x00)
        Address: 00:19:C1:5A:24:7B (ALPS ELECTRIC CO.,LTD.)
> HCI Event: PIN Code Request (0x16) plen 6               #15 [hci0] 5.950939
        Address: 00:19:C1:5A:24:7B (ALPS ELECTRIC CO.,LTD.)
@ MGMT Event: PIN Code Request (0x000e) plen 8       {0x0003} [hci0] 5.950977
        BR/EDR Address: 00:19:C1:5A:24:7B (ALPS ELECTRIC CO.,LTD.)
        Secure PIN: 0x00
@ MGMT Event: PIN Code Request (0x000e) plen 8       {0x0002} [hci0] 5.950977
        BR/EDR Address: 00:19:C1:5A:24:7B (ALPS ELECTRIC CO.,LTD.)
        Secure PIN: 0x00
@ MGMT Event: PIN Code Request (0x000e) plen 8       {0x0001} [hci0] 5.950977
        BR/EDR Address: 00:19:C1:5A:24:7B (ALPS ELECTRIC CO.,LTD.)
        Secure PIN: 0x00
@ MGMT Command: PIN Code Reply (0x0016) plen 24      {0x0001} [hci0] 5.956852
        BR/EDR Address: 00:19:C1:5A:24:7B (ALPS ELECTRIC CO.,LTD.)
        PIN length: 6
        PIN code: 18d849eb27b800000000000000000000
< HCI Command: PIN Code Request... (0x01|0x000d) plen 23  #16 [hci0] 5.956938
        Address: 00:19:C1:5A:24:7B (ALPS ELECTRIC CO.,LTD.)
        PIN length: 6
        PIN code: ØIë'¸
> HCI Event: Command Complete (0x0e) plen 10              #17 [hci0] 5.960224
      PIN Code Request Reply (0x01|0x000d) ncmd 1
        Status: Success (0x00)
        Address: 00:19:C1:5A:24:7B (ALPS ELECTRIC CO.,LTD.)
@ MGMT Event: Command Complete (0x0001) plen 10      {0x0001} [hci0] 5.960303
      PIN Code Reply (0x0016) plen 7
        Status: Success (0x00)
        BR/EDR Address: 00:19:C1:5A:24:7B (ALPS ELECTRIC CO.,LTD.)
> HCI Event: Auth Complete (0x06) plen 3                  #18 [hci0] 5.980523
        Status: Pairing Not Allowed (0x18)
        Handle: 11
@ MGMT Event: Authentication Failed (0x0011) plen 8  {0x0003} [hci0] 5.980600
        BR/EDR Address: 00:19:C1:5A:24:7B (ALPS ELECTRIC CO.,LTD.)
        Status: Rejected (0x0b)
@ MGMT Event: Authentication Failed (0x0011) plen 8  {0x0002} [hci0] 5.980600
        BR/EDR Address: 00:19:C1:5A:24:7B (ALPS ELECTRIC CO.,LTD.)
        Status: Rejected (0x0b)
@ MGMT Event: Command Complete (0x0001) plen 10      {0x0001} [hci0] 5.980636
      Pair Device (0x0019) plen 7
        Status: Rejected (0x0b)
        BR/EDR Address: 00:19:C1:5A:24:7B (ALPS ELECTRIC CO.,LTD.)
< HCI Command: Disconnect (0x01|0x0006) plen 3            #19 [hci0] 8.049695
        Handle: 11
        Reason: Remote User Terminated Connection (0x13)
> HCI Event: Command Status (0x0f) plen 4                 #20 [hci0] 8.050122
      Disconnect (0x01|0x0006) ncmd 1
        Status: Success (0x00)
> HCI Event: Disconnect Complete (0x05) plen 4            #21 [hci0] 8.132897
        Status: Success (0x00)
        Handle: 11
        Reason: Connection Terminated By Local Host (0x16)
@ MGMT Event: Device Disconnected (0x000c) plen 8    {0x0003} [hci0] 8.132964
        BR/EDR Address: 00:19:C1:5A:24:7B (ALPS ELECTRIC CO.,LTD.)
        Reason: Connection terminated by local host (0x02)
@ MGMT Event: Device Disconnected (0x000c) plen 8    {0x0002} [hci0] 8.132964
        BR/EDR Address: 00:19:C1:5A:24:7B (ALPS ELECTRIC CO.,LTD.)
        Reason: Connection terminated by local host (0x02)
@ MGMT Event: Device Disconnected (0x000c) plen 8    {0x0001} [hci0] 8.132964
        BR/EDR Address: 00:19:C1:5A:24:7B (ALPS ELECTRIC CO.,LTD.)
        Reason: Connection terminated by local host (0x02)

I'm thinking maybe it's a policy/security setting, but I'm stuck.

1

After much strife, my issue was solved by installing blueman and using its wizard to pair the remote.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.