Generic PS3 Dualshock controller config and bluetooth issues

When I connect the controller through USB I get

I: Bus=0003 Vendor=054c Product=0268 Version=8111
N: Name="SZMY-POWER CO.,LTD. PLAYSTATION(R)3 Controller Motion Sensors"
P: Phys=usb-0000:01:00.0-1.4/input0
S: Sysfs=/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:054C:0268.0003/input/input4
U: Uniq=00:26:5c:52:d1:96
H: Handlers=event3
B: PROP=40
B: EV=9
B: ABS=7

I: Bus=0003 Vendor=054c Product=0268 Version=8111
N: Name="SZMY-POWER CO.,LTD. PLAYSTATION(R)3 Controller"
P: Phys=usb-0000:01:00.0-1.4/input0
S: Sysfs=/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:054C:0268.0003/input/input3
U: Uniq=00:26:5c:52:d1:96
H: Handlers=js0 event4
B: PROP=0
B: EV=20001b
B: KEY=f 0 0 0 0 0 0 0 7fdb0000 0 0 0 0 0 0 0 0 0
B: ABS=3f
B: MSC=10
B: FF=1 7030000 0 0

This is the configuration I saved which is not loaded by default

Lakka:~/joypads/udev # ls
Gamepad.cfg
SZMY-POWER CO.,LTD. PLAYSTATION(R)3 Controller.cfg
Sony PLAYSTATION(R)3 Controller.cfg
Lakka:~/joypads/udev # cat SZMY-POWER\ CO.,LTD.\ PLAYSTATION\(R\)3\ Controller.cfg
input_driver = "udev"
input_device = "SZMY-POWER CO.,LTD. PLAYSTATION(R)3 Controller"
input_vendor_id = "1356"
input_product_id = "616"
input_b_btn = "0"
input_y_btn = "3"
input_select_btn = "8"
input_start_btn = "9"
input_up_btn = "13"
input_down_btn = "14"
input_left_btn = "15"
input_right_btn = "16"
input_a_btn = "1"
input_x_btn = "2"
input_l_btn = "4"
input_r_btn = "5"
input_l2_btn = "6"
input_r2_btn = "7"
input_l3_btn = "11"
input_r3_btn = "12"
input_l_x_plus_axis = "+0"
input_l_x_minus_axis = "-0"
input_l_y_plus_axis = "+1"
input_l_y_minus_axis = "-1"
input_r_x_plus_axis = "+3"
input_r_x_minus_axis = "-3"
input_r_y_plus_axis = "+4"
input_r_y_minus_axis = "-4"

But then when I connected with Bluetooth the menu starts scrolling like crazy and I cannot modify bindings.

I tied coping the same bindings as the Bluetooth version, but it doesn’t work either.

Lakka:~/joypads/udev # ls
Gamepad.cfg
SZMY-POWER CO.,LTD. PLAYSTATION(R)3 Controller.cfg
Sony PLAYSTATION(R)3 Controller.cfg
Lakka:~/joypads/udev # cat Sony\ PLAYSTATION\(R\)3\ Controller.cfg
input_driver = "udev"
input_device = "Wireless Controller"
input_vendor_id = "2578"
input_product_id = "1"
input_b_btn = "0"
input_y_btn = "3"
input_select_btn = "8"
input_start_btn = "9"
input_up_btn = "h0up"
input_down_btn = "h0down"
input_left_btn = "h0left"
input_right_btn = "h0right"
input_a_btn = "1"
input_x_btn = "2"
input_l_btn = "4"
input_r_btn = "5"
input_l2_btn = "6"
input_r2_btn = "7"
input_l3_btn = "11"
input_r3_btn = "12"
input_r2_axis = "+2"
input_r3_axis = "+5"
input_l_x_plus_axis = "+0"
input_l_x_minus_axis = "-0"
input_l_y_plus_axis = "+1"
input_l_y_minus_axis = "-1"
input_r_x_plus_axis = "+3"
input_r_x_minus_axis = "-3"
input_r_y_plus_axis = "+4"
input_r_y_minus_axis = "-4"

I don’t know why the name also changes when is connect with Bluetooth

I: Bus=0005 Vendor=054c Product=0268 Version=8000
N: Name="Sony PLAYSTATION(R)3 Controller Motion Sensors"
P: Phys=dc:a6:32:b6:08:21
S: Sysfs=/devices/platform/soc/fe201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:054C:0268.0004/input/input6
U: Uniq=00:26:5c:52:d1:96
H: Handlers=event3
B: PROP=40
B: EV=9
B: ABS=7

I: Bus=0005 Vendor=054c Product=0268 Version=8000
N: Name="Sony PLAYSTATION(R)3 Controller"
P: Phys=dc:a6:32:b6:08:21
S: Sysfs=/devices/platform/soc/fe201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:054C:0268.0004/input/input5
U: Uniq=00:26:5c:52:d1:96
H: Handlers=js0 event4
B: PROP=0
B: EV=20001b
B: KEY=f 0 0 0 0 0 0 0 7fdb0000 0 0 0 0 0 0 0 0 0
B: ABS=3f
B: MSC=10
B: FF=1 7030000 0 0
[Sony PLAYSTATION(R)3 Controller]# devices
Device 00:26:5C:52:D1:96 Sony PLAYSTATION(R)3 Controller
Device FF:6B:27:02:63:25 Gamepad
[Sony PLAYSTATION(R)3 Controller]# info 00:26:5C:52:D1:96
Device 00:26:5C:52:D1:96 (public)
        Name: Sony PLAYSTATION(R)3 Controller
        Alias: Sony PLAYSTATION(R)3 Controller
        Class: 0x00000540
        Icon: input-keyboard
        Paired: no
        Trusted: yes
        Blocked: no
        Connected: yes
        LegacyPairing: no
        UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
        Modalias: usb:v054Cp0268d0000