chrippa / ds4drv

A Sony DualShock 4 userspace driver for Linux
MIT License
1.04k stars 213 forks source link

Help adding knockoff ds4 to python code #177

Open lilmike opened 4 years ago

lilmike commented 4 years ago

Hi there,

I'm trying to help my friend, who has a chinese knockoff ps4 controller that, for whatever reason, shows up in linux as a ps3 controller. Because of this, the built in touchpad does nothing. I'm trying to add the name of this device to the python code so he can hopefully use it, but having no luck. Any help? The output of lsusb -v is below:

Bus 002 Device 039: 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            1.00
iManufacturer           1 SZMY-POWER CO.,LTD.
iProduct                2 PLAYSTATION(R)3 Controller
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              10
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
Device Status:     0x0000
(Bus Powered)

-Michael.

albfan commented 2 years ago

054c:0268 is a ps3 controller. I would open controller and check inf touchpad is really connected to something.