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

    PS3 Controller (Shanwan) - Retropie 4.5.1 via BlueTooth issue

    Scheduled Pinned Locked Moved Help and Support
    ps3 clones
    13 Posts 2 Posters 1.9k 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.
    • L
      leet
      last edited by

      Sorry, not a Shanwan clone controller, but SZMY-POWER ... To quick to copy and paste. Not sure how to update the topic thou?

      1 Reply Last reply Reply Quote 0
      • L
        leet
        last edited by

        @psyke83 not to be rude, but I was hoping I might be able to get your attention on testing a PS3 Clone controller "SZMY-POWER" ? ... Pretty please ... Thanks for all the great work on RetoPie and PS3 Controllers!!

        P 1 Reply Last reply Reply Quote 0
        • P
          psyke83 Global Moderator @leet
          last edited by psyke83

          @leet

          • Certain stretch firmware versions contained a regression in the bluetooth stack that prevents certain peripherals from connecting (including DS3 controllers). Ensure that you're running a known good version of the kernel:
          apt-cache policy raspberrypi-kernel
          

          Version 1.20190401-1 should be OK; later version may have problems.

          • Have you installed third-party support from the sixaxis scriptmodule's configuration section? Make sure you have BlueZ 5.50 installed:
          echo version | bluetoothctl
          
          • Remove your existing controller BT profile (via remove 00:26:5C:FB:04:20 in bluetoothctl) and then try to manually pair using the instructions from this page: https://wiki.gentoo.org/wiki/Sony_DualShock

          Regardless of success or failure, paste the full output from the bluetoothctlsession after following all of the required steps to pair on the wiki so I can take a look.

          1 Reply Last reply Reply Quote 0
          • L
            leet
            last edited by

            Thanks @psyke83 !

            Started with a new and clean install of RetroPie 4.5.1, downgraded to RPi-Kernel 1.20190401-1 using sudo ~/RetroPie-Setup/retropie_packages.sh raspbiantools install_firmware 1.20190401-1 .

            Then installed sixaxis and enabled third-party support

            I believe I followed the Wiki and screen captured all that I had done. Below is some of the output.

            pi@retropie-test:~/screen-logs $ apt-cache policy raspberrypi-kernel
            raspberrypi-kernel:
              Installed: 1.20190401-1
              Candidate: 1.20190718~stretch-1
              Version table:
                 1.20190718~stretch-1 500
                    500 http://archive.raspberrypi.org/debian stretch/main armhf Packages
             *** 1.20190401-1 100
                    100 /var/lib/dpkg/status
            pi@retropie-test:~/screen-logs $ echo version | bluetoothctl
            Agent registered
            [bluetooth]# version
            Version 5.50
            pi@retropie-test:~/screen-logs $ bluetoothctl
            Agent registered
            [bluetooth]# show
            Controller B8:27:EB:F2:55:BE (public)
            	Name: retropie-test
            	Alias: retropie-test
            	Class: 0x00000000
            	Powered: yes
            	Discoverable: no
            	Pairable: yes
            	UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
            	UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
            	UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
            	UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
            	UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
            	Modalias: usb:v1D6Bp0246d0532
            	Discovering: no
            [bluetooth]# list
            Controller B8:27:EB:F2:55:BE retropie-test [default]
            [bluetooth]# agent on
            Agent is already registered
            [bluetooth]# default-agent
            Default agent request successful
            [bluetooth]# power on
            Changing power on succeeded
            [bluetooth]# discoverable on
            Changing discoverable on succeeded
            [CHG] Controller B8:27:EB:F2:55:BE Discoverable: yes
            [bluetooth]# pairable on
            Changing pairable on succeeded
            [NEW] Device 00:26:5C:FB:04:20 Sony PLAYSTATION(R)3 Controller
            Authorize service
            [agent] Authorize service 00001124-0000-1000-8000-00805f9b34fb (yes/no): yes
            [CHG] Device 00:26:5C:FB:04:20 Trusted: yes
            [CHG] Device 00:26:5C:FB:04:20 UUIDs: 00001124-0000-1000-8000-00805f9b34fb
            [bluetooth]# devices
            Device 00:26:5C:FB:04:20 Sony PLAYSTATION(R)3 Controller
            [bluetooth]# trust 00:26:5C:FB:04:20
            Changing 00:26:5C:FB:04:20 trust succeeded
            [CHG] Device 00:26:5C:FB:04:20 Class: 0x00000540
            [CHG] Device 00:26:5C:FB:04:20 Icon: input-keyboard
            [CHG] Device 00:26:5C:FB:04:20 Connected: yes
            [Sony PLAYSTATION(R)3 Controller]# quit
            pi@retropie-test:~/screen-logs $ jstest /dev/input/
            by-id/   by-path/ event0   event1   event2   event4   js0      mice     mouse0
            pi@retropie-test:~/screen-logs $ jstest /dev/input/js0
            Driver version is 2.1.0.
            Joystick (Sony PLAYSTATION(R)3 Controller) has 6 axes (X, Y, Z, Rx, Ry, Rz)
            and 17 buttons (BtnA, BtnB, BtnX, BtnY, BtnTL, BtnTR, BtnTL2, BtnTR2, BtnSelect, BtnStart, BtnMode, BtnThumbL, BtnThumbR, (null), (null), (null), (null)).
            Testing ... (interrupt to exit)
            Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Axes:  0:     0  1:     0  2:     0  3:     0  4:     0  5:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Axes:  0:-32767  1:     0  2:     0  3:     0  4:     0  5:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Axes:  0:-32767  1:-32767  2:     0  3:     0  4:     0  5:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Axes:  0:-32767  1:-32767  2:-32767  3:     0  4:     0  5:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Axes:  0:-32767  1:-32767  2:-32767  3:-32767  4:     0  5:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Axes:  0:-32767  1:-32767  2:-32767  3:-32767  4:-32767  5:     0 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 1Axes:  0:-32767  1:-32767  2:-32767  3:-32767  4:-32767  5:-32767 Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off  7:off  8:off  9:off 10:off 11:off 12:off 13:off 14:off 15:off 16:off ^C
            pi@retropie-test:~/screen-logs $ evtest /dev/input/
            by-id/   by-path/ event0   event1   event2   event4   js0      mice     mouse0
            pi@retropie-test:~/screen-logs $ evtest /dev/input/event4
            Input driver version is 1.0.1
            Input device ID: bus 0x5 vendor 0x54c product 0x268 version 0x8000
            Input device name: "Sony PLAYSTATION(R)3 Controller"
            Supported events:
              Event type 0 (EV_SYN)
              Event type 1 (EV_KEY)
                Event code 304 (BTN_SOUTH)
                Event code 305 (BTN_EAST)
                Event code 307 (BTN_NORTH)
                Event code 308 (BTN_WEST)
                Event code 310 (BTN_TL)
                Event code 311 (BTN_TR)
                Event code 312 (BTN_TL2)
                Event code 313 (BTN_TR2)
                Event code 314 (BTN_SELECT)
                Event code 315 (BTN_START)
                Event code 316 (BTN_MODE)
                Event code 317 (BTN_THUMBL)
                Event code 318 (BTN_THUMBR)
                Event code 544 (BTN_DPAD_UP)
                Event code 545 (BTN_DPAD_DOWN)
                Event code 546 (BTN_DPAD_LEFT)
                Event code 547 (BTN_DPAD_RIGHT)
              Event type 3 (EV_ABS)
                Event code 0 (ABS_X)
                  Value      0
                  Min        0
                  Max      255
                  Fuzz      10
                  Flat      15
                Event code 1 (ABS_Y)
                  Value      0
                  Min        0
                  Max      255
                  Fuzz      10
                  Flat      15
                Event code 2 (ABS_Z)
                  Value      0
                  Min        0
                  Max      255
                  Fuzz      10
                  Flat      15
                Event code 3 (ABS_RX)
                  Value      0
                  Min        0
                  Max      255
                  Fuzz      10
                  Flat      15
                Event code 4 (ABS_RY)
                  Value      0
                  Min        0
                  Max      255
                  Fuzz      10
                  Flat      15
                Event code 5 (ABS_RZ)
                  Value      0
                  Min        0
                  Max      255
                  Fuzz      10
                  Flat      15
              Event type 4 (EV_MSC)
                Event code 4 (MSC_SCAN)
              Event type 21 (EV_FF)
                Event code 80 (FF_RUMBLE)
                Event code 81 (FF_PERIODIC)
                Event code 88 (FF_SQUARE)
                Event code 89 (FF_TRIANGLE)
                Event code 90 (FF_SINE)
                Event code 96 (FF_GAIN)
            Properties:
            Testing ... (interrupt to exit)
            ^Cpi@retropie-test:~/screen-logs $ fftest /dev/input/event4
            Force feedback test program.
            HOLD FIRMLY YOUR WHEEL OR JOYSTICK TO PREVENT DAMAGES
            
            Device /dev/input/event4 opened
            Features:
              * Absolute axes: X, Y, Z, RX, RY, RZ,
                [3F 00 00 00 00 00 00 00 ]
              * Relative axes:
                [00 00 ]
              * Force feedback effects types: Periodic, Rumble, Gain,
                Force feedback periodic effects: Square, Triangle, Sine,
                [00 00 00 00 00 00 00 00 00 00 03 07 01 00 00 00 ]
              * Number of simultaneous effects: 16
            
            Setting master gain to 75% ... OK
            Uploading effect #0 (Periodic sinusoidal) ... OK (id 0)
            Uploading effect #1 (Constant) ... Error: Invalid argument
            Uploading effect #2 (Spring) ... Error: Invalid argument
            Uploading effect #3 (Damper) ... Error: Invalid argument
            Uploading effect #4 (Strong rumble, with heavy motor) ... OK (id 1)
            Uploading effect #5 (Weak rumble, with light motor) ... OK (id 2)
            Enter effect number, -1 to exit
            4
            Now Playing: Strong Rumble
            Enter effect number, -1 to exit
            -1
            Stopping effects
            No such device
            pi@retropie-test:~/screen-logs $ bluetoothctl
            Agent registered
            [bluetooth]# info
            Missing device address argument
            [bluetooth]# info 00:26:5C:FB:04:20
            Device 00:26:5C:FB:04:20 (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: no
            	LegacyPairing: no
            	UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
            	Modalias: usb:v054Cp0268d0000
            [CHG] Device 00:26:5C:FB:04:20 Connected: yes
            [Sony PLAYSTATION(R)3 Controller]# info 00:26:5C:FB:04:20
            Device 00:26:5C:FB:04:20 (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
            [Sony PLAYSTATION(R)3 Controller]# quit
            pi@retropie-test:~/screen-logs $ upower -e
            /org/freedesktop/UPower/devices/keyboard_sony_controller_battery_00o26o5cofbo04o20
            /org/freedesktop/UPower/devices/DisplayDevice
            pi@retropie-test:~/screen-logs $ upower -i /org/freedesktop/UPower/devices/keyboard_sony_controller_battery_00o26o5cofbo04o20
              native-path:          sony_controller_battery_00:26:5c:fb:04:20
              power supply:         no
              updated:              Thu 15 Aug 2019 02:23:58 PM BST (8 seconds ago)
              has history:          yes
              has statistics:       yes
              keyboard
                present:             yes
                rechargeable:        yes
                state:               fully-charged
                warning-level:       none
                percentage:          100%
                icon-name:          'battery-full-charged-symbolic'
            
            pi@retropie-test:~/screen-logs $ upower -i /org/freedesktop/UPower/devices/keyboard_sony_controller_battery_00o26o5cofbo04o20
              native-path:          sony_controller_battery_00:26:5c:fb:04:20
              power supply:         no
              updated:              Thu 15 Aug 2019 02:23:58 PM BST (61 seconds ago)
              has history:          yes
              has statistics:       yes
              keyboard
                present:             yes
                rechargeable:        yes
                state:               fully-charged
                warning-level:       none
                percentage:          100%
                icon-name:          'battery-full-charged-symbolic'
            
            pi@retropie-test:~/screen-logs $ upower -i /org/freedesktop/UPower/devices/keyboard_sony_controller_battery_00o26o5cofbo04o20
              native-path:          sony_controller_battery_00:26:5c:fb:04:20
              power supply:         no
              updated:              Thu 15 Aug 2019 02:25:59 PM BST (47 seconds ago)
              has history:          yes
              has statistics:       yes
              keyboard
                present:             yes
                rechargeable:        yes
                state:               fully-charged
                warning-level:       none
                percentage:          100%
                icon-name:          'battery-full-charged-symbolic'
              History (charge):
                1565875559	100.000	fully-charged
            
            pi@retropie-test:~/screen-logs $ upower -i /org/freedesktop/UPower/devices/keyboard_sony_controller_battery_00o26o5cofbo04o20
              native-path:          sony_controller_battery_00:26:5c:fb:04:20
              power supply:         no
              updated:              Thu 15 Aug 2019 02:25:59 PM BST (99 seconds ago)
              has history:          yes
              has statistics:       yes
              keyboard
                present:             yes
                rechargeable:        yes
                state:               fully-charged
                warning-level:       none
                percentage:          100%
                icon-name:          'battery-full-charged-symbolic'
              History (charge):
                1565875559	100.000	fully-charged
            
            pi@retropie-test:~/screen-logs $ upower -i /org/freedesktop/UPower/devices/keyboard_sony_controller_battery_00o26o5cofbo04o20
              native-path:          sony_controller_battery_00:26:5c:fb:04:20
              power supply:         no
              updated:              Thu 15 Aug 2019 02:25:59 PM BST (115 seconds ago)
              has history:          yes
              has statistics:       yes
              keyboard
                present:             yes
                rechargeable:        yes
                state:               fully-charged
                warning-level:       none
                percentage:          100%
                icon-name:          'battery-full-charged-symbolic'
            
            pi@retropie-test:~/screen-logs $ upower -i /org/freedesktop/UPower/devices/keyboard_sony_controller_battery_00o26o5cofbo04o20
              native-path:          sony_controller_battery_00:26:5c:fb:04:20
              power supply:         no
              updated:              Thu 15 Aug 2019 02:27:59 PM BST (1 seconds ago)
              has history:          yes
              has statistics:       yes
              keyboard
                present:             yes
                rechargeable:        yes
                state:               fully-charged
                warning-level:       none
                percentage:          100%
                icon-name:          'battery-full-charged-symbolic'
            

            I can turn off the controller and back on, it pairs/connects, but I don't get any button presses or events?

            Let me know if there is anything else I cab provide or test, if you need.

            Thanks again

            1 Reply Last reply Reply Quote 0
            • P
              psyke83 Global Moderator
              last edited by

              @leet

              I'm not seeing anything that would give a clue as to the problem, sorry. From some cursory searching, it seems that your controller may work with the old ps3controller driver if you select the gasia only version.

              The hid-sony kernel driver doesn't work with Gasia devices by default, but I created a patch based on Marcelo's findings in this related bug report: https://bugzilla.kernel.org/show_bug.cgi?id=200009

              The patch supposedly fixes Gasia devices, but your device is obviously not exactly an "original" Gasia clone, even if the Gasia version of ps3controller works. Regardless, it may be a good place to start.

              My suggestion:

              • First, check if you see the failed to send raw request, attempting fallback message in your dmesg log. If it does, it would indicate that your controller behaves similarly to Gasia clones and thus would be affected by my patch.
              • Remove customhidsony via RetroPie-Setup, and see if your controller will pair with the original unpatched hid-sony kernel driver.

              If you look at the bug report and patch, you'll see that Gasia clones need to use the hid_hw_output_report function, but that will cause official controllers to break. The workaround is to first send hid_hw_raw_request as normal, and then send hid_hw_output_report when the function doesn't succeed.

              It's possible that your controller also needs the different function call, but the original call may be causing a conflict that explains your buttons not working. If that's the case, you might want to modify the driver to only use the hid_hw_output_report function and see how it affects your controller. This will break official controllers, but it's worth checking at least for the purpose of troubleshooting whether this is the source of your problem or not.

              1 Reply Last reply Reply Quote 0
              • L
                leet
                last edited by

                @psyke83 said in PS3 Controller (Shanwan) - Retropie 4.5.1 via BlueTooth issue:

                https://bugzilla.kernel.org/show_bug.cgi?id=200009

                Thanks, will try this out.

                I am not sure this is a gasia clone, as the controller reports SZMY-POWER at some point, but that might just be another clone.

                I have seen the failed to send raw request, attempting fallback message, even yesterday with the clean install, but not today? Thou today, I can't turn the controller off by holding down the PS button ... Seems like the controller is confused?

                Aug 16 07:36:13 retropie-test kernel: [  141.707187] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
                Aug 16 07:36:13 retropie-test kernel: [  141.707233] Bluetooth: HIDP socket layer initialized
                Aug 16 07:36:13 retropie-test kernel: [  141.734918] hid_sony: loading out-of-tree module taints kernel.
                Aug 16 07:36:13 retropie-test kernel: [  141.738175] sony 0005:054C:0268.0004: unknown main item tag 0x0
                Aug 16 07:36:13 retropie-test kernel: [  141.744405] input: Sony PLAYSTATION(R)3 Controller Motion Sensors as /devices/platform/soc/3f201000.serial/tty/t
                tyAMA0/hci0/hci0:11/0005:054C:0268.0004/input/input4
                Aug 16 07:36:13 retropie-test kernel: [  141.750118] input: Sony PLAYSTATION(R)3 Controller as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci
                0:11/0005:054C:0268.0004/input/input3
                Aug 16 07:36:13 retropie-test kernel: [  141.751392] sony 0005:054C:0268.0004: input,hidraw3: BLUETOOTH HID v80.00 Joystick [Sony PLAYSTATION(R)3 Control
                ler] on b8:27:eb:f2:55:be
                Aug 16 07:36:13 retropie-test systemd[1]: Created slice system-sixaxis.slice.
                Aug 16 07:36:13 retropie-test systemd[1]: Started sixaxis helper (sys/devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:054C:0268.0004/i
                nput/input3).
                Aug 16 07:36:13 retropie-test systemd-udevd[992]: Process '/usr/bin/jscal-restore /dev/input/js0' failed with exit code 1.
                Aug 16 07:36:13 retropie-test systemd-udevd[992]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1.
                Aug 16 07:36:13 retropie-test systemd-udevd[994]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1.
                Aug 16 07:36:13 retropie-test systemd-udevd[990]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1.
                Aug 16 07:36:13 retropie-test systemd[1]: Started sixaxis helper (/dev/input/event4).
                Aug 16 07:36:13 retropie-test sixaxis-helper.sh[1009]: Calibrating: Sony PLAYSTATION(R)3 Controller (00:26:5C:FB:04:20)
                Aug 16 07:36:14 retropie-test sixaxis-helper.sh[1009]: Setting 600 second timeout on: Sony PLAYSTATION(R)3 Controller (00:26:5C:FB:04:20)
                

                Removed the customhidsony and what looks different is Aug 16 07:47:13 retropie-test kernel: [ 61.097039] sony 0005:054C:0268.0004: unknown main item tag 0x0

                Still no input or buttons thou ... '-\

                Using the ps3controller driver with gasia only works, thanks.

                Going to play with this ps3 clone controller for a little and see if there are any other problems.

                Would be nice if we could keep the BlueTooth stack for other bluetooth devices, but this will work for play and testing.

                @psyke83 - thanks for the help, if there is any custom stuff you would like to test and see if we can fix this device working, I am about.

                1 Reply Last reply Reply Quote 0
                • L
                  leet
                  last edited by

                  With the ps3controller driver, there is no LED or power class nor rumble feedback ... Things that would be nice to play with.

                  1 Reply Last reply Reply Quote 0
                  • P
                    psyke83 Global Moderator
                    last edited by psyke83

                    Please try checking out this WIP test branch, remove ps3controller and re-install customhidsony.

                    This should set the SHANWAN_GAMEPADquirk for your controller in the hid-sony driver. Let me know if it helps with your issue; if it doesn't fix button presses, at least let me know if it affects LEDS/rumble (not related to your comment re: ps3controller).

                    L 1 Reply Last reply Reply Quote 0
                    • L
                      leet @psyke83
                      last edited by

                      @psyke83 Thanks for the feedback.

                      Think I build the customhidsony from your WIP branch, thou I am not sure how to check the version of the modules, hope the below helps.

                      root@retropie-test:/home/pi/RetroPie-Setup# modinfo hid_sony
                      filename:       /lib/modules/4.14.98-v7+/updates/dkms/hid-sony.ko
                      license:        GPL
                      srcversion:     094C491E6C5BDF07186A28D
                      alias:          hid:b0005g*v00000609p00000369
                      alias:          hid:b0005g*v00000609p00000368
                      alias:          hid:b0003g*v00001345p00003008
                      alias:          hid:b0003g*v0000054Cp00000BA0
                      alias:          hid:b0005g*v0000054Cp000009CC
                      alias:          hid:b0003g*v0000054Cp000009CC
                      alias:          hid:b0005g*v0000054Cp000005C4
                      alias:          hid:b0003g*v0000054Cp000005C4
                      alias:          hid:b0005g*v00000609p00000306
                      alias:          hid:b0005g*v0000046Dp00000306
                      alias:          hid:b0005g*v0000054Cp00000306
                      alias:          hid:b0003g*v0000054Cp00001000
                      alias:          hid:b0003g*v0000054Cp00000002
                      alias:          hid:b0003g*v0000054Cp00000374
                      alias:          hid:b0003g*v0000054Cp0000024B
                      alias:          hid:b0005g*v0000054Cp00000268
                      alias:          hid:b0005g*v0000054Cp000003D5
                      alias:          hid:b0003g*v0000054Cp000003D5
                      alias:          hid:b0005g*v0000054Cp0000042F
                      alias:          hid:b0003g*v0000054Cp0000042F
                      alias:          hid:b0003g*v0000054Cp00000268
                      depends:        ff-memless
                      name:           hid_sony
                      vermagic:       4.14.98-v7+ SMP mod_unload modversions ARMv7 p2v8
                      

                      Paired the controller, and see the following the syslog

                      Aug 20 09:34:33 retropie-test kernel: [  912.977046] usb 1-1.1.2: USB disconnect, device number 6
                      Aug 20 09:34:43 retropie-test kernel: [  923.226870] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
                      Aug 20 09:34:43 retropie-test kernel: [  923.226907] Bluetooth: HIDP socket layer initialized
                      Aug 20 09:34:43 retropie-test kernel: [  923.230425] sony 0005:054C:0268.0005: unknown main item tag 0x0
                      Aug 20 09:34:43 retropie-test kernel: [  923.235434] input: Sony PLAYSTATION(R)3 Controller Motion Sensors as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:1
                      1/0005:054C:0268.0005/input/input6
                      Aug 20 09:34:43 retropie-test kernel: [  923.236596] input: Sony PLAYSTATION(R)3 Controller as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:11/0005:054C:026
                      8.0005/input/input5
                      Aug 20 09:34:43 retropie-test kernel: [  923.247562] sony 0005:054C:0268.0005: input,hidraw3: BLUETOOTH HID v80.00 Joystick [Sony PLAYSTATION(R)3 Controller] on b8:27:eb:f
                      2:55:be
                      Aug 20 09:34:43 retropie-test systemd-udevd[14861]: Process '/usr/bin/jscal-restore /dev/input/js0' failed with exit code 1.
                      Aug 20 09:34:44 retropie-test systemd-udevd[14866]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1.
                      Aug 20 09:34:44 retropie-test systemd-udevd[14858]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1.
                      Aug 20 09:34:44 retropie-test systemd-udevd[14861]: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket --passfd --udev' failed with exit code 1.
                      Aug 20 09:37:48 retropie-test kernel: [ 1107.538763] sony 0005:054C:0268.0006: unknown main item tag 0x0
                      Aug 20 09:37:48 retropie-test kernel: [ 1107.544963] input: Sony PLAYSTATION(R)3 Controller Motion Sensors as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:1
                      2/0005:054C:0268.0006/input/input8
                      Aug 20 09:37:48 retropie-test kernel: [ 1107.549741] input: Sony PLAYSTATION(R)3 Controller as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:12/0005:054C:026
                      8.0006/input/input7
                      Aug 20 09:37:48 retropie-test kernel: [ 1107.551027] sony 0005:054C:0268.0006: input,hidraw3: BLUETOOTH HID v80.00 Joystick [Sony PLAYSTATION(R)3 Controller] on b8:27:eb:f
                      2:55:be
                      

                      Only the sony 0005:054C:0268.0007: unknown main item tag 0x0 looks out of place.

                      Button still not working.

                      If I test fftest /dev/input/event4 or echo "heartbeat" > /sys/class/leds/0005\:054C\:0268.0006\:\:sony1/trigger the controller just turns off.

                      I can turn the controller back on and re-pair without any problems.

                      Kernal module dev is way above what I am capable of , so please excuse my suggestion if it's silly. Is it worth adding some sort of debug message for the module, showing that the SHANWAN_GAMEPAD quirks had been used?

                      1 Reply Last reply Reply Quote 0
                      • L
                        leet
                        last edited by

                        Another question, should not the controller be an input-gamepad and not ```input-keyboard````?

                        pi@retropie-test:~/RetroPie-Setup $ bluetoothctl
                        Agent registered
                        [Sony PLAYSTATION(R)3 Controller]# info
                        Device 00:26:5C:FB:04:20 (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
                        

                        upower seems to be reporting ...

                        pi@retropie-test:~/RetroPie-Setup $ upower -i /org/freedesktop/UPower/devices/keyboard_sony_controller_battery_00o26o5cofbo04o20  native-path:          sony_controller_battery_00:26:5c:fb:04:20
                          power supply:         no
                          updated:              Tue 20 Aug 2019 09:55:44 AM BST (6 seconds ago)
                          has history:          yes
                          has statistics:       yes
                          keyboard
                            present:             yes
                            rechargeable:        yes
                            state:               fully-charged
                            warning-level:       none
                            percentage:          100%
                            icon-name:          'battery-full-charged-symbolic'
                          History (charge):
                            1566291344	0.000	unknown
                          History (rate):
                            1566291344	0.000	unknown
                        

                        Will let the controller drain some and see if this changes any ...

                        1 Reply Last reply Reply Quote 0
                        • P
                          psyke83 Global Moderator
                          last edited by psyke83

                          @leet

                          Unfortunately, my hands are a bit tied due to the fact that I only have official controllers to test. I do vaguely recall reports from Shanwan owners that their controllers are recognized as the input-keyboard type, but it still works regardless (providing that you're using versions of hid-sony and BlueZ that implements Shanwan support).

                          Re: the battery status, I think that it updates only in intervals of 25%, so you won't see any change to the battery level until your controller reaches the 75% - 50% - 25% thresholds.

                          Regarding the quirk, take a look at: https://github.com/raspberrypi/linux/blob/rpi-5.1.y/drivers/hid/hid-sony.c

                          By setting the SHANWAN_GAMEPAD quirk, it changes the behaviour of the driver in two spots:

                          • The first is to fix non-stop rumbling when connected via USB. I don't think your controller has this issue, so applying this part of the quirk may hinder things.
                          • The second is to use the alternate interrupt channel for sixaxis_send_output_report. This is apparently needed to fix rumble and LEDs on Shanwan, and it's also needed to fix pairing for GASIA devices; however, my patch for GASIA used an inferior method of simply trying hid_hw_raw_request as a fallback whenever hid_hw_output_report failed.

                          It's possible that your SZMY controller needs only one of these two quirks. When I have some time, I'll update the patch to split off separate quirks for GASIA and SZMY, but the problem for the latter is that I don't know which of the two existing quirks your controller needs specifically (or if either is sufficient to fix the problem, in fact).

                          1 Reply Last reply Reply Quote 0
                          • L
                            leet
                            last edited by

                            Thanks @psyke83 ...

                            Reguarding the input-keyboard, LED, rumbler and battery status ... All just extra info, hoping that something might help. As a note, the controller was left on all day and night, with no change in the battery state. And it too is listed as a keyboard. This morning the controller was off. I did think that it had run flat. Pressed the PS button, controller started up and paired not problem, thou the LED1 is blinking. Battery state is still fully-charged, so I am thinking this might not be reporting anything.

                            Totally understand how hard trying to debug or assist with something like this. I looked at the hid-sony.c file and my eyes glazed over ... I would not know where to start to make any difference, let alone how to compile and test.

                            I am happy to try any change you think might help or give us more info. I don't get notifications on this forum, but I can open an issue or watch your branch at GitHub for any changes and test them out?

                            Is there a possibility that I can eBay gift you one of these controllers? Thou I don't remotely think you might get the same version that I have, as that info is never listed on eBay, just that it's a PS3 controller.

                            Thanks

                            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.