• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

Now SIXAXIS is recognized in Bluetooth mode under PS3 Linux (F-7 with custom kernel)

Panajev2001a

GAF's Pleasant Genius
Introduction: No, motion sensing still does not work.

Remember this:

http://www.neogaf.com/forum/showthread.php?t=184823&highlight=Linux

Well, if you are already a Geoff Levand's kernel user keep going else go to that thread and see how it can be good for you (better reboot, halt, and boot-game-os support as well as reduced black bars around the picture).

My set-up: updated Fedora 7 system (run "yum update" to make sure it is updated and install joystick support "yum install joystick*" ... well without the " " ;)).

Current kernel: latest custom 2.6.23-rc6 kernel (pulled from Geoff Levand's tree as in the thread I posted above... in the make menuconfig step I only added Netfilter support [not relevant to this scenario] and Userspace Module Support as a module [M] under File Systems).

In order to make sure future custom kernels from Geoff Levand's tree keep booting on your PS3 you need to update the kboot loader (otheros.bld):

http://ozlabs.org/pipermail/cbe-oss-dev/2007-September/003260.html

Download, similarly to the procedure you followed when you first installed linux on your PS3, in your memory stick/USB drive/etc the otheros.bld file you find here:

http://www.kernel.org/pub/linux/kernel/people/geoff/cell/CELL-Linux-CL_20070831-ADDON/PS3/otheros/

(this is based of kernel 2.6.23, but Geoff Levand will keep posting newer and newer otheros.bld files in future releases of the Linux ADD-ON disc)

and put it in the folder (I'll use Windows/Dos directory style slashes) <root of your removable drive>:\PS3\otheros\

Now, boot PS3's Game OS (XMB) and go to System Settings and install Other OS: t will find it in your removable drive. Now you can remove your removable drive and load Linux/Other OS just as you did before and check at the kboot prompt the kboot version with: uname -rv.

Now, onto sixaxis operation:

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

Some comments...

First thing, before following that guide, run these commands (become root before following all of these steps):

service hidd stop
service bluetooth stop

(multiple times for each if necessary)

If you have problem with the line:

hidd --server --nocheck -n

hidd should be in the /usr/sbin or the /sbin directories so using the full path to start hidd should do the trick: /usr/sbin/hidd or /sbin/hidd.


Also remember to either start that command in background with & or to have two terminal windows open. You can safely stop hidd with CTRL+C after you have tested that the SIXAXIS is recognized.

After you have followed all the steps of that section of that guide: to shut the SIXAXIS off simply stop the hidd and bluetooth services and then restart them. (service <name> start). Make sure the stopping and starting of services goes well [OK].

A nice thing about this is that there are linux programs that allow you to map a joystick to a mouse so you could in theory use one of the sticks of the controller to control a virtual mouse... it can avoid the need for a Wireless mouse if all you plan to do is to do simple operations which do not need razor sharp accuracy :).

http://freshmeat.net/projects/js2mouse/

You can try "yum install js2mouse" to see if there is a package available that yum can install for you.

Please ask questions here if you encounter any problem with my two "guides", I'll see what I can do to help you.
 

Panajev2001a

GAF's Pleasant Genius
ThirdEye said:
Why, how does the guy control the robot with his SIXAXIS?

The current drivers do not allow proper communication of data from the motion sensors over USB and Bluetooth.

The guy did some hardware modifications to read the data directly from the PAD IIRC.
 

Panajev2001a

GAF's Pleasant Genius
Ok, small update: it seemed to work fully, but with the current unpatched hidd (as distributed in F-7) it does exchange info with the pad and recognizes it properly: all goes according to the guide at pabr's site.

The jstest program (pabr suggested me to chck that again before claiming success... sigh... I tend to get a bit excited and forget little details) does not fully behave like it should though: all the buttons and axis are recognized as in the sample output showed in pabr's guide, but they do not change their value when you use the SIXAXIS and move the sticks or press buttons around.

So... a patch is needed to hidd, no worries... I an handle it :).

Go here:

http://www.bluez.org/download.html

download the bluez-utils package: bluez-utils-3.19.tar.gz

open it on your ps3:

tar -zxvf bluez-utils-3.19.tar.gz

go inside the bluez-utils-3.19/hidd directory (cd )

download this patch:

wget http://www.pabr.org/sixlinux/patch-hidd-3.9-pabr2

apply it to main.c:

patch main.c patch-hidd-3.9-pabr2

now go into main.c and remove the following section:

Code:
static void enable_sixaxis(int sock) {
 char msg[] = { 0x53 /*HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_FEATURE*/,
                0xf4,  0x42, 0x03, 0x00, 0x00 };
 send(sock, msg, sizeof(msg), 0);
}

as there is already an enable_sixaxis function and the program should use that one.

Stop the hidd service: service hidd stop. Do the same for the bluetooth service.

Now go back one dir level in the main bluez-utils dir and do this:

./configure --prefix=/usr

(this will make sure that the new hidd will install over the stock one)

Now do:

make all

It will stop with an error about the sdpd module, but do not worry... we only need a patched hidd daemon:

(here is the error btw)

Code:
service.c: In function âupdate_svclass_listâ:
service.c:83: error: âsdp_record_tâ has no member named âsvclassâ
service.c:86: error: âsdp_record_tâ has no member named âsvclassâ
service.c: In function âcreate_ext_inquiry_responseâ:
service.c:170: error: âsdp_record_tâ has no member named âsvclassâ
service.c:173: error: âsdp_record_tâ has no member named âsvclassâ
service.c:182: error: âsdp_record_tâ has no member named âsvclassâ
service.c:188: error: âsdp_record_tâ has no member named âsvclassâ

enter the hidd directory and do: make install

Now, start hidd in the following way (and after you enter the following command press the PS button on your sixaxis):

hidd --server --nocheck -n


and use CTRL+C to stop it.

Stop and restart the hidd and bluetooth services and press the PS button on your SIXAXIS again.

Now execute this command:

jstest /dev/js0


and press stuff on the SIXAXIS, you should see the output of the jstest program change according to what you are doing with the pad.
 

Panajev2001a

GAF's Pleasant Genius
References:

http://www.kernel.org/pub/linux/kernel/people/geoff/cell/

http://ozlabs.org/pipermail/cbe-oss-dev/2007-September/003263.html

http://git.kernel.org/gitweb.cgi?p=linux/kernel/git/geoff/ps3-linux.git


Previous relevant B3D threads on the subject:

http://forum.beyond3d.com/showthread.php?t=44215

http://forum.beyond3d.com/showthread.php?t=43859


This thread is for those Fedora 7 users which already have the new ps3 flash name (a Fedora kernel already pushed this change a while ago) and are now running Geoff Levand's custom kernel.

Now, some things to be downloaded:

http://www.kernel.org/pub/linux/ker...070831-ADDON/target/ps3pf_utils-2.0-1.ppc.rpm

http://www.kernel.org/pub/linux/ker...ADDON/target/kexec-tools-20070810-1.ppc64.rpm

Download (wget ...) and install (rpm -ihv or rpm -Uhv) those two RPM's and you will have solved your boot-game-os problem.

Use ps3-boot-game-os as your script of reference from now on.

As I posted in a thread a few minutes ago, you should install those two RPM's on your system.


Read the following bit from cbe-oss-dev's mailing-list:

After linux-2.6.23 is released I will remove the hack that allows
the ps3-linux.git kernel to be loaded from linux-2.6.16 based bootloaders.

All users of ps3-linux.git will need to update to a linux-2.6.23
based bootloader. To check the bootloader version, from the kboot
prompt type:

uname -rv


The latest kboot is here:

http://www.kernel.org/pub/linux/kernel/people/geoff/cell/kboot-20070831.bld

[...]

ps3-flash-util kboot-20070831.bld


Edit: for those without the regular ps3flash (tircky issue here), this should be of some advice to you (you might want to remobe that -w flag, it does not even work in the latest release of ps3-flash-util...):
Luca Barbato wrote:
> Hi, just a nit
>
> Geoff Levand wrote:
>>
>> ps3-flash-util kboot-20070831.bld
>>
>
> ps3-flash-util -w kboot-20070831.bld
>
> if you don't have /dev/ps3flash use /dev/sdb

There is a -d option that you can use to specify a
device node:

ps3-flash-util -d /dev/sdb -w kboot-20070831.bld

-Geoff
 

Panajev2001a

GAF's Pleasant Genius
Update to the updated SIXAXIS post:

If you want to avoid the error I outlined in the post quoted below and want to do things the proper way (instead of rushing to try the new hidd module) download BOTH bluez-libs and bluez-utils.

Unpack bluez-libs first and run: ./configure --prefix=/usr

make all

and lastly, make install.

Now do the same for bluez-utils and you should not get any more errors.

Panajev2001a said:
Ok, small update: it seemed to work fully, but with the current unpatched hidd (as distributed in F-7) it does exchange info with the pad and recognizes it properly: all goes according to the guide at pabr's site.

The jstest program (pabr suggested me to chck that again before claiming success... sigh... I tend to get a bit excited and forget little details) does not fully behave like it should though: all the buttons and axis are recognized as in the sample output showed in pabr's guide, but they do not change their value when you use the SIXAXIS and move the sticks or press buttons around.

So... a patch is needed to hidd, no worries... I an handle it :).

Go here:

http://www.bluez.org/download.html

download the bluez-utils package: bluez-utils-3.19.tar.gz

open it on your ps3:

tar -zxvf bluez-utils-3.19.tar.gz

go inside the bluez-utils-3.19/hidd directory (cd )

download this patch:

wget http://www.pabr.org/sixlinux/patch-hidd-3.9-pabr2

apply it to main.c:

patch main.c patch-hidd-3.9-pabr2

now go into main.c and remove the following section:

Code:
static void enable_sixaxis(int sock) {
 char msg[] = { 0x53 /*HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_FEATURE*/,
                0xf4,  0x42, 0x03, 0x00, 0x00 };
 send(sock, msg, sizeof(msg), 0);
}

as there is already an enable_sixaxis function and the program should use that one.

Stop the hidd service: service hidd stop. Do the same for the bluetooth service.

Now go back one dir level in the main bluez-utils dir and do this:

./configure --prefix=/usr

(this will make sure that the new hidd will install over the stock one)

Now do:

make all

It will stop with an error about the sdpd module, but do not worry... we only need a patched hidd daemon:

(here is the error btw)

Code:
service.c: In function âupdate_svclass_listâ:
service.c:83: error: âsdp_record_tâ has no member named âsvclassâ
service.c:86: error: âsdp_record_tâ has no member named âsvclassâ
service.c: In function âcreate_ext_inquiry_responseâ:
service.c:170: error: âsdp_record_tâ has no member named âsvclassâ
service.c:173: error: âsdp_record_tâ has no member named âsvclassâ
service.c:182: error: âsdp_record_tâ has no member named âsvclassâ
service.c:188: error: âsdp_record_tâ has no member named âsvclassâ

enter the hidd directory and do: make install

Now, start hidd in the following way (and after you enter the following command press the PS button on your sixaxis):

hidd --server --nocheck -n


and use CTRL+C to stop it.

Stop and restart the hidd and bluetooth services and press the PS button on your SIXAXIS again.

Now execute this command:

jstest /dev/js0


and press stuff on the SIXAXIS, you should see the output of the jstest program change according to what you are doing with the pad.
 
Top Bottom