* Sony DualShock4 - basic functions work, but looking to improve support
@ 2013-12-07 17:52 simon
2013-12-07 20:43 ` simon
2013-12-09 0:51 ` simon
0 siblings, 2 replies; 8+ messages in thread
From: simon @ 2013-12-07 17:52 UTC (permalink / raw)
To: Linux Input; +Cc: Antonio Ospite
[-- Attachment #1: Type: text/plain, Size: 507 bytes --]
Hi all,
I wanted to report that basic functions of the DualShock4 work under Linux
(USB connected), but I'd like to work on it to get everything working -
like we have on the DualShock3.
Attached are a couple of logs and the report descriptor.
Haptic/Rumble does not work, even though I have my machine patched to make
DualShock3 work.
If we look at the hidraw stream there's a lot (64 bytes) more there!
--
$ hexdump -v -e '64/1 "%02x " "\n"' < /dev/hidraw0
--
Anyone here want to collaborate?
Simon
[-- Attachment #2: lsusb_vv.txt --]
[-- Type: text/plain, Size: 2355 bytes --]
Bus 003 Device 002: ID 054c:05c4 Sony Corp.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x054c Sony Corp.
idProduct 0x05c4
bcdDevice 1.00
iManufacturer 1 Sony Computer Entertainment
iProduct 2 Wireless Controller
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 41
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 467
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 5
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 5
Device Status: 0x0000
(Bus Powered)
[-- Attachment #3: des.code --]
[-- Type: application/octet-stream, Size: 14490 bytes --]
0x05, 0x01, /* Usage Page (Desktop), */
0x09, 0x05, /* Usage (Gamepad), */
0xA1, 0x01, /* Collection (Application), */
0x85, 0x01, /* Report ID (1), */
0x09, 0x30, /* Usage (X), */
0x09, 0x31, /* Usage (Y), */
0x09, 0x32, /* Usage (Z), */
0x09, 0x35, /* Usage (Rz), */
0x15, 0x00, /* Logical Minimum (0), */
0x26, 0xFF, 0x00, /* Logical Maximum (255), */
0x75, 0x08, /* Report Size (8), */
0x95, 0x04, /* Report Count (4), */
0x81, 0x02, /* Input (Variable), */
0x09, 0x39, /* Usage (Hat Switch), */
0x15, 0x00, /* Logical Minimum (0), */
0x25, 0x07, /* Logical Maximum (7), */
0x35, 0x00, /* Physical Minimum (0), */
0x46, 0x3B, 0x01, /* Physical Maximum (315), */
0x65, 0x14, /* Unit (Degrees), */
0x75, 0x04, /* Report Size (4), */
0x95, 0x01, /* Report Count (1), */
0x81, 0x42, /* Input (Variable, Null State), */
0x65, 0x00, /* Unit, */
0x05, 0x09, /* Usage Page (Button), */
0x19, 0x01, /* Usage Minimum (01h), */
0x29, 0x0E, /* Usage Maximum (0Eh), */
0x15, 0x00, /* Logical Minimum (0), */
0x25, 0x01, /* Logical Maximum (1), */
0x75, 0x01, /* Report Size (1), */
0x95, 0x0E, /* Report Count (14), */
0x81, 0x02, /* Input (Variable), */
0x06, 0x00, 0xFF, /* Usage Page (FF00h), */
0x09, 0x20, /* Usage (20h), */
0x75, 0x06, /* Report Size (6), */
0x95, 0x01, /* Report Count (1), */
0x15, 0x00, /* Logical Minimum (0), */
0x25, 0x7F, /* Logical Maximum (127), */
0x81, 0x02, /* Input (Variable), */
0x05, 0x01, /* Usage Page (Desktop), */
0x09, 0x33, /* Usage (Rx), */
0x09, 0x34, /* Usage (Ry), */
0x15, 0x00, /* Logical Minimum (0), */
0x26, 0xFF, 0x00, /* Logical Maximum (255), */
0x75, 0x08, /* Report Size (8), */
0x95, 0x02, /* Report Count (2), */
0x81, 0x02, /* Input (Variable), */
0x06, 0x00, 0xFF, /* Usage Page (FF00h), */
0x09, 0x21, /* Usage (21h), */
0x95, 0x36, /* Report Count (54), */
0x81, 0x02, /* Input (Variable), */
0x85, 0x05, /* Report ID (5), */
0x09, 0x22, /* Usage (22h), */
0x95, 0x1F, /* Report Count (31), */
0x91, 0x02, /* Output (Variable), */
0x85, 0x04, /* Report ID (4), */
0x09, 0x23, /* Usage (23h), */
0x95, 0x24, /* Report Count (36), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x02, /* Report ID (2), */
0x09, 0x24, /* Usage (24h), */
0x95, 0x24, /* Report Count (36), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x08, /* Report ID (8), */
0x09, 0x25, /* Usage (25h), */
0x95, 0x03, /* Report Count (3), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x10, /* Report ID (16), */
0x09, 0x26, /* Usage (26h), */
0x95, 0x04, /* Report Count (4), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x11, /* Report ID (17), */
0x09, 0x27, /* Usage (27h), */
0x95, 0x02, /* Report Count (2), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x12, /* Report ID (18), */
0x06, 0x02, 0xFF, /* Usage Page (FF02h), */
0x09, 0x21, /* Usage (21h), */
0x95, 0x0F, /* Report Count (15), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x13, /* Report ID (19), */
0x09, 0x22, /* Usage (22h), */
0x95, 0x16, /* Report Count (22), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x14, /* Report ID (20), */
0x06, 0x05, 0xFF, /* Usage Page (FF05h), */
0x09, 0x20, /* Usage (20h), */
0x95, 0x10, /* Report Count (16), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x15, /* Report ID (21), */
0x09, 0x21, /* Usage (21h), */
0x95, 0x2C, /* Report Count (44), */
0xB1, 0x02, /* Feature (Variable), */
0x06, 0x80, 0xFF, /* Usage Page (FF80h), */
0x85, 0x80, /* Report ID (128), */
0x09, 0x20, /* Usage (20h), */
0x95, 0x06, /* Report Count (6), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x81, /* Report ID (129), */
0x09, 0x21, /* Usage (21h), */
0x95, 0x06, /* Report Count (6), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x82, /* Report ID (130), */
0x09, 0x22, /* Usage (22h), */
0x95, 0x05, /* Report Count (5), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x83, /* Report ID (131), */
0x09, 0x23, /* Usage (23h), */
0x95, 0x01, /* Report Count (1), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x84, /* Report ID (132), */
0x09, 0x24, /* Usage (24h), */
0x95, 0x04, /* Report Count (4), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x85, /* Report ID (133), */
0x09, 0x25, /* Usage (25h), */
0x95, 0x06, /* Report Count (6), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x86, /* Report ID (134), */
0x09, 0x26, /* Usage (26h), */
0x95, 0x06, /* Report Count (6), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x87, /* Report ID (135), */
0x09, 0x27, /* Usage (27h), */
0x95, 0x23, /* Report Count (35), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x88, /* Report ID (136), */
0x09, 0x28, /* Usage (28h), */
0x95, 0x22, /* Report Count (34), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x89, /* Report ID (137), */
0x09, 0x29, /* Usage (29h), */
0x95, 0x02, /* Report Count (2), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x90, /* Report ID (144), */
0x09, 0x30, /* Usage (30h), */
0x95, 0x05, /* Report Count (5), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x91, /* Report ID (145), */
0x09, 0x31, /* Usage (31h), */
0x95, 0x03, /* Report Count (3), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x92, /* Report ID (146), */
0x09, 0x32, /* Usage (32h), */
0x95, 0x03, /* Report Count (3), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x93, /* Report ID (147), */
0x09, 0x33, /* Usage (33h), */
0x95, 0x0C, /* Report Count (12), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xA0, /* Report ID (160), */
0x09, 0x40, /* Usage (40h), */
0x95, 0x06, /* Report Count (6), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xA1, /* Report ID (161), */
0x09, 0x41, /* Usage (41h), */
0x95, 0x01, /* Report Count (1), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xA2, /* Report ID (162), */
0x09, 0x42, /* Usage (42h), */
0x95, 0x01, /* Report Count (1), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xA3, /* Report ID (163), */
0x09, 0x43, /* Usage (43h), */
0x95, 0x30, /* Report Count (48), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xA4, /* Report ID (164), */
0x09, 0x44, /* Usage (44h), */
0x95, 0x0D, /* Report Count (13), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xA5, /* Report ID (165), */
0x09, 0x45, /* Usage (45h), */
0x95, 0x15, /* Report Count (21), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xA6, /* Report ID (166), */
0x09, 0x46, /* Usage (46h), */
0x95, 0x15, /* Report Count (21), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xF0, /* Report ID (240), */
0x09, 0x47, /* Usage (47h), */
0x95, 0x3F, /* Report Count (63), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xF1, /* Report ID (241), */
0x09, 0x48, /* Usage (48h), */
0x95, 0x3F, /* Report Count (63), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xF2, /* Report ID (242), */
0x09, 0x49, /* Usage (49h), */
0x95, 0x0F, /* Report Count (15), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xA7, /* Report ID (167), */
0x09, 0x4A, /* Usage (4Ah), */
0x95, 0x01, /* Report Count (1), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xA8, /* Report ID (168), */
0x09, 0x4B, /* Usage (4Bh), */
0x95, 0x01, /* Report Count (1), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xA9, /* Report ID (169), */
0x09, 0x4C, /* Usage (4Ch), */
0x95, 0x08, /* Report Count (8), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xAA, /* Report ID (170), */
0x09, 0x4E, /* Usage (4Eh), */
0x95, 0x01, /* Report Count (1), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xAB, /* Report ID (171), */
0x09, 0x4F, /* Usage (4Fh), */
0x95, 0x39, /* Report Count (57), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xAC, /* Report ID (172), */
0x09, 0x50, /* Usage (50h), */
0x95, 0x39, /* Report Count (57), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xAD, /* Report ID (173), */
0x09, 0x51, /* Usage (51h), */
0x95, 0x0B, /* Report Count (11), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xAE, /* Report ID (174), */
0x09, 0x52, /* Usage (52h), */
0x95, 0x01, /* Report Count (1), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xAF, /* Report ID (175), */
0x09, 0x53, /* Usage (53h), */
0x95, 0x02, /* Report Count (2), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xB0, /* Report ID (176), */
0x09, 0x54, /* Usage (54h), */
0x95, 0x3F, /* Report Count (63), */
0xB1, 0x02, /* Feature (Variable), */
0xC0 /* End Collection */
[-- Attachment #4: des.bin --]
[-- Type: application/octet-stream, Size: 467 bytes --]
[-- Attachment #5: jstest.txt --]
[-- Type: text/plain, Size: 1021 bytes --]
Driver version is 2.1.0.
Joystick (Sony Computer Entertainment Wireless Controller) has 8 axes (X, Y, Z, Rx, Ry, Rz, Hat0X, Hat0Y)
and 14 buttons (BtnX, BtnY, BtnZ, BtnTL, BtnTR, BtnTL2, BtnTR2, BtnSelect, BtnStart, BtnMode, BtnThumbL, BtnThumbR, ?, ?).
Testing ... (interrupt to exit)
Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 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
Axes:
0: 0 L-Thumbstick X (left -ve)
1: 0 L-Thumbstick Y (up -ve)
2: 0 R-Thumbstick X (left -ve)
3: 0 L-Trigger (released -ve)
4: 0 R-Trigger (released -ve)
5: 0 R-Thumbstick Y (up -ve)
6: 0 D-Pad X (left -ve)
7: 0 D-Pad Y (up -ve)
Buttons:
0:off Square
1:off Cross
2:off Circle
3:off Triangle
4:off L1 (Shoulder)
5:off R1 (Shoulder)
6:off L2 (Trigger) - also axis
7:off R2 (Trigger) - also axis
8:off Share
9:off Options
10:off L-Thumbstick
11:off R-Thumbstick
12:off PS
13:off TouchPad
[-- Attachment #6: syslog.txt --]
[-- Type: text/plain, Size: 1216 bytes --]
Dec 7 09:59:31 womble kernel: [ 190.548071] usb 3-2: new full-speed USB device number 2 using uhci_hcd
Dec 7 09:59:31 womble kernel: [ 190.723988] usb 3-2: New USB device found, idVendor=054c, idProduct=05c4
Dec 7 09:59:31 womble kernel: [ 190.724001] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Dec 7 09:59:31 womble kernel: [ 190.724039] usb 3-2: Product: Wireless Controller
Dec 7 09:59:31 womble kernel: [ 190.724049] usb 3-2: Manufacturer: Sony Computer Entertainment
Dec 7 09:59:32 womble mtp-probe: checking bus 3, device 2: "/sys/devices/pci0000:00/0000:00:1d.1/usb3/3-2"
Dec 7 09:59:32 womble mtp-probe: bus: 3, device: 2 was not an MTP device
Dec 7 09:59:32 womble kernel: [ 191.302128] usbcore: registered new interface driver usbhid
Dec 7 09:59:32 womble kernel: [ 191.302135] usbhid: USB HID core driver
Dec 7 09:59:32 womble kernel: [ 191.397030] input: Sony Computer Entertainment Wireless Controller as /devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/input/input7
Dec 7 09:59:32 womble kernel: [ 191.397438] hid-generic 0003:054C:05C4.0001: input,hidraw0: USB HID v1.11 Gamepad [Sony Computer Entertainment Wireless Controller] on usb-0000:00:1d.1-2/input0
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Sony DualShock4 - basic functions work, but looking to improve support
2013-12-07 17:52 Sony DualShock4 - basic functions work, but looking to improve support simon
@ 2013-12-07 20:43 ` simon
2013-12-08 14:41 ` David Herrmann
2013-12-09 0:51 ` simon
1 sibling, 1 reply; 8+ messages in thread
From: simon @ 2013-12-07 20:43 UTC (permalink / raw)
Cc: Linux Input, Antonio Ospite
[-- Attachment #1: Type: text/plain, Size: 262 bytes --]
> Anyone here want to collaborate?
I've decoded the majority of the HID stream including the multi-touch.
Also some good teardown info/pictures here:
http://mygaming.co.za/news/ps4/60397-cost-of-building-a-ps4.html
fccid = AK8CUHZCT1
ic = 409B-CUHZCT1
Simon.
[-- Attachment #2: hidraw.txt --]
[-- Type: text/plain, Size: 5235 bytes --]
01 7e 7c 80 7f 08 00 04 00 00 6f 35 0d 06 00 03 00 01 00 69 04 ff 1e 9d f8 00 00 00 00 00 1b 00 00 01 79 96 8e 85 01 8b 20 21 24 00 80 00 00 00 80 00 00 00 00 80 00 00 00 80 00 00 00 00 80 00
01 7e 7c 80 7f 08 00 08 00 00 53 38 0d 01 00 f9 ff 02 00 8d 04 e5 1e b5 f8 00 00 00 00 00 1b 00 00 01 79 96 8e 85 01 8b 20 21 24 00 80 00 00 00 80 00 00 00 00 80 00 00 00 80 00 00 00 00 80 00
01 7e 7c 80 7f 08 00 0c 00 00 40 3b 0d 00 00 04 00 04 00 7d 04 eb 1e a9 f8 00 00 00 00 00 1b 00 00 01 79 96 8e 85 01 8b 20 21 24 00 80 00 00 00 80 00 00 00 00 80 00 00 00 80 00 00 00 00 80 00
01 7e 7c 80 7f 08 00 10 00 00 81 76 0d f7 ff 00 00 00 00 5d 04 f7 1e b2 f8 00 00 00 00 00 1b 00 00 01 79 96 8e 85 01 8b 20 21 24 00 80 00 00 00 80 00 00 00 00 80 00 00 00 80 00 00 00 00 80 00
01 7e 7c 80 7f 08 00 14 00 00 67 79 0d f1 ff 00 00 f2 ff dd 04 bb 1f 55 f9 00 00 00 00 00 1b 00 00 01 79 96 8e 85 01 8b 20 21 24 00 80 00 00 00 80 00 00 00 00 80 00 00 00 80 00 00 00 00 80 00
01 7e 7c 80 7f 08 00 18 00 00 56 7c 0d 16 00 fc ff ff ff 75 04 db 1f 9d f9 00 00 00 00 00 1b 00 00 01 79 96 8e 85 01 8b 20 21 24 00 80 00 00 00 80 00 00 00 00 80 00 00 00 80 00 00 00 00 80 00
01 7e 7c 80 7f 08 00 1c 00 00 3f 7f 0d 3a 00 f3 ff 12 00 c5 03 9f 1f b9 f9 00 00 00 00 00 1b 00 00 01 79 96 8e 85 01 8b 20 21 24 00 80 00 00 00 80 00 00 00 00 80 00 00 00 80 00 00 00 00 80 00
01 7e 7c 80 7f 08 00 20 00 00 2b 82 0d 4f 00 fa ff 10 00 e7 03 75 1f c8 f8 00 00 00 00 00 1b 00 00 01 79 96 8e 85 01 8b 20 21 24 00 80 00 00 00 80 00 00 00 00 80 00 00 00 80 00 00 00 00 80 00
01 7e 7c 80 7f 08 00 24 00 00 27 85 0d 5d 00 fe ff 12 00 f9 03 43 1f a1 f8 00 00 00 00 00 1b 00 00 01 79 96 8e 85 01 8b 20 21 24 00 80 00 00 00 80 00 00 00 00 80 00 00 00 80 00 00 00 00 80 00
01 7e 7c 80 7f 08 00 28 00 00 04 88 0d 61 00 f9 ff 18 00 55 04 c7 1e c5 f8 00 00 00 00 00 1b 00 00 01 79 96 8e 85 01 8b 20 21 24 00 80 00 00 00 80 00 00 00 00 80 00 00 00 80 00 00 00 00 80 00
01 7e 7c 80 7f 08 00 2c 00 00 f1 8a 0d 53 00 fc ff 1a 00 b1 04 57 1e 75 f8 00 00 00 00 00 1b 00 00 01 79 96 8e 85 01 8b 20 21 24 00 80 00 00 00 80 00 00 00 00 80 00 00 00 80 00 00 00 00 80 00
01 7e 7c 80 7f 08 00 30 00 00 de 8d 0d 49 00 fd ff 14 00 b1 04 53 1e 19 f8 00 00 00 00 00 1b 00 00 01 79 96 8e 85 01 8b 20 21 24 00 80 00 00 00 80 00 00 00 00 80 00 00 00 80 00 00 00 00 80 00
01 7e 7c 80 7f 08 00 34 00 00 cc 90 0d 35 00 fd ff 0d 00 b9 04 1b 1e d5 f7 00 00 00 00 00 1b 00 00 01 79 96 8e 85 01 8b 20 21 24 00 80 00 00 00 80 00 00 00 00 80 00 00 00 80 00 00 00 00 80 00
01 7e 7c 80 7f 08 00 38 00 00 bf 93 0d 10 00 fb ff 09 00 99 04 23 1e e5 f7 00 00 00 00 00 1b 00 00 01 79 96 8e 85 01 8b 20 21 24 00 80 00 00 00 80 00 00 00 00 80 00 00 00 80 00 00 00 00 80 00
01 7e 7c 80 7f 08 00 3c 00 00 a5 96 0d fc ff 01 00 fe ff 6a 04 35 1e eb f7 00 00 00 00 00 1b 00 00 01 79 96 8e 85 01 8b 20 21 24 00 80 00 00 00 80 00 00 00 00 80 00 00 00 80 00 00 00 00 80 00
01 7e 7c 80 7f 08 00 40 00 00 94 99 0d dc ff 06 00 f9 ff 71 04 57 1e 31 f8 00 00 00 00 00 1b 00 00 01 79 96 8e 85 01 8b 20 21 24 00 80 00 00 00 80 00 00 00 00 80 00 00 00 80 00 00 00 00 80 00
01 7e 7c 80 7f 08 00 44 00 00 81 9c 0d d1 ff ff ff f8 ff 55 04 83 1e 7d f8 00 00 00 00 00 1b 00 00 01 79 96 8e 85 01 8b 20 21 24 00 80 00 00 00 80 00 00 00 00 80 00 00 00 80 00 00 00 00 80 00
01 7e 7c 80 7f 08 00 48 00 00 69 9f 0d ce ff 05 00 f6 ff 4d 04 fb 1e c9 f8 00 00 00 00 00 1b 00 00 01 79 96 8e 85 01 8b 20 21 24 00 80 00 00 00 80 00 00 00 00 80 00 00 00 80 00 00 00 00 80 00
|| || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || ||
|| || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ touch pad (see below)
|| || || || || || || || || || || || || || || || || || || || || || || || || ++ ++ ++ ++ ++ ++ ++ ++ fixed?
|| || || || || || || || || || || || || || || || || || || ++ ++ ++ ++ ++ ++ Accelerometers X, Y, Z (lsb, msb)
|| || || || || || || || || || || || || ++ ++ ++ ++ ++ ++ Gyros pitch, roll, yaw (lsb, msb)
|| || || || || || || || || || || || ++ fixed or slowly changing?
|| || || || || || || || || || ++ ++ always changing = time stamp ?
|| || || || || || || || || ++ R-Trigger
|| || || || || || || || ++ L-Trigger
|| || || || || || || ++ Count by 0x04?
|| || || || || ++ ++ Button bit field
|| || || || ++ R-Thumb Y
|| || || ++ R-Thumb X
|| || ++ L-Thumb Y
|| ++ L-Thumb X
++ alway 01
Multitouch section, allows for 2 simulataneous fingers
--
01 9f bc a9 d4 1c bd 0e f7 0d 00 80 00 00 00 80 00 00 00
|| || || || || || || || || || ++ ++ ++ ++ ++ ++ ++ ++ ++ only present while swiping, last position format as below
|| || || || || || || || +| ++ 2nd Y location
|| || || || || || || ++ |+ 2nd X location
|| || || || || || ++ 2nd event number
|| || || || +| ++ current Y location (lsb + msb, top = 0)
|| || || ++ |+ current X location (lsb + msb, left = 0)? note nibble order!!
|| || ++ event number, remains constant during press, counts up each time press starts, high bit set on release (ie 43->c3)
|| ++ presure/size? changes with both 1st of 2nd finger
++ type of data packets (1=static or 2=motion)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Sony DualShock4 - basic functions work, but looking to improve support
2013-12-07 20:43 ` simon
@ 2013-12-08 14:41 ` David Herrmann
2013-12-11 15:00 ` Jiri Kosina
0 siblings, 1 reply; 8+ messages in thread
From: David Herrmann @ 2013-12-08 14:41 UTC (permalink / raw)
To: Simon Wood; +Cc: Linux Input, Antonio Ospite, Jiri Kosina
Hi
On Sat, Dec 7, 2013 at 9:43 PM, <simon@mungewell.org> wrote:
>> Anyone here want to collaborate?
>
> I've decoded the majority of the HID stream including the multi-touch.
Nice! I already got my hands on one but will probably not find time
for it until February. However, I will gladly test any patches!
Also, could you write your findings down and maybe put it into
./Documentation/hid/? I'm not sure whether we put protocol data there
(Jiri?) but at least you could share the information on the list or
github. I would appreciate that a lot!
Thanks
David
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Sony DualShock4 - basic functions work, but looking to improve support
2013-12-07 17:52 Sony DualShock4 - basic functions work, but looking to improve support simon
2013-12-07 20:43 ` simon
@ 2013-12-09 0:51 ` simon
2013-12-09 9:05 ` David Herrmann
1 sibling, 1 reply; 8+ messages in thread
From: simon @ 2013-12-09 0:51 UTC (permalink / raw)
To: simon; +Cc: Linux Input, Antonio Ospite
[-- Attachment #1: Type: text/plain, Size: 956 bytes --]
Following a very useful post on Reddit:
http://np.reddit.com/r/PS4/comments/1p9y0l/pairing_your_ds4_controller_via_bluetooth/
I was able to put the DS4 into discoverable mode, pair and connect using
the 'hidd --connect 1C:66:6D:07:C3:E0' to get a working wireless/BT
joystick.
discoverable - hold 'PS' and 'Share' until light bar fast strobes.
connected - light bar turns on constant.
turn device off - hold 'PS' until light bar turns off.
Not sure why, but under a bluetooth connection the 'hidraw0' device only
outputs the first 10 bytes (compared to 64 bytes with USB connection)
--
$ hexdump -v -e '10/1 "%02x " "\n"' < /dev/hidraw0
01 7d 7e 82 7e 08 00 00 00 00
01 7d 7e 83 7e 08 00 00 00 00
01 7d 7e 81 7e 08 00 00 00 00
01 7d 7e 82 7e 08 00 00 00 00
01 7d 7e 80 7f 08 00 00 00 00
--
Attached are some bluetooth details for the device. No idea on how to get
audio to/from the device - I was kind of hoping it would behave like a BT
headset.
Simon
[-- Attachment #2: hcitool_info.txt --]
[-- Type: text/plain, Size: 1017 bytes --]
simon@womble:~$ hcitool info 1C:66:6D:07:C3:E0
Requesting information ...
BD Address: 1C:66:6D:07:C3:E0
Device Name: Wireless Controller
LMP Version: 3.0 (0x5) LMP Subversion: 0x0
Manufacturer: Atheros Communications, Inc. (69)
Features: 0xff 0xfe 0x0d 0xfe 0x98 0x7f 0x79 0x87
<3-slot packets> <5-slot packets> <encryption> <slot offset>
<timing accuracy> <role switch> <hold mode> <sniff mode>
<RSSI> <channel quality> <SCO link> <HV2 packets>
<HV3 packets> <u-law log> <A-law log> <CVSD> <power control>
<transparent SCO> <EDR ACL 2 Mbps> <EDR ACL 3 Mbps>
<enhanced iscan> <interlaced iscan> <interlaced pscan>
<inquiry with RSSI> <extended SCO> <AFH cap. slave>
<AFH class. slave> <3-slot EDR ACL> <5-slot EDR ACL>
<sniff subrating> <pause encryption> <AFH cap. master>
<AFH class. master> <EDR eSCO 2 Mbps> <EDR eSCO 3 Mbps>
<extended inquiry> <simple pairing> <encapsulated PDU>
<err. data report> <non-flush flag> <LSTO> <inquiry TX power>
<EPC> <extended features>
[-- Attachment #3: sdptool_records.txt --]
[-- Type: text/plain, Size: 736 bytes --]
simon@womble:~/dualshock4$ sdptool records 1C:66:6D:07:C3:E0
Service Name: Wireless Controller
Service Description: Game Controller
Service Provider: Sony Computer Entertainment
Service RecHandle: 0x10001
Service Class ID List:
"Human Interface Device" (0x1124)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 17
"HIDP" (0x0011)
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Human Interface Device" (0x1124)
Version: 0x0100
Service RecHandle: 0x10002
Service Class ID List:
"PnP Information" (0x1200)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 1
"SDP" (0x0001)
Profile Descriptor List:
"PnP Information" (0x1200)
Version: 0x0103
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Sony DualShock4 - basic functions work, but looking to improve support
2013-12-09 0:51 ` simon
@ 2013-12-09 9:05 ` David Herrmann
2013-12-10 2:50 ` simon
0 siblings, 1 reply; 8+ messages in thread
From: David Herrmann @ 2013-12-09 9:05 UTC (permalink / raw)
To: Simon Wood; +Cc: Linux Input, Antonio Ospite
Hi
On Mon, Dec 9, 2013 at 1:51 AM, <simon@mungewell.org> wrote:
> Following a very useful post on Reddit:
> http://np.reddit.com/r/PS4/comments/1p9y0l/pairing_your_ds4_controller_via_bluetooth/
>
> I was able to put the DS4 into discoverable mode, pair and connect using
> the 'hidd --connect 1C:66:6D:07:C3:E0' to get a working wireless/BT
> joystick.
>
> discoverable - hold 'PS' and 'Share' until light bar fast strobes.
> connected - light bar turns on constant.
> turn device off - hold 'PS' until light bar turns off.
>
> Not sure why, but under a bluetooth connection the 'hidraw0' device only
> outputs the first 10 bytes (compared to 64 bytes with USB connection)
> --
> $ hexdump -v -e '10/1 "%02x " "\n"' < /dev/hidraw0
> 01 7d 7e 82 7e 08 00 00 00 00
> 01 7d 7e 83 7e 08 00 00 00 00
> 01 7d 7e 81 7e 08 00 00 00 00
> 01 7d 7e 82 7e 08 00 00 00 00
> 01 7d 7e 80 7f 08 00 00 00 00
> --
>
> Attached are some bluetooth details for the device. No idea on how to get
> audio to/from the device - I was kind of hoping it would behave like a BT
> headset.
Regarding Bluetooth: hidd is deprecated. It should be all handled by
bluetoothd now. But once it's connected, HIDP is handled by the kernel
so this shouldn't be an issue here.
The SDP/hcitool information are pretty sparse so they won't help much.
All they tell is that the device uses HIDP (and a bit about BT
internals). No A2DP or alike. I guess sound is transmitted through the
HIDP channel (which is also what the wiimote does) and allows the same
transmission via USB and BT.
The report descriptor actually describes a lot more report-IDs than
just "0x01" which you describe in hidraw.txt. Are you sure the
report-descriptors are the same for USB and BT? 64bytes also seems
quite large for HID reports, I thought BT had a limit of 22 (but I'm
not sure). At least your report-descriptor says the biggest report is
63 bytes so that seems to be right for USB at least. You could turn on
BT debugging, the HIDP layer will then print size/content information
for incoming L2CAP skbs. This should help finding the culprit.
Thanks
David
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Sony DualShock4 - basic functions work, but looking to improve support
2013-12-09 9:05 ` David Herrmann
@ 2013-12-10 2:50 ` simon
2014-01-14 20:30 ` simon
0 siblings, 1 reply; 8+ messages in thread
From: simon @ 2013-12-10 2:50 UTC (permalink / raw)
To: David Herrmann; +Cc: Linux Input, Antonio Ospite
[-- Attachment #1: Type: text/plain, Size: 569 bytes --]
> The report descriptor actually describes a lot more report-IDs than
> just "0x01" which you describe in hidraw.txt. Are you sure the
> report-descriptors are the same for USB and BT?
The report descriptor when connected via BT is different, or at least what
I found at '/sys/bus/hid/devices/0005\:054C\:05C4.0006/report_descriptor'.
Unfortunately I wasn't able to decode it.
--
simon@womble:~/dualshock4$ ~/hidrd-0.2.0/src/hidrd-convert des_bt.bin -o code
Failed to read input item at offset 356:
invalid item encountered
--
Thanks for the other suggestions.
Simon
[-- Attachment #2: des_bt.bin --]
[-- Type: application/octet-stream, Size: 357 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Sony DualShock4 - basic functions work, but looking to improve support
2013-12-08 14:41 ` David Herrmann
@ 2013-12-11 15:00 ` Jiri Kosina
0 siblings, 0 replies; 8+ messages in thread
From: Jiri Kosina @ 2013-12-11 15:00 UTC (permalink / raw)
To: David Herrmann; +Cc: Simon Wood, Linux Input, Antonio Ospite
On Sun, 8 Dec 2013, David Herrmann wrote:
> >> Anyone here want to collaborate?
> >
> > I've decoded the majority of the HID stream including the multi-touch.
>
> Nice! I already got my hands on one but will probably not find time
> for it until February. However, I will gladly test any patches!
Good work!
> Also, could you write your findings down and maybe put it into
> ./Documentation/hid/? I'm not sure whether we put protocol data there
> (Jiri?) but at least you could share the information on the list or
> github. I would appreciate that a lot!
We've never used Documentation/hid/ for this kind of purpose, especially
as the driver doesn't exist yet. I am not really sure whether kernel tree
is a proper collaboration method for this.
What we have for quite a few of the existing drivers is having the
protocol described in comments directly in the driver, usually at its very
beginning. Would that work in this case as well?
Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Sony DualShock4 - basic functions work, but looking to improve support
2013-12-10 2:50 ` simon
@ 2014-01-14 20:30 ` simon
0 siblings, 0 replies; 8+ messages in thread
From: simon @ 2014-01-14 20:30 UTC (permalink / raw)
To: Frank Praznik; +Cc: David Herrmann, Linux Input, Antonio Ospite
[-- Attachment #1: Type: text/plain, Size: 770 bytes --]
>> The report descriptor actually describes a lot more report-IDs than
>> just "0x01" which you describe in hidraw.txt. Are you sure the
>> report-descriptors are the same for USB and BT?
>
> The report descriptor when connected via BT is different, or at least what
> I found at '/sys/bus/hid/devices/0005\:054C\:05C4.0006/report_descriptor'.
>
> Unfortunately I wasn't able to decode it.
> --
> simon@womble:~/dualshock4$ ~/hidrd-0.2.0/src/hidrd-convert des_bt.bin -o
> code
> Failed to read input item at offset 356:
> invalid item encountered
> --
After playing some more with the DS4, I noticed the comment in
'hid-sony.c' that the six-axis adds a trailing zero to it's HID... which
this file has too.
So it actually works after truncating it, see attached.
Simon
[-- Attachment #2: des_bt.txt --]
[-- Type: text/plain, Size: 10835 bytes --]
0x05, 0x01, /* Usage Page (Desktop), */
0x09, 0x05, /* Usage (Gamepad), */
0xA1, 0x01, /* Collection (Application), */
0x85, 0x01, /* Report ID (1), */
0x09, 0x30, /* Usage (X), */
0x09, 0x31, /* Usage (Y), */
0x09, 0x32, /* Usage (Z), */
0x09, 0x35, /* Usage (Rz), */
0x15, 0x00, /* Logical Minimum (0), */
0x26, 0xFF, 0x00, /* Logical Maximum (255), */
0x75, 0x08, /* Report Size (8), */
0x95, 0x04, /* Report Count (4), */
0x81, 0x02, /* Input (Variable), */
0x09, 0x39, /* Usage (Hat Switch), */
0x15, 0x00, /* Logical Minimum (0), */
0x25, 0x07, /* Logical Maximum (7), */
0x75, 0x04, /* Report Size (4), */
0x95, 0x01, /* Report Count (1), */
0x81, 0x42, /* Input (Variable, Null State), */
0x05, 0x09, /* Usage Page (Button), */
0x19, 0x01, /* Usage Minimum (01h), */
0x29, 0x0E, /* Usage Maximum (0Eh), */
0x15, 0x00, /* Logical Minimum (0), */
0x25, 0x01, /* Logical Maximum (1), */
0x75, 0x01, /* Report Size (1), */
0x95, 0x0E, /* Report Count (14), */
0x81, 0x02, /* Input (Variable), */
0x75, 0x06, /* Report Size (6), */
0x95, 0x01, /* Report Count (1), */
0x81, 0x01, /* Input (Constant), */
0x05, 0x01, /* Usage Page (Desktop), */
0x09, 0x33, /* Usage (Rx), */
0x09, 0x34, /* Usage (Ry), */
0x15, 0x00, /* Logical Minimum (0), */
0x26, 0xFF, 0x00, /* Logical Maximum (255), */
0x75, 0x08, /* Report Size (8), */
0x95, 0x02, /* Report Count (2), */
0x81, 0x02, /* Input (Variable), */
0x06, 0x04, 0xFF, /* Usage Page (FF04h), */
0x85, 0x02, /* Report ID (2), */
0x09, 0x24, /* Usage (24h), */
0x95, 0x24, /* Report Count (36), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xA3, /* Report ID (163), */
0x09, 0x25, /* Usage (25h), */
0x95, 0x30, /* Report Count (48), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x05, /* Report ID (5), */
0x09, 0x26, /* Usage (26h), */
0x95, 0x28, /* Report Count (40), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x06, /* Report ID (6), */
0x09, 0x27, /* Usage (27h), */
0x95, 0x34, /* Report Count (52), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x07, /* Report ID (7), */
0x09, 0x28, /* Usage (28h), */
0x95, 0x30, /* Report Count (48), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x08, /* Report ID (8), */
0x09, 0x29, /* Usage (29h), */
0x95, 0x2F, /* Report Count (47), */
0xB1, 0x02, /* Feature (Variable), */
0x06, 0x03, 0xFF, /* Usage Page (FF03h), */
0x85, 0x03, /* Report ID (3), */
0x09, 0x21, /* Usage (21h), */
0x95, 0x26, /* Report Count (38), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x04, /* Report ID (4), */
0x09, 0x22, /* Usage (22h), */
0x95, 0x2E, /* Report Count (46), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xF0, /* Report ID (240), */
0x09, 0x47, /* Usage (47h), */
0x95, 0x3F, /* Report Count (63), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xF1, /* Report ID (241), */
0x09, 0x48, /* Usage (48h), */
0x95, 0x3F, /* Report Count (63), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xF2, /* Report ID (242), */
0x09, 0x49, /* Usage (49h), */
0x95, 0x0F, /* Report Count (15), */
0xB1, 0x02, /* Feature (Variable), */
0x06, 0x00, 0xFF, /* Usage Page (FF00h), */
0x85, 0x11, /* Report ID (17), */
0x09, 0x20, /* Usage (20h), */
0x15, 0x00, /* Logical Minimum (0), */
0x26, 0xFF, 0x00, /* Logical Maximum (255), */
0x75, 0x08, /* Report Size (8), */
0x95, 0x4D, /* Report Count (77), */
0x81, 0x02, /* Input (Variable), */
0x09, 0x21, /* Usage (21h), */
0x91, 0x02, /* Output (Variable), */
0x85, 0x12, /* Report ID (18), */
0x09, 0x22, /* Usage (22h), */
0x95, 0x8D, /* Report Count (141), */
0x81, 0x02, /* Input (Variable), */
0x09, 0x23, /* Usage (23h), */
0x91, 0x02, /* Output (Variable), */
0x85, 0x13, /* Report ID (19), */
0x09, 0x24, /* Usage (24h), */
0x95, 0xCD, /* Report Count (205), */
0x81, 0x02, /* Input (Variable), */
0x09, 0x25, /* Usage (25h), */
0x91, 0x02, /* Output (Variable), */
0x85, 0x14, /* Report ID (20), */
0x09, 0x26, /* Usage (26h), */
0x96, 0x0D, 0x01, /* Report Count (269), */
0x81, 0x02, /* Input (Variable), */
0x09, 0x27, /* Usage (27h), */
0x91, 0x02, /* Output (Variable), */
0x85, 0x15, /* Report ID (21), */
0x09, 0x28, /* Usage (28h), */
0x96, 0x4D, 0x01, /* Report Count (333), */
0x81, 0x02, /* Input (Variable), */
0x09, 0x29, /* Usage (29h), */
0x91, 0x02, /* Output (Variable), */
0x85, 0x16, /* Report ID (22), */
0x09, 0x2A, /* Usage (2Ah), */
0x96, 0x8D, 0x01, /* Report Count (397), */
0x81, 0x02, /* Input (Variable), */
0x09, 0x2B, /* Usage (2Bh), */
0x91, 0x02, /* Output (Variable), */
0x85, 0x17, /* Report ID (23), */
0x09, 0x2C, /* Usage (2Ch), */
0x96, 0xCD, 0x01, /* Report Count (461), */
0x81, 0x02, /* Input (Variable), */
0x09, 0x2D, /* Usage (2Dh), */
0x91, 0x02, /* Output (Variable), */
0x85, 0x18, /* Report ID (24), */
0x09, 0x2E, /* Usage (2Eh), */
0x96, 0x0D, 0x02, /* Report Count (525), */
0x81, 0x02, /* Input (Variable), */
0x09, 0x2F, /* Usage (2Fh), */
0x91, 0x02, /* Output (Variable), */
0x85, 0x19, /* Report ID (25), */
0x09, 0x30, /* Usage (30h), */
0x96, 0x22, 0x02, /* Report Count (546), */
0x81, 0x02, /* Input (Variable), */
0x09, 0x31, /* Usage (31h), */
0x91, 0x02, /* Output (Variable), */
0x06, 0x80, 0xFF, /* Usage Page (FF80h), */
0x85, 0x82, /* Report ID (130), */
0x09, 0x22, /* Usage (22h), */
0x95, 0x3F, /* Report Count (63), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x83, /* Report ID (131), */
0x09, 0x23, /* Usage (23h), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x84, /* Report ID (132), */
0x09, 0x24, /* Usage (24h), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x90, /* Report ID (144), */
0x09, 0x30, /* Usage (30h), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x91, /* Report ID (145), */
0x09, 0x31, /* Usage (31h), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x92, /* Report ID (146), */
0x09, 0x32, /* Usage (32h), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0x93, /* Report ID (147), */
0x09, 0x33, /* Usage (33h), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xA0, /* Report ID (160), */
0x09, 0x40, /* Usage (40h), */
0xB1, 0x02, /* Feature (Variable), */
0x85, 0xA4, /* Report ID (164), */
0x09, 0x44, /* Usage (44h), */
0xB1, 0x02, /* Feature (Variable), */
0xC0 /* End Collection */
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-01-14 20:30 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-07 17:52 Sony DualShock4 - basic functions work, but looking to improve support simon
2013-12-07 20:43 ` simon
2013-12-08 14:41 ` David Herrmann
2013-12-11 15:00 ` Jiri Kosina
2013-12-09 0:51 ` simon
2013-12-09 9:05 ` David Herrmann
2013-12-10 2:50 ` simon
2014-01-14 20:30 ` simon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).