
Originally Posted by
broccoli
Seeing as the non-dual shock version is hard to come by I was wondering if you (or anybody else?) have tried the DS3 with Bluetooth? Bluetooth functionality really is the deal breaker for me.
I recently purchased one of these controllers -- a SixAxis DualShock 3 -- for my Myth/HTPC box. I especially wanted one of these for the accelerometer and because it was wireless.
I am doing all work on a Debian/Sid machine, so pretty recent software.
Unfortunately there seems to be little information available on the 'Net about the topic (it's still a relatively new product in the EU/US so this may have something to do with it)...
Anyway, I found out these three sites:
http://www.pabr.org/sixlinux/sixlinux.en.html
https://help.ubuntu.com/community/Sixaxis
http://ps3.jim.sh/sixaxis/usb/
Of course, there is also this link to a forum catering to "other" operating systems, although one can find some interesting information there (funny how they use a lot of FOSS software to get the thing going in xp)...
Well, all that being said, I managed to do the following (mostly with help from the pabr.org site):
1. On USB, the controller works pretty decent -- it registers as /dev/input/js0, and any game that is joystick-aware can use it. I also ran into the duplicated-button-press issue, which I believe is due to the fact that each button actually is not only a button but an axis as well -- if you noticed in the logs, the thing has 28 (!) axis, actually that's 6 real ones and the rest are buttons (and some not used). The PS3 games can actually use the buttons in analog mode (for example, pressing on "UP" can accelerate a car depending on the pressure applied) and not just digital on/off switches like normal PC pads. This is kinda cool and useful, however linux games (or perhaps the driver?) are not prepared to deal with it properly. The solution I found was to use either:
a) joy2key (it's in the repositories for Debian/Ubuntu, otherwise go to http://interreality.org/~tetron/technology/joy2key/ ), or
b) jkeys from https://jkeys.googlecode.com/
Both have advantages and disadvantages, but they serve well to actually convert the joystick actions into keypresses, excellent for games/emulators that don't work well in the default way. I was able to play frozen-bubble, xfuse-sdl and xmame games quite well.
I also tried the xsixhidtest.c program from pabr.org, and it's very impressive... now if we could only get that info via the driver somewhat... still *very* fun for testing.
2. On Bluetooth, things aren't as rosy... I managed to get the device to connect (using sixpair.c from the same place), I get the
Code:
[36627.996624] input: Sony Computer Entertainment Wireless Controller as /class/input/input19
line in the logs, the /dev/input/js0 device is created, but no buttons/movement/whatever is recorded. It seems that the bluetooth HID events do not go through to the joydev driver -- however I don't have enough knowledge of either to be able to debug at this point.
Interestingly enough, by using hcidump I can actually "see" the button presses and axis movement being registered... so they *are* sent to the computer quite nicely, they just don't arrive at the joystick driver. I also couldn't find a way to access the hidraw device via bluetooth (it seems none is created?)
Other than this, there is some talk on the above links about configuring an X input driver for the joypad, however I haven't had time to try that yet. If anyone else has, please share your experience...
UPDATE: I got some spare time to play more with this, and I configured X.Org according to https://help.ubuntu.com/community/Sixaxis... The good news is that is works wonderfully (with the stock 1.3.2 driver available on lenny/sid) and it provides for a much cleaner experience than the joy2key and jkeys kludges. Basically the joypad appears as a keyboard/mouse combo to X, and it's events become X events. By default, the left thumb-stick controls the mouse + click, the right one controls scrolling + rightclick and some buttons have bindings like Return/BackSpace/Escape. You can reconfigure everything up to acceleration and repeat rate, all except the X/Y Rotation axis (the gravity-controlled ones). It would obviously be wonderful if all this worked via Bluetooth
Anyway, there is one snag I've found so far: in kdm the keybindings are as I've configured them in xorg.conf... however, as soon as KDE loads, they are changed to numbers from 0-9, signs, etc... Anyone have any idea why this is happening?
Best regards