Official PS3 controller dropping BT connection with BT dongle
-
@juzzy Did you disable the onboard Bluetooth on the PI ?
-
@mitu yep. Disabled it through /boot/config.txt
-
Maybe something similar to https://retropie.org.uk/forum/topic/24590/ ?
You say your controllers worked with thesixaxis
driver, what changed since they were working ? New Pi/updated system ? -
@mitu thanks for the link. But unfortunately seems like a slightly different issue. But I will try changing the baud rate with the on-board BT and see if it fixes the lag (which lead to me trying a BT dongle).
Both controllers (official and clone) currently work with the sixaxis driver with on board BT.
I have done no upgrades recently either.
Its when I change to a BT dongle that the sixaxis driver does not work (but for some reason only on the official PS3 controller).It works great with no input lag with the clone controller, BT dongle and sixaxis driver.
I notice a noticeable difference in lag and ghost inputs between on-board BT and the dongle.
Hence why I would love to get both controllers working with the dongle and sixaxis driver.Just seems so strange that one controller (clone) works fine but then the official one does not.
and only when using a BT dongle
Whats the difference? -
Have you tried clearing you existing Bluetooth pairings and re-pair the controllers again, after using the new BT dongle ?
-
@mitu yep. removed the paired controllers from the registry and then re-paired. Official PS3 controller still drops the BT with the sixaxis driver. Works with the PS3controller driver.
I can send you system logs of what happens when I get home. -
@mitu this is the system log of what happens trying to connect the official PS3 controller:
Jan 28 20:05:35 raspberrypi kernel: [204371.027616] sony 0005:054C:0268.0003: unknown main item tag 0x0 Jan 28 20:05:36 raspberrypi kernel: [204372.165059] input: PLAYSTATION(R)3 Controller Motion Sensors as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/bluetooth/hci0/hci0:48/0005:054C:0268.0003/input/input8 Jan 28 20:05:36 raspberrypi kernel: [204372.167757] input: PLAYSTATION(R)3 Controller as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/bluetooth/hci0/hci0:48/0005:054C:0268.0003/input/input7 Jan 28 20:05:36 raspberrypi kernel: [204372.173014] sony 0005:054C:0268.0003: input,hidraw0: BLUETOOTH HID v80.00 Joystick [PLAYSTATION(R)3 Controller] on 00:1a:7d:da:71:10 Jan 28 20:05:36 raspberrypi systemd[1]: Started sixaxis helper (sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/bluetooth/hci0/hci0:48/0005:054C:0268.0003/input/input7). Jan 28 20:05:36 raspberrypi systemd-udevd[27918]: Process '/usr/bin/jscal-restore /dev/input/js0' failed with exit code 1. Jan 28 20:05:37 raspberrypi systemd-udevd[27918]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1. Jan 28 20:05:37 raspberrypi systemd[1]: Started sixaxis helper (/dev/input/js0). Jan 28 20:05:37 raspberrypi systemd-udevd[27915]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1. Jan 28 20:05:37 raspberrypi systemd-udevd[27931]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1. Jan 28 20:05:37 raspberrypi systemd[1]: Started sixaxis helper (/dev/input/event4). Jan 28 20:05:37 raspberrypi sixaxis-helper.sh[27951]: BlueZ <5.48 hack: renaming BT profile to make consistent with kernel module name Jan 28 20:05:37 raspberrypi systemd[1]: Stopping BluezALSA proxy... Jan 28 20:05:37 raspberrypi systemd[1]: Stopped BluezALSA proxy. Jan 28 20:05:37 raspberrypi systemd[1]: Stopping Bluetooth service... Jan 28 20:05:37 raspberrypi bluetoothd[371]: Endpoint unregistered: sender=:1.5 path=/A2DP/SBC/Source/1 Jan 28 20:05:37 raspberrypi bluetoothd[371]: Terminating Jan 28 20:05:37 raspberrypi bluetoothd[371]: Stopping SDP server Jan 28 20:05:37 raspberrypi bluetoothd[371]: Exit Jan 28 20:05:37 raspberrypi systemd[1]: Stopped Bluetooth service. Jan 28 20:05:37 raspberrypi systemd[1]: Starting Bluetooth service... Jan 28 20:05:38 raspberrypi bluetoothd[27999]: Bluetooth daemon 5.50 Jan 28 20:05:38 raspberrypi systemd[1]: Started Bluetooth service. Jan 28 20:05:38 raspberrypi bluetoothd[27999]: Starting SDP server Jan 28 20:05:38 raspberrypi bluetoothd[27999]: Bluetooth management interface 1.14 initialized Jan 28 20:05:38 raspberrypi bluetoothd[27999]: Sap driver initialization failed. Jan 28 20:05:38 raspberrypi bluetoothd[27999]: sap-server: Operation not permitted (1) Jan 28 20:05:38 raspberrypi dbus[327]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' Jan 28 20:05:38 raspberrypi systemd[1]: Starting Hostname Service... Jan 28 20:05:38 raspberrypi dbus[327]: [system] Successfully activated service 'org.freedesktop.hostname1' Jan 28 20:05:38 raspberrypi systemd[1]: Started Hostname Service.
As you can see the bluetooth service completely drops out and restarts.
Then log of what happens paring the clone PS3 controller:Jan 28 20:06:37 raspberrypi kernel: [204433.090033] sony 0005:054C:0268.0004: unknown main item tag 0x0 Jan 28 20:06:37 raspberrypi kernel: [204433.100511] input: Sony PLAYSTATION(R)3 Controller Motion Sensors as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/bluetooth/hci0/hci0:48/0005:054C:0268.0004/input/input10 Jan 28 20:06:37 raspberrypi kernel: [204433.102377] input: Sony PLAYSTATION(R)3 Controller as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/bluetooth/hci0/hci0:48/0005:054C:0268.0004/input/input9 Jan 28 20:06:37 raspberrypi kernel: [204433.104076] sony 0005:054C:0268.0004: input,hidraw0: BLUETOOTH HID v80.00 Joystick [Sony PLAYSTATION(R)3 Controller] on 00:1a:7d:da:71:10 Jan 28 20:06:37 raspberrypi systemd[1]: Started sixaxis helper (sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/bluetooth/hci0/hci0:48/0005:054C:0268.0004/input/input9). Jan 28 20:06:37 raspberrypi systemd-udevd[28396]: Process '/usr/bin/jscal-restore /dev/input/js0' failed with exit code 1. Jan 28 20:06:38 raspberrypi systemd-udevd[28396]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1. Jan 28 20:06:38 raspberrypi systemd-udevd[28392]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1. Jan 28 20:06:38 raspberrypi systemd-udevd[28395]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1. Jan 28 20:06:38 raspberrypi systemd[1]: Started sixaxis helper (/dev/input/event4). Jan 28 20:06:38 raspberrypi sixaxis-helper.sh[28410]: Calibrating: Sony PLAYSTATION(R)3 Controller (02:07:B4:92:63:25) Jan 28 20:06:38 raspberrypi sixaxis-helper.sh[28410]: Setting 600 second timeout on: Sony PLAYSTATION(R)3 Controller (02:07:B4:92:63:25)
Pretty much the same until it comes to sixaxis-helper.sh
-
The logs don't show much.
What version of RetroPie/Raspbian are you using ? Add more info about your system, as detailed in https://retropie.org.uk/forum/topic/3/read-this-first.
-
What version of Raspbian is your installation running? You can see it on the main page of the RetroPie-Setup script.
The
BlueZ <5.48 hack
in the log is the reason why Bluetooth is restarting on your installation. When a BT profile that matches the namePLAYSTATION(R)3 Controller
is found, it renames it toSony PLAYSTATION(R)3 Controller
and then restarts Bluetooth for the rename to take effect. This is a hack to ensure the BT profile matches the name of the USB device (with theSony
prefix) to avoid the need to set up separate mappings for the BT vs USB connection in EmulationStation and other applications.The Bluetooth stack should only restart one time after you've initially paired, and then work normally for subsequent pairings. I've not tested the hack with a BT adapter dongle, so there may be unexpected behaviour causing problems.
If you're running on an image based on jessie, I highly recommend that you upgrade to a stretch-based image, as newer versions of BlueZ will set the same device name for BT as USB by default, which avoids the need for the aforementioned hack to be executed by the
sixaxis-helper.sh
script. If upgrading your image is too disruptive, installingcustombluez
or enabling third-party support in thesixaxis
script's configuration page should upgrade your version of BlueZ to the newer version that uses the correct BT profile name to match the USB name by default. -
Love this community. Thanks for a fast response @psyke83 & @mitu.
I ended up hacking your hack in sixaxis-helper.sh.
I basically disabled the whole restart and renaming section by commenting it out.sixaxis_rename() { local bt_profile="/var/lib/bluetooth/${BLUETOOTH_MAC^^}/${SIXAXIS_MAC^^}/info" if [[ "$(grep -e "^Name=PLAYSTATION(R)3 Controller" -e "^Trusted=true" -c "$bt_profile" 2>/dev/null)" == "2" ]]; then echo "BlueZ <5.48 hack: renaming BT profile to make consistent with kernel module name" # systemctl stop bluetooth # sed 's/.*Name=PLAYSTATION(R)3 Controller.*/Name=Sony PLAYSTATION(R)3 Controller/' -i "$bt_profile" # systemctl start bluetooth exit 0 fi }
The controller paired then.
but like you stated I had to re-config the controller inputs (for BT vs USB).Digging deeper I compared the two files under var/lib/bluetooth/${BLUETOOTH_MAC^^}/${SIXAXIS_MAC^^}/info for the On-board BT and the Dongle BT addresses.
The file for the on-board BT holds the changes to the renaming "Sony PLAYSTATION(R)3 Controller"
But for the BT dongle - on restart it must overwrite the file again with the old name "PLAYSTATION(R)3 Controller".Anyway I have a fix that works for me.
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.