I am a Sixaxis, I am a Sixaxis, I am a…

I managed to control my PS3 from my PC, with the method described at forums.ps2dev.org.

It only works with one of the 3 dongle I tested.

All are able to power up the PS3, but connection is aborted with the 2 dongles that can’t have their bluetooth device address changed permanently.

From my desktop pc that is located in another room, I pressed space key (cross button) to select the user, and right and left keys to navigate in the menu 🙂

Next step: install a linux distro on a laptop so as to make intensive tests in front of my PS3.

PC as Sixaxis joystick – tests

On a Linux PC, I tried to modify the bluetooth device address of some dongles:

– COM1 – broadcom chip – modification ok, but not persistent
– Linyx – ISSC chip – modification ok, but not persistent
– Cellink – CSR chip – modification ok & persistent

“Persistent” means that the modification is permanent, even after unplugging the dongle. These results are consistent with infos given there.

I didn’t found out a way to modify this address in Windows (temporarily or permanently).

I discovered that pybluez requires the widcomm bluetooth stack to work with l2cap in Windows. ISSC and CSR chips are not supported (anymore) by the widcomm stack. Only my COM1 dongle can work with the widcomm bluetooth stack (property of broadcom company).

As a result I can’t use any of these dongles with my hcpc (which runs Windows 7). I could install Linux on it, but I have a TV scheduler installed, so that it would not be possible to control the PS3 and record a TV show at the same time 🙁

I have to find another bluetooth dongle, whose bdaddr can be permanently modified, and that works with widcomm stack…

Meanwhile, I will try the hidemulator with another PC running Linux.

PC as Sixaxis joystick

Asking google about the “sixaxis report frequency”, I got the answer on that forum page (seems to be down, but it is still in google cache: page1 page2) on which it is said that there is about 10ms between reports. That matches the mouse frequency in my project (100Hz), so that if the PS3 does not take more than 100 reports per second (to be tested), there is no need to increase it (ps/2 mouse maximum frequency is 200Hz).

This information is less interesting than the forum page itself. It is about using a PC to emulate a sixaxis via Bluetooth! Using a bluetooth dongle, the PC connects to the PS3 using the sixaxis’s bluetooth device address. As I have a hcpc near my PS3, and want to use the same wireless keyboard+mouse to control both, I will definitely give it a try!

Links:

hidemulator googlecode from Brandon (python code)
source code from Jim Paris (C code)
how to change bluetooth device mac address (Linux)

hidemulator should work with both Linux & Windows (to be tested).

Software to install:
python 2.6
pybluez
pygame

pygame is used to get input events from mouse and keyboard. Joysticks could be used too.

I think pygame events are get from the OS (mixing all input devices: ps/2, hid…), and therefore may have been modified (accelerated mouse movements). It would probably be better to get raw data from the hid device. This can be done thanks to libhid that supports python.

Project now works with bumble-b too!

bumble-b is a mini usb developpement kit with at90usb162 microcontroller. It has a low price – 15$ – and price is digressive if you buy 5 (14$) or 10 units (13$).

The project now works on that board thanks to small updates of the code:
– port D is used instead of port E, which does not exist with at90usb162
– the mouse is reset (=initialized) in the main function, as a last initialization step (avoids a deadlock which seems to occur more with at90usb162 than at90usb1286)

The only modification that remains to build the project for the bumble-b is located in the Makefile: the MCU value has to be set to “at90usb162”.

What’s next?

I managed to convert ps/2 devices (mouse + keyboard) to a ps3 controller (see older posts, from the oldest one).

Now, I want to use following devices with my PS3:

1- wireless usb keyboard + mouse (Logitech EX100)
2- usb mouse (Logitech G5) + ps/2 keyboard
3- usb joystick (Saitek ST200)

More ideas:
– add a mouse and a keyboard in the same usb hid device (so that mouse and keyboard can be used as mouse and keyboard too)
– control a pc with the same mouse and keyboard
– convert multiple usb devices to a single ps3 controller

=> I’m now planning to convert usb hid devices to a ps3 controller.

A first idea is to:
– use the v-usb framework for the usb device (ps3 controller)
– use the LUFA framework for the usb host (to get data from hid devices)

BUT Teensy++ is based on an AT90USB1286 chip which only supports usb device mode.

Therefore:
– I have to find an AT90USB647- or AT90USB1287-based board such as AT90USBKEY
OR
– I have to work with a software-implemented usb host stack such as that one.

I’m not sure that it will work on a single chip (see discussion there).