Monitoring of battery status has not been tested.
Hand-over between USB mode and Bluetooth mode is not transparent for applications. dev/js0 should have the first LED turned on, and so on. This probably requires a key exchange procedure over USB. The Bluetooth adapter in the PS3 supports remote wake-up.īluetooth authentication and encryption have not been investigated.
Maybe the Linux HID joystick driver should decode inertial measurements as joystick axes. Upgrading to linux-2.6.23 or later should solve this problem. On some PS3 hosts, hcidump shows "Role Change" "Role: Master" andĭmesg reports "hci_acldata_packet: hci0 ACL packet for unknown connection handle". Otherwise, incoming input reports may be truncated to 12 bytes.
If sixhidtest says "Unsupported report length",Įither upgrade the kernel to 2.6.26 or later, or use sixhidtest-20080426.c and xsixhidtest-20080426.c. On some kernels, at least from 2.6.32 to 2.6.33.3, /dev/hidrawX returns 50 bytes instead of 49. # gcc -o xsixhidtest xsixhidtest.c -lX11 -lm
In this simple example, no attempt is made to track simultaneous translations and rotations, nor rotations around the vertical axis. This works well for fast periodic signals, e.g. High-pass filtering is used to control integration drift Xsixhidtest.c graphically displays speed, position and orientationĭerived from accelerometer measurements. Sixhidtest.c decodes inertial measurements:
Raw input reports can be read from /dev/hidraw1: In Bluetooth mode, a /dev/hidrawX device is created as well,īut dmesg does not report its minor number. Input,hidraw1: USB HID v1.11 Joystick on usb-xxxx:xx:xx.x-xĪnd /dev/hidraw1 (or another minor number) should be created automatically. Jstest should report buttons being pressed and sticks being moved.Īfter testing, restore the security settings in /etc/bluetooth/nf:Ĭonnect the device with a USB cable and press PS. # jstest /dev/js0 # or jstest /dev/input/js0 Input: Sony Computer Entertainment Wireless Controller as /class/input/inputXĬheck that the SIXAXIS is recognized as a joystick: Hidd: New HID device 00:19:C1:xx:xx:xx (Sony Computer Entertainment Wireless Controller) Optionally run hcidump in another shell, for troubleshootingĪnd comparison with this successful trace: (Note: -nocheck is only required for the first connection.) Restart the HIDP daemon with suitable options: Setting master bd_addr to xx:xx:xx:xx:xx:xx
This sometimes causes confusion.Ĭurrent Bluetooth master: xx:xx:xx:xx:xx:xx Whereas everybody else thinks "game controller" (a.k.a. Bluetooth experts use the word "controller" to refer to the Bluetooth network adapter inside the host or the PS3, However, since it does not accept connections from unknown Bluetooth devices,Īuthorizations must be set-up by another utility, Should support the SIXAXIS without any patch. Which replaces hidd in recent versions of bluez-utils, This command-line utility searches USB buses for SIXAXIS controllers and tells them to connect to a new Bluetooth master.Īlternatively, it might be possible to support the Bluetooth HID "Report Protocol" on older kernelsīy using bthid instead of hidd, with a similar patch.īesides, the new "input service" ( bluetoothd-service-input), Instead, pairing is done over USB, which is arguably simpler and more secure. (Only required if the SIXAXIS is to be used with a non-PS3 Bluetooth master.) The SIXAXIS apparently does not support the standard Bluetooth pairing procedure
Sony already published a similar patch for enabling reporting in USB mode. This patch causes the Linux Bluetooth HIDP daemon ( hidd) to send a special command to the SIXAXIS when it connects. Earlier kernels do not support Bluetooth HID devices