Skip to content

DS4 clone wireless controllers not reconnecting #1575

@PascalLadalle

Description

@PascalLadalle

Describe the bug
Initial pairing works, but restarting the controller or the device impedes further connection. Tried with bluetoothctl, emuelec-bluetooth, and emuelec-bluetooth-legacy.

To Reproduce
Make sure Bluetooth is running by checking that "pidof bluetoothd" returns a number.
Pair the controller with Bluetooth. Controller LED turns solid.
Confirm with bluetoothctl that the device is paired, bonded, trusted and connected.
Turn off and on again the device or the controller.
The controller does not connect and must be paired again.
bluetoothctl returns "Connected: yes" and a few seconds later "hci0 (MAC) type BR/EDR disconnected with reason 0"

Expected behavior
When the device is running, turning on a paired controller should connect the controller.

Device:

SOC: S905x4
Brand/Model: T95Q max

EmuELEC version:
4.8 kernel 4.9.269

Additional context

I tried plugging the controller with USB, but I suspect that the "key exchange" supposed to occur doesn't occur.

Bus 001 Device 040: ID 054c:09cc Sony Corp. DualShock 4 [CUH-ZCT2x]

sony 0003:054C:09CC.0050: failed to retrieve feature report 0x81 with the DualShock 4 MAC....

Workaround: a script ran in custom_start to pair the controller again on boot (controller must be turned on as pairable during device boot).

Any commands that you want to run after the frontend has started goes here

CONTROLLER_MAC="12:34:56:78:90:12"
SLEEP_TIME=1

if [ "${CONTROLLER_MAC}" == "00:00:00:00:00:00" ]; then
echo "ERROR: CONTROLLER_MAC not set. Exiting."
exit 1
fi

echo "Waiting for Bluetooth service to start... (${SLEEP_TIME}s)"
sleep "${SLEEP_TIME}"

echo "Attempting to force Bluetooth connection for ${CONTROLLER_MAC}..."
(
echo "power on"
sleep 1
echo "trust ${CONTROLLER_MAC}"
sleep 1
echo "connect ${CONTROLLER_MAC}"
sleep 1
) | bluetoothctl

echo "Bluetooth connection attempt complete."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions