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

Discussion in 'CellPerformance@B3D' started by Panajev2001a, Sep 12, 2007.

  1. Panajev2001a

    Veteran

    Joined:
    Mar 31, 2002
    Messages:
    3,187
    Likes Received:
    8
    Introduction: No, motion sensing still does not work.

    Remember this:

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

    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.
     
  2. Panajev2001a

    Veteran

    Joined:
    Mar 31, 2002
    Messages:
    3,187
    Likes Received:
    8
    With the set-up I presented in my last two threads the patches in section 3 of the http://www.pabr.org/sixlinux/sixlinux.en.html website are not needed. Well, at least I did not need to apply any of them (myself as obviously someone else integrated that kind of functionality in the official trees of those packages).
     
  3. Arwin

    Arwin Now Officially a Top 10 Poster
    Moderator Legend

    Joined:
    May 17, 2006
    Messages:
    17,682
    Likes Received:
    1,200
    Location:
    Maastricht, The Netherlands
    I did come across a tool that reads sixaxis motion control information when hooking it up to the PC (Windows). I tested it and it works, and it seems to come with a source. Unfortunately it seems to be Delphi/Pascal, and it's huge. :D It uses some general controller library I think.

    More information here:

    http://forums.ps2dev.org/viewtopic.php?p=57575#57575
     
  4. Panajev2001a

    Veteran

    Joined:
    Mar 31, 2002
    Messages:
    3,187
    Likes Received:
    8
    Uhm... sigh... those people could have helped HIDD and Bluetooth developers (instead of blah Pascal re-blah [j/k Pascal lovers :p]) so that motion sensors' support would have been easier to add... :(.
     
    #4 Panajev2001a, Sep 12, 2007
    Last edited by a moderator: Sep 12, 2007
  5. Arwin

    Arwin Now Officially a Top 10 Poster
    Moderator Legend

    Joined:
    May 17, 2006
    Messages:
    17,682
    Likes Received:
    1,200
    Location:
    Maastricht, The Netherlands
    yes, obviously. But in a sense, they are helping ... at least we know it is possible! :) Now someone just has to make it accessible to all.
     
  6. Panajev2001a

    Veteran

    Joined:
    Mar 31, 2002
    Messages:
    3,187
    Likes Received:
    8
    UPDATED for bluez 3.23 and latest patch from pabr.

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

    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-libs package: bluez-utils-3.23.tar.gz

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

    open them on your ps3:

    tar -zxvf bluez-libs-3.23.tar.gz

    tar -zxvf bluez-utils-3.23.tar.gz


    Now, let's work on bluez libs:

    cd bluez-libs-3.23

    ./configure --prefix=/usr

    make clean

    make all

    make install


    Now, let's work on bluez-utils:

    cd bluez-utils-3.23


    ... download this patch:

    wget http://www.pabr.org/sixlinux/patch-hidd-3.19-pabr3


    Let's apply it:

    patch -p1 < patch-hidd-3.19-pabr3

    (no need to remove any section of the new main.c file)

    Let's build and install bluez-utils:

    ./configure --prefix=/usr

    make clean

    make all

    make install

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

    when the guide says you should check that the file /etc/bluetooth/hcid.conf contains the following:

    Code:
    iscan disable;
    pscan enable;
    #auth enable;                                        
    #encrypt enable;
    not all lines might be there...

    However they should be located in this section of the file:

    Code:
    # Default settings for HCI devices
    device {
            # Local device name
            #   %d - device id
            #   %h - host name
            name "%h-%d";
    
            # Local device class
            class 0x120104;
    
            # Default packet type
            #pkt_type DH1,DM1,HV1;
    
            # Inquiry and Page scan
            iscan disable; pscan enable;
            auth enable;
            encrypt enable;
    
    In the quote I posted I have the last two lines uncommented because this is my file now, after the whole process of setting the sixaxis up in bluetooth mode has been completed (in the guide you will find that it says to uncomment those two lines after you have run some tests).

    Restart bluetooth: service bluetooth restart.

    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


    press the PS button on your SIXAXIS, check that hidd recognizes it and use CTRL+C to stop the hidd service.

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

    Now execute this command:

    jstest /dev/js0

    or

    jstest /dev/input/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.
     
    #6 Panajev2001a, Sep 18, 2007
    Last edited by a moderator: Feb 26, 2008
  7. Panajev2001a

    Veteran

    Joined:
    Mar 31, 2002
    Messages:
    3,187
    Likes Received:
    8
    If you want to avoid the error I outlined in the post above 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.
     
  8. Panajev2001a

    Veteran

    Joined:
    Mar 31, 2002
    Messages:
    3,187
    Likes Received:
    8
    Bluetooth support is back into Geoff's PS3 Linux kernel tree, so some news about sixaxis support.

    Using the latest patch from PABR's site: http://www.pabr.org/sixlinux/patch-hidd-3.19-pabr3

    You can cleanly patch Bluez-utils 3.23:

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

    and the sixaxis will work just as nicely as you would want it to (minus motion sensing, but hey it will come one day... I hope :)).

    So, you can follow the same instructions you find in this thread, just remember to download the newest bluez-libs and bluez-utils from the bluez.org's web site as well as the latest patch from pabr's site (for bluez-utils 3.19, but it will work nice and clean with bluez-utils 3.23 :)).
     
Loading...

Share This Page

  • About Us

    Beyond3D has been around for over a decade and prides itself on being the best place on the web for in-depth, technically-driven discussion and analysis of 3D graphics hardware. If you love pixels and transistors, you've come to the right place!

    Beyond3D is proudly published by GPU Tools Ltd.
Loading...