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.

One Reply to “PC as Sixaxis joystick”

Leave a Reply

Your email address will not be published. Required fields are marked *