$ dmesg | tail -4 usb 1-3: new full speed USB device using ohci_hcd and address 16 usb 1-3: configuration #1 chosen from 1 choice input: Sony PLAYSTATION(R)3 Controller as /class/input/input14 input: USB HID v1.11 Joystick [Sony PLAYSTATION(R)3 Controller] on usb-0000:00:03.0-3 $ lsusb | grep Sony Bus 001 Device 016: ID 054c:0268 Sony Corp.Full lsusb output (with the usbhid module detached) is here.
However, the controller will still not report any events unless the mode is changed to "operational" using a specific HID_REQ_GET_REPORT command. This patch adds a quirk to the Linux HID driver to automatically switch the controller to operational mode. The patch is already present in Linux >= 2.6.21, but is applicable to earlier kernels. No other changes should be necessary. [1]
Now, using the jstest program (in the joystick Debian package), we can get the joystick info:
Joystick (Sony PLAYSTATION(R)3 Controller) has 28 axes (X, Y, Z, Rz, ...) and 19 buttons (Trigger, ThumbBtn, ThumbBtn2, ...)So the joystick seems to provide 28 analog axes — a lot more than the advertised 6! Remember that nearly all buttons on the controller are actually pressure-sensitive, so they are treated as both a digital button and an analog axis. Here are the axis and button assignments:
|
|
Unfortunately, a number of axes appear to do nothing, and the motion sensing axes are nowhere to be seen. There is probably some way to enable them (some HID_REQ_SET_REPORT command, perhaps?), but I haven't yet found what it is. More info will be posted here if I come across it.
[1] Pre-production controllers had a bug that required a change in the Linux HID parser code. This patch includes that change. Retail controllers don't need this. Thanks to Geoff Levand for pointing that out.