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

    Playstation 3 controller not connecting wired on new Pi4 RetroPie build

    Scheduled Pinned Locked Moved Help and Support
    ps3 controllerps3 driverps3 wired
    20 Posts 11 Posters 4.7k 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.
    • W
      Welcome
      last edited by

      @mitu said in Playstation 3 controller not connecting wired on new Pi4 RetroPie build:

      Have

      Hi there, Checked again just now, no luck unfortunately.

      I've tried pressing the reset button (requires a paperclip) while holding and not holding various buttons, tried every port on the Pi - USB2 and 3 - the 4 lights blink rapidly, very briefly the 2 middle ones illuminate, back to 4 blinking, and and then turn off.

      The two middle ones illuminating is what would happen when it was working successfully on the Pi3.

      I've given up and purchased an 8bitdo pro sn30. I had it connected to Bluetooth in 2 minutes and it hasn't missed a beat. Highly recommended

      D 1 Reply Last reply Reply Quote 0
      • D
        Dan1300 @Welcome
        last edited by

        @welcome I bet you have the chengdao ps3 controllers from Amazon.

        I am having the same issue.

        D 1 Reply Last reply Reply Quote 0
        • D
          doug @Dan1300
          last edited by

          @dan1300
          Hi,
          I suspect I have (2 of) the same controller too, bought with in the last 2 weeks. Arrived in a horrible oversized blue cardboard/plastic packaging?

          Looking at the kernel logs, I see that the hid-sony driver is failing to query the controller for its bluetooth MAC address:

          [ 4305.198159] usb 1-3.4.3: new full-speed USB device number 24 using xhci_hcd
          [ 4305.301620] usb 1-3.4.3: New USB device found, idVendor=054c, idProduct=0268, bcdDevice= 0.01
          [ 4305.301621] usb 1-3.4.3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
          [ 4305.301621] usb 1-3.4.3: Product: PS3 Controller
          [ 4305.308913] usbhid 1-3.4.3:1.0: can't add hid device: -71
          [ 4305.308922] usbhid: probe of 1-3.4.3:1.0 failed with error -71
          [ 4305.506057] usb 1-3.4.3: USB disconnect, device number 24
          [ 4305.802181] usb 1-3.4.3: new full-speed USB device number 25 using xhci_hcd
          [ 4305.905517] usb 1-3.4.3: New USB device found, idVendor=054c, idProduct=0268, bcdDevice= 5.72
          [ 4305.905518] usb 1-3.4.3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
          [ 4305.905519] usb 1-3.4.3: Product: PS3 Controller
          [ 4305.911972] sony 0003:054C:0268.000F: failed to retrieve feature report 0xf2 with the Sixaxis MAC address
          [ 4305.912025] sony 0003:054C:0268.000F: hiddev1,hidraw4: USB HID v81.11 Joystick [PS3 Controller] on usb-0000:00:14.0-3.4.3/input0
          [ 4305.912026] sony 0003:054C:0268.000F: failed to claim input
          

          (you can get these logs with dmesg command on the terminal, after you've plugged in the controller via USB).

          the usbhid error -71 seems harmless, the hid-sony driver proceeds to try and interrogate the device, but fails.

          These messages are the same on any recent linux box, so I'm setting up a kernel dev environment so that I can poke the driver and controller to see what happens.

          Some initial digging I did the other day did get the controller to return MAC address data, but I need to be more rigorous about changes in the driver to find out what this controller wants. I have not yet seen the driver enable bluetooth on this controller either (but, I also don't have any other PS controller to test to see what should be happening either - so I'm flying a little bit blind).

          I'd love to get these working, I'll report back here if I make any progress at all.

          Regards,
          Doug.

          D 1 Reply Last reply Reply Quote 0
          • D
            doug @doug
            last edited by

            @doug said in Playstation 3 controller not connecting wired on new Pi4 RetroPie build:

            PS3 Controller

            Also, one further thing to note - I already took the controller apart to find see if there's anything interesting or identifying about these... and nothing. Even the main chip inside has had its numbers/marks scratched off.

            However, I think the controller identifier PS3 Controller as shown in the logs above is a new variation - I've not seen that in googling around on this issue.

            Doug.

            D 1 Reply Last reply Reply Quote 0
            • D
              doug @doug
              last edited by

              @doug

              I think there's good news and bad news and bad news so far;

              Good: I've got the hid-sony driver to complete its initialisation, by changing some parameters in the code. The controller did return "a MAC address" eventually.

              Bad: I'm 50/50 on whether these controllers have no Bluetooth capability, despite being described as such. Even after the driver initialisation completed, I can see no BT devices matching the supposed MAC address during scanning. It could still be the case that the controller is not initialised properly yet.
              [I also think these controllers are supposed to have accelerometers/motion sensors in them, which I also suspect may be missing on these clones?].

              Bad: I have no idea if the driver code changes will break compatibility with other controllers, and the changes to support both would maybe not be acceptable to the driver maintainers; obviously it's not my place to completely rewrite the driver, but if further tests get this thing to work then I shall seek out a conversation with the maintainers to see what we can do. Alternatively, I can of course publish my own patch for anyone wanting to use the driver with these controllers.

              However: I've not yet managed to test the driver change on RPi/Retropie to see if these will work over USB connection. Initial guess is "yes" though, as I have seen button presses changing data both through HID protocol inspection and through the linux input events system.

              I'll try any put some more time on this as and when I can.

              Doug.


              Tech note: the driver changes are as follows:
              Set these #define values as follows:

              #define SIXAXIS_REPORT_0xF2_SIZE 64
              #define SIXAXIS_REPORT_0xF5_SIZE 64
              

              The controller doesn't return any data from any report address if the report size is any other value.

              That's it:

              [13792.403389] usb 1-2: new full-speed USB device number 8 using xhci_hcd
              [13792.792245] usb 1-2: New USB device found, idVendor=054c, idProduct=0268, bcdDevice= 5.72
              [13792.792246] usb 1-2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
              [13792.792247] usb 1-2: Product: PS3 Controller
              [13792.795105] sony 0003:054C:0268.0005: MAC address is: a0:5a:5c:36:69:d7
              [13792.797150] input: PS3 Controller Motion Sensors as /devices/pci0000:00/0000:00:0c.0/usb1/1-2/1-2:1.0/0003:054C:0268.0005/input/input17
              [13792.855627] input: PS3 Controller as /devices/pci0000:00/0000:00:0c.0/usb1/1-2/1-2:1.0/0003:054C:0268.0005/input/input16
              [13792.857037] sony 0003:054C:0268.0005: input,hiddev0,hidraw0: USB HID v81.11 Joystick [PS3 Controller] on usb-0000:00:0c.0-2/input0
              [13792.857710] sony 0003:054C:0268.0005: sixaxis_send_output_report ret=36
              
              P M 2 Replies Last reply Reply Quote 2
              • P
                Poncho @doug
                last edited by

                @doug

                I am also having an issue with a new PS3 controller. After countless hours bouncing around the web I think your solution looks promising. I have found a "hid-sony" folder on my raspberry which I suspect contains the driver. However, I am an absolute noob with respect to Linux and I see multiple files that could be candidates.

                Could you please clarify which file needs to be updated (path/filename)?

                Also, can you indicate where in the file those two lines of code need to be placed?

                Thank you for any help you can provide.

                1 Reply Last reply Reply Quote 0
                • Q
                  Quemandoacromo
                  last edited by Quemandoacromo

                  @doug Same problem here:
                  #pi@retropie:~ $ dmesg
                  [ 1400.112613] usb 1-1.5: USB disconnect, device number 22
                  [ 2341.981832] usb 1-1.5: new full-speed USB device number 23 using dwc_otg
                  [ 2342.120928] usb 1-1.5: New USB device found, idVendor=054c, idProduct=0268, bcdDevice= 0.01
                  [ 2342.120947] usb 1-1.5: New USB device strings: Mfr=0, Product=2, SerialNumber=0
                  [ 2342.120962] usb 1-1.5: Product: PS3 Controller
                  [ 2342.128531] usbhid 1-1.5:1.0: can't add hid device: -32
                  [ 2342.128615] usbhid: probe of 1-1.5:1.0 failed with error -32
                  [ 2342.196562] usb 1-1.5: USB disconnect, device number 23
                  [ 2342.691863] usb 1-1.5: new full-speed USB device number 24 using dwc_otg
                  [ 2342.832053] usb 1-1.5: New USB device found, idVendor=054c, idProduct=0268, bcdDevice= 5.72
                  [ 2342.832070] usb 1-1.5: New USB device strings: Mfr=0, Product=2, SerialNumber=0
                  [ 2342.832085] usb 1-1.5: Product: PS3 Controller
                  [ 2342.839050] sony 0003:054C:0268.000D: failed to retrieve feature report 0xf2 with the Sixaxis MAC address
                  [ 2342.839601] sony 0003:054C:0268.000D: hiddev96,hidraw2: USB HID v81.11 Joystick [PS3 Controller] on usb-3f980000.usb-1.5/input0
                  [ 2342.839620] sony 0003:054C:0268.000D: failed to claim input

                  pi@retropie:~ $ bluetoothctl
                  Agent registered
                  [bluetooth]# devices
                  Device A0:5A:5C:3D:CE:67 Pro Controller
                  [CHG] Device A0:5A:5C:3D:CE:67 Connected: yes
                  [Pro Controller]# info
                  Device A0:5A:5C:3D:CE:67 (public)
                  Name: Pro Controller
                  Alias: Pro Controller
                  Class: 0x00002504
                  Icon: input-gaming
                  Paired: no
                  Trusted: yes
                  Blocked: no
                  Connected: yes
                  LegacyPairing: no
                  [Pro Controller]# pair
                  Attempting to pair with A0:5A:5C:3D:CE:67
                  Failed to pair: org.bluez.Error.AuthenticationFailed
                  [CHG] Device A0:5A:5C:3D:CE:67 Connected: no

                  1 Reply Last reply Reply Quote 1
                  • M
                    MacGyver
                    last edited by MacGyver

                    Same issue here with a new "JAMSWALL" branded PS3 controller off Amazon.

                    I tried various kernels 4.19, 5.4, 5.10. (I even tried Linux, same thing, 4 slow blink, 2 middle, then back to 4)
                    Worked fine on Windows 10 though.
                    I tried with the drivers Sixaxis, PS3Controller, and CustomHIDSony, none of them worked.
                    The controller wouldn't work cabled in, and couldn't be paired via Bluetooth.
                    I also tried it on a PI3, and the USB2 and USB3 ports on my Pi4.
                    I even tried blacklisting the hid-sony module.

                    Bus 001 Device 027: ID 054c:0268 Sony Corp. Batoh Device / PlayStation 3 Controller
                    Couldn't open device, some information will be missing
                    Device Descriptor:
                      bLength                18
                      bDescriptorType         1
                      bcdUSB               2.00
                      bDeviceClass            0 
                      bDeviceSubClass         0 
                      bDeviceProtocol         0 
                      bMaxPacketSize0        64
                      idVendor           0x054c Sony Corp.
                      idProduct          0x0268 Batoh Device / PlayStation 3 Controller
                      bcdDevice            5.72
                      iManufacturer           0 
                      iProduct                2 
                      iSerial                 0 
                      bNumConfigurations      1
                      Configuration Descriptor:
                        bLength                 9
                        bDescriptorType         2
                        wTotalLength       0x0029
                        bNumInterfaces          1
                        bConfigurationValue     1
                        iConfiguration          0 
                        bmAttributes         0x80
                          (Bus Powered)
                        MaxPower              500mA
                        Interface Descriptor:
                          bLength                 9
                          bDescriptorType         4
                          bInterfaceNumber        0
                          bAlternateSetting       0
                          bNumEndpoints           2
                          bInterfaceClass         3 Human Interface Device
                          bInterfaceSubClass      0 
                          bInterfaceProtocol      0 
                          iInterface              0 
                            HID Device Descriptor:
                              bLength                 9
                              bDescriptorType        33
                              bcdHID               1.11
                              bCountryCode            0 Not supported
                              bNumDescriptors         1
                              bDescriptorType        34 Report
                              wDescriptorLength     148
                             Report Descriptors: 
                               ** UNAVAILABLE **
                          Endpoint Descriptor:
                            bLength                 7
                            bDescriptorType         5
                            bEndpointAddress     0x02  EP 2 OUT
                            bmAttributes            3
                              Transfer Type            Interrupt
                              Synch Type               None
                              Usage Type               Data
                            wMaxPacketSize     0x0040  1x 64 bytes
                            bInterval               1
                          Endpoint Descriptor:
                            bLength                 7
                            bDescriptorType         5
                            bEndpointAddress     0x82  EP 2 IN
                            bmAttributes            3
                              Transfer Type            Interrupt
                              Synch Type               None
                              Usage Type               Data
                            wMaxPacketSize     0x0040  1x 64 bytes
                            bInterval               1
                    
                    
                    [   16.077838] Bluetooth: Core ver 2.22
                    [   16.077927] NET: Registered protocol family 31
                    [   16.077939] Bluetooth: HCI device and connection manager initialized
                    [   16.078024] Bluetooth: HCI socket layer initialized
                    [   16.078048] Bluetooth: L2CAP socket layer initialized
                    [   16.078078] Bluetooth: SCO socket layer initialized
                    [   16.083707] Bluetooth: HCI UART driver ver 2.3
                    [   16.083716] Bluetooth: HCI UART protocol H4 registered
                    [   16.083752] Bluetooth: HCI UART protocol Three-wire (H5) registered
                    [   16.083893] Bluetooth: HCI UART protocol Broadcom registered
                    [   16.248570] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
                    [   16.248577] Bluetooth: BNEP filters: protocol multicast
                    [   16.248590] Bluetooth: BNEP socket layer initialized
                    [   64.655323] usb 1-1.3: USB disconnect, device number 5
                    [   71.094313] usb 1-1.3: new full-speed USB device number 6 using xhci_hcd
                    [   71.232931] usb 1-1.3: New USB device found, idVendor=054c, idProduct=0268, bcdDevice= 0.01
                    [   71.232951] usb 1-1.3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
                    [   71.232967] usb 1-1.3: Product: PS3 Controller
                    [   71.245636] usbhid 1-1.3:1.0: can't add hid device: -32
                    [   71.245719] usbhid: probe of 1-1.3:1.0 failed with error -32
                    [   71.312237] usb 1-1.3: USB disconnect, device number 6
                    [   71.854308] usb 1-1.3: new full-speed USB device number 7 using xhci_hcd
                    [   71.992536] usb 1-1.3: New USB device found, idVendor=054c, idProduct=0268, bcdDevice= 5.72
                    [   71.992553] usb 1-1.3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
                    [   71.992567] usb 1-1.3: Product: PS3 Controller
                    [   72.002411] sony 0003:054C:0268.0004: failed to retrieve feature report 0xf2 with the Sixaxis MAC address
                    [   72.002789] sony 0003:054C:0268.0004: hiddev97,hidraw2: USB HID v81.11 Joystick [PS3 Controller] on usb-0000:01:00.0-1.3/input0
                    [   72.002804] sony 0003:054C:0268.0004: failed to claim input
                    
                    
                    
                    

                    I didn't try using a powered USB hub ( I remember seeing somewhere that that can make a difference), but I tried everything else.

                    I'm sure someone with driver/coding skills will eventually update the "hid-sony" driver in Linux and that will trickle down to the Raspberry Pi but I had to give up and return it.

                    1 Reply Last reply Reply Quote 1
                    • M
                      Maksim @doug
                      last edited by

                      @doug said in Playstation 3 controller not connecting wired on new Pi4 RetroPie build:

                      #define SIXAXIS_REPORT_0xF2_SIZE 64
                      #define SIXAXIS_REPORT_0xF5_SIZE 64

                      I join the question. Where do I need to enter the cherished lines?

                      b3nB 1 Reply Last reply Reply Quote 0
                      • b3nB
                        b3n @Maksim
                        last edited by

                        @maksim I believe those 2 lines should end up here.

                        1 Reply Last reply Reply Quote 1
                        • b3nB
                          b3n
                          last edited by b3n

                          I've 2 type of third-party controller.
                          And one has apparently the same issue on 2 different version of the Pi:

                          • Raspberry Pi 3 Model B Plus Rev 1.3 - kernel 5.10.17-v7+
                          • Raspberry Pi 4 Model B Rev 1.4 - kernel 5.4.83-v7l+

                          One is working:

                          [ 1924.940819] usb 1-1.1.2: new full-speed USB device number 18 using dwc_otg
                          [ 1925.074303] usb 1-1.1.2: New USB device found, idVendor=054c, idProduct=0268, bcdDevice= 1.00
                          [ 1925.074321] usb 1-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
                          [ 1925.074332] usb 1-1.1.2: Product: PS3 GamePad
                          [ 1925.074339] usb 1-1.1.2: Manufacturer: SHANWAN
                          [ 1925.083996] input: SHANWAN PS3 GamePad Motion Sensors as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0/0003:054C:0268.0009/input/input11
                          [ 1925.161004] input: SHANWAN PS3 GamePad as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0/0003:054C:0268.0009/input/input10
                          [ 1925.161595] sony 0003:054C:0268.0009: input,hiddev97,hidraw2: USB HID v81.10 Joystick [SHANWAN PS3 GamePad] on usb-3f980000.usb-1.1.2/input0
                          
                          Bus 001 Device 018: ID 054c:0268 Sony Corp. Batoh Device / PlayStation 3 Controller
                          Device Descriptor:
                            bLength                18
                            bDescriptorType         1
                            bcdUSB               1.10
                            bDeviceClass            0 
                            bDeviceSubClass         0 
                            bDeviceProtocol         0 
                            bMaxPacketSize0        64
                            idVendor           0x054c Sony Corp.
                            idProduct          0x0268 Batoh Device / PlayStation 3 Controller
                            bcdDevice            1.00
                            iManufacturer           1 
                            iProduct                2 
                            iSerial                 0 
                            bNumConfigurations      1
                            Configuration Descriptor:
                              bLength                 9
                              bDescriptorType         2
                              wTotalLength       0x0029
                              bNumInterfaces          1
                              bConfigurationValue     1
                              iConfiguration          0 
                              bmAttributes         0x80
                                (Bus Powered)
                              MaxPower              500mA
                              Interface Descriptor:
                                bLength                 9
                                bDescriptorType         4
                                bInterfaceNumber        0
                                bAlternateSetting       0
                                bNumEndpoints           2
                                bInterfaceClass         3 Human Interface Device
                                bInterfaceSubClass      0 
                                bInterfaceProtocol      0 
                                iInterface              0 
                                  HID Device Descriptor:
                                    bLength                 9
                                    bDescriptorType        33
                                    bcdHID               1.10
                                    bCountryCode            0 Not supported
                                    bNumDescriptors         1
                                    bDescriptorType        34 Report
                                    wDescriptorLength     148
                                   Report Descriptors: 
                                     ** UNAVAILABLE **
                                Endpoint Descriptor:
                                  bLength                 7
                                  bDescriptorType         5
                                  bEndpointAddress     0x02  EP 2 OUT
                                  bmAttributes            3
                                    Transfer Type            Interrupt
                                    Synch Type               None
                                    Usage Type               Data
                                  wMaxPacketSize     0x0040  1x 64 bytes
                                  bInterval               1
                                Endpoint Descriptor:
                                  bLength                 7
                                  bDescriptorType         5
                                  bEndpointAddress     0x81  EP 1 IN
                                  bmAttributes            3
                                    Transfer Type            Interrupt
                                    Synch Type               None
                                    Usage Type               Data
                                  wMaxPacketSize     0x0040  1x 64 bytes
                                  bInterval               1
                          

                          And the other not:

                          [ 1473.303339] usb 1-1.1.2: new full-speed USB device number 17 using dwc_otg
                          [ 1473.442361] usb 1-1.1.2: New USB device found, idVendor=054c, idProduct=0268, bcdDevice= 5.72
                          [ 1473.442380] usb 1-1.1.2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
                          [ 1473.442390] usb 1-1.1.2: Product: PS3 Controller
                          [ 1473.450851] sony 0003:054C:0268.0008: failed to retrieve feature report 0xf2 with the Sixaxis MAC address
                          [ 1473.451312] sony 0003:054C:0268.0008: hiddev97,hidraw2: USB HID v81.11 Joystick [PS3 Controller] on usb-3f980000.usb-1.1.2/input0
                          [ 1473.451328] sony 0003:054C:0268.0008: failed to claim input
                          
                          Bus 001 Device 017: ID 054c:0268 Sony Corp. Batoh Device / PlayStation 3 Controller
                          Device Descriptor:
                            bLength                18
                            bDescriptorType         1
                            bcdUSB               2.00
                            bDeviceClass            0 
                            bDeviceSubClass         0 
                            bDeviceProtocol         0 
                            bMaxPacketSize0        64
                            idVendor           0x054c Sony Corp.
                            idProduct          0x0268 Batoh Device / PlayStation 3 Controller
                            bcdDevice            5.72
                            iManufacturer           0 
                            iProduct                2 
                            iSerial                 0 
                            bNumConfigurations      1
                            Configuration Descriptor:
                              bLength                 9
                              bDescriptorType         2
                              wTotalLength       0x0029
                              bNumInterfaces          1
                              bConfigurationValue     1
                              iConfiguration          0 
                              bmAttributes         0x80
                                (Bus Powered)
                              MaxPower              500mA
                              Interface Descriptor:
                                bLength                 9
                                bDescriptorType         4
                                bInterfaceNumber        0
                                bAlternateSetting       0
                                bNumEndpoints           2
                                bInterfaceClass         3 Human Interface Device
                                bInterfaceSubClass      0 
                                bInterfaceProtocol      0 
                                iInterface              0 
                                  HID Device Descriptor:
                                    bLength                 9
                                    bDescriptorType        33
                                    bcdHID               1.11
                                    bCountryCode            0 Not supported
                                    bNumDescriptors         1
                                    bDescriptorType        34 Report
                                    wDescriptorLength     148
                                   Report Descriptors: 
                                     ** UNAVAILABLE **
                                Endpoint Descriptor:
                                  bLength                 7
                                  bDescriptorType         5
                                  bEndpointAddress     0x02  EP 2 OUT
                                  bmAttributes            3
                                    Transfer Type            Interrupt
                                    Synch Type               None
                                    Usage Type               Data
                                  wMaxPacketSize     0x0040  1x 64 bytes
                                  bInterval               1
                                Endpoint Descriptor:
                                  bLength                 7
                                  bDescriptorType         5
                                  bEndpointAddress     0x82  EP 2 IN
                                  bmAttributes            3
                                    Transfer Type            Interrupt
                                    Synch Type               None
                                    Usage Type               Data
                                  wMaxPacketSize     0x0040  1x 64 bytes
                                  bInterval               1
                          

                          I've no clue how to go from there, but I've noticed this diff from the USB listing:

                          <   bcdUSB               1.10
                          ---
                          >   bcdUSB               2.00
                          12,13c12,13
                          <   bcdDevice            1.00
                          <   iManufacturer           1 
                          ---
                          >   bcdDevice            5.72
                          >   iManufacturer           0 
                          40c40
                          <           bcdHID               1.10
                          ---
                          >           bcdHID               1.11
                          60c60
                          <         bEndpointAddress     0x81  EP 1 IN
                          ---
                          >         bEndpointAddress     0x82  EP 2 IN
                          

                          I'm willing to test some patched hid_sony module, but I'll need some guidance to compile...

                          1 Reply Last reply Reply Quote 1
                          • b3nB
                            b3n
                            last edited by

                            Following this document, I've managed to compile the hid-sony module with the defined values as proposed by @doug. And the related error is indeed gone.

                            Here is the output I have now:

                            [10679.024496] usb 2-1.1: new full-speed USB device number 10 using ehci-pci
                            [10679.137551] usb 2-1.1: New USB device found, idVendor=054c, idProduct=0268, bcdDevice= 0.01
                            [10679.137560] usb 2-1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
                            [10679.137564] usb 2-1.1: Product: PS3 Controller
                            [10679.139987] usbhid 2-1.1:1.0: can't add hid device: -32
                            [10679.140029] usbhid: probe of 2-1.1:1.0 failed with error -32
                            [10679.350272] usb 2-1.1: USB disconnect, device number 10
                            [10679.644500] usb 2-1.1: new full-speed USB device number 11 using ehci-pci
                            [10679.761543] usb 2-1.1: New USB device found, idVendor=054c, idProduct=0268, bcdDevice= 5.72
                            [10679.761551] usb 2-1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
                            [10679.761555] usb 2-1.1: Product: PS3 Controller
                            [10679.770223] input: PS3 Controller Motion Sensors as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.0/0003:054C:0268.000B/input/input60
                            [10679.828566] input: PS3 Controller as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1:1.0/0003:054C:0268.000B/input/input59
                            [10679.828908] sony 0003:054C:0268.000B: input,hiddev1,hidraw5: USB HID v81.11 Joystick [PS3 Controller] on usb-0000:00:1d.0-1.1/input0
                            

                            I'll upload my little contribution in Github later, in case someone else want to try.

                            b3nB 1 Reply Last reply Reply Quote 1
                            • b3nB
                              b3n @b3n
                              last edited by

                              @b3n Here is the modest repo.

                              M 1 Reply Last reply Reply Quote 1
                              • M
                                Maksim @b3n
                                last edited by

                                @b3n said in Playstation 3 controller not connecting wired on new Pi4 RetroPie build:

                                Here is the modest repo.

                                Thank you very much for your participation and your response!
                                @doug wrote that the values should be
                                #define SIXAXIS_REPORT_0xF2_SIZE 64
                                #define SIXAXIS_REPORT_0xF5_SIZE 64
                                And you write that
                                #define SIXAXIS_REPORT_0xF2_SIZE 17
                                #define SIXAXIS_REPORT_0xF5_SIZE 8
                                What does this difference depend on?
                                May I have other values that differ from both yours and @doug?

                                b3nB 1 Reply Last reply Reply Quote 0
                                • b3nB
                                  b3n @Maksim
                                  last edited by b3n

                                  @maksim Sorry for the confusion: I've kept the original code in the main branch and set the ones from @doug in the devel branch.
                                  It's just the way I'm used to work, most people work directly in the main branch...
                                  And this particular case, I guess I should keep an uptreambranch inline with the current code from the linux kernel repo.

                                  Anyway: once you've cloned the repo, you can checkout the devel branch with git checkout devel.

                                  I'd like to make the change proposed by @doug a bit more 'smart' before merging it the main branch because this single change is likely breaking the use of other PS3 controller (I'll test this later).
                                  We may find a way to add some logic to handle both cases...

                                  In addition, if the USB part works in the devel branch, the Bluetooth is still not working...

                                  1 Reply Last reply Reply Quote 0
                                  • b3nB
                                    b3n
                                    last edited by

                                    I've never worked on Linux module before, but I suspect one needs to make the hid-sony more smart about those 3rd party controller by altering the logic of sixaxis_set_operational_usb().
                                    Likely to try first the original defined values (17 and 8), then the alternative (64,64) in case the first have failed!?
                                    It seems to me that is already what the authors are doing by using the second report (0xF5) or even later for the SHANWAN_PAD.

                                    What I miss the most in this code is some debug log (only hid_err and hid_info are used here).
                                    Maybe because it is a bad idea to debug too much in such piece of code...

                                    Nevertheless, I've found some other functions I'll try to use in this repo:

                                    #define hid_err(hid, fmt, ...)				\
                                    	dev_err(&(hid)->dev, fmt, ##__VA_ARGS__)
                                    #define hid_notice(hid, fmt, ...)			\
                                    	dev_notice(&(hid)->dev, fmt, ##__VA_ARGS__)
                                    #define hid_warn(hid, fmt, ...)				\
                                    	dev_warn(&(hid)->dev, fmt, ##__VA_ARGS__)
                                    #define hid_info(hid, fmt, ...)				\
                                    	dev_info(&(hid)->dev, fmt, ##__VA_ARGS__)
                                    #define hid_dbg(hid, fmt, ...)				\
                                    	dev_dbg(&(hid)->dev, fmt, ##__VA_ARGS__)
                                    
                                    1 Reply Last reply Reply Quote 0
                                    • F
                                      Flautert
                                      last edited by

                                      Hello guys

                                      Anyone has a solution for this issue?

                                      I've been digging a lot into internet, but couldn't make any progress :(

                                      Aug 6 20:39:56 retropie kernel: [ 1261.102497] usb 1-1.3: new full-speed USB device number 9 using xhci_hcd
                                      Aug 6 20:39:56 retropie kernel: [ 1261.240776] usb 1-1.3: New USB device found, idVendor=054c, idProduct=0268, bcdDevice= 5.72
                                      Aug 6 20:39:56 retropie kernel: [ 1261.240796] usb 1-1.3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
                                      Aug 6 20:39:56 retropie kernel: [ 1261.240813] usb 1-1.3: Product: PS3 Controller
                                      Aug 6 20:39:56 retropie kernel: [ 1261.252296] sony 0003:054C:0268.0004: hiddev96,hidraw1: USB HID v81.11 Joystick [PS3 Controller] on usb-0000:01:00.0-1.3/input0
                                      Aug 6 20:39:56 retropie mtp-probe: checking bus 1, device 9: "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3"
                                      Aug 6 20:39:56 retropie mtp-probe: bus: 1, device: 9 was not an MTP device
                                      Aug 6 20:39:56 retropie mtp-probe: checking bus 1, device 9: "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3"
                                      Aug 6 20:39:56 retropie mtp-probe: bus: 1, device: 9 was not an MTP device

                                      Regards

                                      1 Reply Last reply Reply Quote 0
                                      • K
                                        KanuX
                                        last edited by KanuX

                                        Reading the replies from @doug and @b3n, I've managed to implement the fix by giving a change to the report when the controller is connected.

                                        [48361.273580] usb 1-2.4: USB disconnect, device number 25
                                        [48366.681972] usb 1-2.4: new full-speed USB device number 26 using xhci_hcd
                                        [48366.883070] usb 1-2.4: New USB device found, idVendor=054c, idProduct=0268, bcdDevice= 0.01
                                        [48366.883092] usb 1-2.4: New USB device strings: Mfr=0, Product=2, SerialNumber=0
                                        [48366.883102] usb 1-2.4: Product: PS3 Controller
                                        [48366.890323] usbhid 1-2.4:1.0: can't add hid device: -32
                                        [48366.890366] usbhid: probe of 1-2.4:1.0 failed with error -32
                                        [48366.905149] usb 1-2.4: USB disconnect, device number 26
                                        [48367.449946] usb 1-2.4: new full-speed USB device number 27 using xhci_hcd
                                        [48367.643118] usb 1-2.4: New USB device found, idVendor=054c, idProduct=0268, bcdDevice= 5.72
                                        [48367.643141] usb 1-2.4: New USB device strings: Mfr=0, Product=2, SerialNumber=0
                                        [48367.643150] usb 1-2.4: Product: PS3 Controller
                                        [48367.654388] input: PS3 Controller Motion Sensors as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.4/1-2.4:1.0/0003:054C:0268.0014/input/input47
                                        [48367.706730] input: PS3 Controller as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.4/1-2.4:1.0/0003:054C:0268.0014/input/input46
                                        [48367.707515] sony 0003:054C:0268.0014: input,hiddev98,hidraw6: USB HID v81.11 Joystick [PS3 Controller] on usb-0000:00:14.0-2.4/input0
                                        

                                        Good: The driver works even with the latest driver available. It just change the report of the given controller, so, other controllers will remain functional.

                                        Bad: The controller only works with the cable and the player's count LEDs turn on in a weird way.

                                        TODO: I still want to make this driver actually doable. Any help will be very welcome.

                                        GitHub: https://github.com/KanuX-14/GeneriKit

                                        Edit: The original driver will be kept. It can be enabled again by deleting the line 'blacklist hid-sony' in /etc/modprobe.d/generikit.conf.

                                        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.