# [solved] sixaxis/dualshock3 on non-PS3 host

## eddo

I can get this working on PS3 Linux but am desperate to try get it working on my normal PC.  I've been following this guide:

http://www.pabr.org/sixlinux/sixlinux.en.html

The bluetooth works perfectly on my system, I compile/run sixpair.c fine, and can get right up to the final stage of the guide (hidd reports that "XX:XX:XX:XX:XX Sony Computer Entertainment Wireless Controller [XXXX:XXXX] connected") I can even connect all 4 of my controllers simultaneously via BT.  They all show up fine as /dev/input/js0, 1, 2 etc and duly disappear if I disconnect them via hidd.

Only (big) problem is they just don't register any button/axis presses (via jstest, cat etc.)!! If I start up something like mame then the menu just scrolls crazily, so it must be sending SOMETHING.  I'm so close I can almost taste it, it seems crazy that I have a bluetooth controller and 4 bluetooth joypads and I can't use them!! The guy on that site seems to have got it working but he doesn't reply to e-mail.  Has ANYONE made any progress on this? I would just be so infinitely grateful it's untrue.Last edited by eddo on Sun Mar 09, 2008 6:21 am; edited 3 times in total

----------

## eddo

Forgot to mention they work fine via USB.

----------

## eddo

Le bump>

----------

## eddo

Solved it.  Don't know what was screwing it up before but follow these steps and it should work:

[1] Make sure your bluetooth controller is working properly (duh)

[2] Remove any existing versions of bluez-libs & bluez-utils

```
emerge -Ca bluez-libs bluez-utils
```

[3] Cleanup

```
env-update && source /etc/profile
```

[4] You'll need to unmask bluez-libs 3.19

```
echo "=net-wireless/bluez-libs-3.19 ~*" >> /etc/portage/package.keywords
```

[5] Now emerge it along with dbus if you don't already have it.  You'll also need libusb for later.

```
emerge -va =bluez-libs-3.19 dbus libusb
```

[6] Cleanup

```
env-update && source /etc/profile
```

[7] Fetch newer version ebuild and unpack (it didn't work for me on any version except 3.19, but you can try)

```
ebuild /usr/portage/net-wireless/bluez-utils/bluez-utils-3.19.ebuild fetch

ebuild /usr/portage/net-wireless/bluez-utils/bluez-utils-3.19.ebuild unpack
```

[8] Download the "patch-hidd-3.19-pabr3" patch from http://www.pabr.org/sixlinux/sixlinux.en.html and save to /var/tmp/portage/net-wireless/bluez-utils-3.19/work/bluez-utils-3.19/.  Also download "sixpair.c" and save it somewhere for later.

[9] Patch the source.  If any of the hunks fail then you're using the wrong patch or wrong source version.

```
cd /var/tmp/portage/net-wireless/bluez-utils-3.19/work/bluez-utils-3.19/

patch -p1 -i patch-hidd-3.19-pabr3.patch
```

[10] bluez-utils v3 and above depreciate the hidd daemon so you'll have to specifically compile it back in (or if someone knows how to get it working with bluetoothd-input-service then let me know)

```
echo "net-wireless/bluez-utils old-daemons" >> /etc/portage/package.use
```

[11] Build, install, merge:

```
ebuild /usr/portage/net-wireless/bluez-utils/bluez-utils-3.19.ebuild compile

ebuild /usr/portage/net-wireless/bluez-utils/bluez-utils-3.19.ebuild install

ebuild /usr/portage/net-wireless/bluez-utils/bluez-utils-3.19.ebuild qmerge
```

[12] Cleanup

```
env-update && source /etc/profile
```

[13] Browse to where you downloaded sixpair.c and compile it:

```
gcc -o sixpair sixpair.c -lusb
```

[14] Connect sixaxis/dualshock3 via USB, and then run sixpair.

```
./sixpair

Current Bluetooth master: xx:xx:xx:xx:xx:xx (your PS3)

Setting master bd_addr to yy:yy:yy:yy:yy:yy (your PC bluetooth controller)
```

[15] Disconnect controller, and run hidd (only need --nocheck for the first pairing), once running press the PS button on the controller.

```
hidd --server --nocheck -n

hidd[6125]: Bluetooth HID daemon

hidd[6125]: New HID device zz:zz:zz:zz:zz:zz (Sony Computer Entertainment Wireless Controller)
```

[16] That's it, should be working.  You can use "jstest /dev/input/js0" (cat should work as well).  To get the jstest application you'll to emerge "joystick", though it's still classed as unstable so you'll have to unmask it first.Last edited by eddo on Sun Mar 09, 2008 6:28 am; edited 2 times in total

----------

## jacky_zeng

Dear eddo:

    I cannot download sixpair.c from http://www.pabr.org/sixlinux/sixlinux.en.html ,Can you send it to me, thanks!

My e-mail address is zxz1975@21cn.com

jacky

----------

## eddo

Hi I've just sent it.

----------

## eddo

Small update:

bluez-libs/utils-3.19 has been taken out of portage, but using the 3.25 ebuilds as a basis for an overlay works fine  :Very Happy: 

----------

## remonman

Hey eddo,

Glad to see you're having a bit more luck than I am with your sixaxis. I followed your directions, and managed to get mine to work. However, after I turn the controller off, I cannot reestablish the connection until I reboot the computer. The controller will once again to show up in hidd's output, and /dev/input/js0 will appear on the 2nd connection attempt, but there's no activity in jstest or cat (much like your original post described).

I've tried everything I could think of, including removing all bluetooth modules and reinserting them, restarting hidd, removing and inserting the usb bluetooth dongle, and restarting hald and dbus-daemon. However, the output of jstest remains static. Reboot the machine, and everything's fine for a single use again.

Has anyone else encountered this? It almost sounds like a kernel problem, since I've tried restarting everything I could think of in userspace, and the problem is resolved upon reboot.

Thanks for any suggestions.

----------

