How to connect to an already started PS3

I took some time to analyze the hci dumps I got with the sixaxis proxy.

I discovered what was preventing the sixaxis emulator to connect to an already started PS3.

The magic command is:

sudo hciconfig hci0 class 0x508

Explanation:

The following command gives the class of the bluetooth adapter:

hciconfig hci0 class

For ex my broadcom adapter has the following class:

Class: 0x480100
Service Classes: Capturing, Telephony
Device Class: Computer, Uncategorized

After executing the command, it gets the following:

Class: 0x000508
Service Classes: Unspecified
Device Class: Peripheral, Gamepad

That’s the class of a sixaxis, and for a mysterious reason, it seems that the PS3 only checks it if it’s already started!

Tip: execute this command after each hard/soft reset of the dongle.

To come: several sixaxis emulator running at the same time!

EDIT: this already was suggested by Jim Paris on forums.ps2dev.org (seems to be down right now but it’s still available in google cache)

  • set bluetooth dongle in slave mode, piscan, class 0x000508

I don’t know why, but I missed that each time I read this forum thread :\

13 Replies to “How to connect to an already started PS3”

  1. alex@alex-Aspire-1640:~/diyps3controller-read-only$ ./emu 00:0b:e4:46:f3:8e
    connecting to 00:0b:e4:46:f3:8e psm 17
    #then the ps3 go on but promt press PS toggle#
    emu: can't connect to control psm: Connection timed out

    idea??

  2. My dear friend, you are one of my personal heroes now!
    I just followed your tutorial on the emulator and works like a charm, and it was the first tutorial I've read for liunx that works perfectly on the first try…

    however, there are a few issues I'm encountering:

    1- I'm using a conceptronic dongle that works perfectly, except for killzone 2, where it gives me a conection error when trying to go online. searching for the errors (it's more than one…), i discovered that it's a microfone error, possibly due to bluetooth connection?

    2- With another dongle borrowed from a friend (don't remember manufactor id, but i'll find it out later if you want) it works perfectly. However, in killzone 2 the loading screen can be tilted with the sixaxis motion sensor, and it's allways fully tilted to the right, and if you use the sniper rifle with zoom, it keeps moving right, 'cause the aim in scope can be moved with the motion sensor. That oughta mean the ps3 keeps receiving the information that the controller is tilted to the right, right?
    3- In some games, I found out that you can play better by pressing "0", entering the calibration mode for dead zone and don't do anything, just leave it on and adjust sensitivity.
    I'm using a G9 by the way.

    And as a personal question, could there be an option to save the settings for sensitivity/dead zone in each game? Jus wondering, it's no biggie to calibrate and write it down…

    Anyway, many thanks, you made my gaming life happier!!! 🙂

    Hope any of this was usefull for you, I'll keep follwoing your blog like a religious fanatic.

    I'm portuguese by the way, so sorry for any spelling errors people.

  3. Thanks for the feedback!

    1- You are getting error messages in the emu process terminal?

    2- Yes, give me please some details about the dongles you tested. The commands to get details about the dongle are "hciconfig -a hci0" and "hciconfig hci0 revision".
    You are right, there must be something wrong with the motion sensing values. If the game allows it, a work-around is to disable the motion sensing control.

    3- That seems weird… What kind of game is it? How could you describe the effect of this "mode" on the mouse movements?

    Sensitivity/dead zone are hard coded into emuclient.c (at the beginning of the file).

  4. 1- the only thing outputed from the emu process is:

    connecting to 00:23:06:7d:c5:f4 psm 17
    connecting to 00:23:06:7d:c5:f4 psm 19
    connected
    Unknown feature report 0xf7, sending empty response

    My guess is that the tilt is the "empty response", could it be? I don't know.

    2 – the dongle that works perfectly is this one (it has the adress changed to the dualshock 3 one, I don't have a sixaxis):

    hciconfig hci0 revision
    hci0: Type: USB
    BD Address: 00:23:06:BF:9F:47 ACL MTU: 1021:4 SCO MTU: 48:10
    Unsupported manufacturer

    hciconfig -a hci0
    hci0: Type: USB
    BD Address: 00:23:06:BF:9F:47 ACL MTU: 1021:4 SCO MTU: 48:10
    UP RUNNING PSCAN
    RX bytes:12153526 acl:203370 sco:0 events:51218 errors:0
    TX bytes:2965072 acl:51147 sco:0 commands:39 errors:0
    Features: 0xff 0xfe 0xff 0x7e 0x98 0x19 0x00 0x80
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
    Link policy: RSWITCH HOLD SNIFF PARK
    Link mode: SLAVE ACCEPT
    Name: 'ubuntu-0'
    Class: 0x000508
    Service Classes: Unspecified
    Device Class: Peripheral, Gamepad
    HCI Ver: 2.0 (0x3) HCI Rev: 0x302 LMP Ver: 2.0 (0x3) LMP Subver: 0x302
    Manufacturer: Integrated System Solution Corp. (57)

    and the other one is:

    hciconfig hci0 revision
    hci0: Type: USB
    BD Address: 00:00:00:00:00:00 ACL MTU: 377:10 SCO MTU: 64:8
    Firmware 0.105 / 99

    hciconfig -a hci0
    hci0: Type: USB
    BD Address: 00:00:00:00:00:00 ACL MTU: 377:10 SCO MTU: 64:8
    UP RUNNING PSCAN
    RX bytes:2563 acl:22 sco:0 events:105 errors:0
    TX bytes:2461 acl:49 sco:0 commands:57 errors:0

    the strange thing is: the one that doesn't work is a conceptronic dongle, and the adress is all zeros, allways, altough with the ./bdaddr command it shows all zeros, but when i change it, it shows the dualshock 3 address. the funny thing is that I have another same dongle (same model and manufacter) that doesn't allow its adress to be changed.

    3 – I'm playing Killzone 2, FPS. I've tried out Resistance FOM and it runs smooth, although I don't notice any difference in the dead zone calibration. I have a few more games to try out as well, but for now I'm trying to make this good for killzone 2, it's my main addiction :).

    I got Bioshock, FEAR, the Darkness, Fallout 3, Mirror's Edge and Haze (I'm a shooter guy…) to try out as well. as soon as I try them I'll give you a feedback as well.

    Hope any of this was usefull to you.

    And thanks again.

    Oh, and I'm using a Acer Aspire 5738z laptop with Ubuntu 10.04 x64. Runs perfectly.

    I'm also experiencing the issue that some people posted that some times the controls "lock" (ie: if i'm in a shootout, and try to straffe as i aim at the same time, straffe doesn't work, i have to let go and press again quick), appart from that, no problems. For now this only happened in Killzone 2, but I'll try the other games and send you some more feedback.

  5. I've posted another comment here but I guess I messed up and it vanished…
    anyway, here goes:

    1- in the terminal, noerrors, just the "sending unknown response" thing. Think that's wat's tilting the axix?

    2 – the dongle that doesn't work good is this one:

    hciconfig -a hci0
    hci0: Type: USB
    BD Address: 00:00:00:00:00:00 ACL MTU: 377:10 SCO MTU: 64:8
    UP RUNNING PSCAN
    RX bytes:46656 acl:25 sco:0 events:6478 errors:0
    TX bytes:385065 acl:6649 sco:0 commands:30 errors:0

    hciconfig hci0 revision
    hci0: Type: USB
    BD Address: 00:00:00:00:00:00 ACL MTU: 377:10 SCO MTU: 64:8
    Firmware 0.105 / 99

    bluez-4.63/test/./bdaddr
    Manufacturer: Broadcom Corporation (15)
    Device address: 00:23:06:BF:9F:47

    this one gets me network disconection after a while, but offline singleplayer works without a problem.

    the one that works perfectly is this one:

    hciconfig -a hci0
    hci0: Type: USB
    BD Address: 00:11:67:D3:E4:37 ACL MTU: 1021:4 SCO MTU: 48:10
    UP RUNNING PSCAN
    RX bytes:1926 acl:0 sco:0 events:53 errors:0
    TX bytes:716 acl:0 sco:0 commands:53 errors:0
    Features: 0xff 0xfe 0xff 0x7e 0x98 0x19 0x00 0x80
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
    Link policy: RSWITCH HOLD SNIFF PARK
    Link mode: SLAVE ACCEPT
    Name: 'ubuntu-0'
    Class: 0x4a0100
    Service Classes: Networking, Capturing, Telephony
    Device Class: Computer, Uncategorized
    HCI Ver: 2.0 (0x3) HCI Rev: 0x302 LMP Ver: 2.0 (0x3) LMP Subver: 0x302
    Manufacturer: Integrated System Solution Corp. (57)

    hciconfig hci0 revision
    hci0: Type: USB
    BD Address: 00:11:67:D3:E4:37 ACL MTU: 1021:4 SCO MTU: 48:10
    Unsupported manufacturer
    bluez-4.63/test/./bdaddr
    Manufacturer: Integrated System Solution Corp. (57)
    Device address: 00:11:67:D3:E4:37

    Disabling the sensor is not an option for killzone 2, as it has some in-game stuff (planting bombs and opening valves in campaign mode) that are done only with the motion sensor.

    3 – The game I play (in this case, is Killzone 2) are mostly FPS.
    I'll test it with the others I have and give you feedback as well.

  6. I've tested some more games and here are the results:

    Bioshock : perfect, just like a pc

    FEAR : also perfect

    Haze : Very good, although a little practice is required due to acceleration issues

    The Darkness : Very good also, but a little slow turning arround (180º)

    Fallout 3 : perfect

    Resistance FOM : like the darkness, fine but a little slow on performing 180º turns.

    Killzone 2 : The mouse sometimes keeps moving when stopped, although after (finally) finding out the right calibration for the dead zone, it works fine.

    It seams that the PS3 exclusives are the ones that require some more tweaks, and the ones that are ported for PC work fine practicly "out-of-the-box" when you start the game, all you need to do is increase sensitivity.

    Anything else I can do to help, just ask.

  7. You have many games to test, that's great.

    Could you please post the dead zone for each game, so that we can make a database on the project wiki?

    A tip I didn't told in the tutorial is that the sensitivity of the game itself has to be adapted too. For the games I tested (COD MW2 and BF BC2), the best was to set the sensitivity to the highest.

  8. To find the best translation, the rotation speed has to be computed for each position.

    That's a pain to do, but it tells exactly how a game behaves.

    I already did that for some games:
    farcry 2
    COD MW2

    The procedure is very simple for horizontal rotations:
    – set in-game sensitivity to the highest
    – take measures of the rotation speed from the first position out of the dead zone to the highest one
    – for low values, get the time for 360°
    – for middle to high values, count the number of 360° for 30s to 60s, this will give a more precise time for 360°

    For vertical rotations, the best is to find the amount of time a rotation speed has to be applied to perform 180° (from bottom to top).

    Another point: a friend told me he found the vertical sensitivity slower than the horizontal one, and it was different online/offline 🙁

    Vertical and horizontal movements should probably have different multipliers.

  9. How do you measure the rotation speed?
    I've been trying to tweak my configs for xim but it's never perfect. I need to get a bluetooth dongle! lol

  10. For "horizontal" rotations:
    Aim at a detail of the screen, apply a constant rotation speed and start the stopwatch, and stop it after x revolutions (for low values, x=1, and to improve the precision for high values, x>30).
    Divide the total time by x, this gives the time to get a single revolution.
    Take measures for different rotations speed.

    For "vertical" rotations:
    Aim at the bottom, apply a constant rotation over a given time y (=> no need for a stopwatch, but requires to modify the code), and change the time y until it makes a perfect bottom to top movement (approx 180°).
    Multiply the time by 2, this gives the time to get a single revolution.
    Take measures for different rotations speed.

    I hope this is more understandable…

  11. I've been testing some more games and the results are good.
    Although the best ones are really the ones that are ported on to the PC as well, the exclusives are a bit more dificult to adjust.
    Could it be that the programmers of the games allready optimize them for mouse support?
    Anyway, after I complete all of my tests I'll post the results for DeadZone/mouse sensitivity that work for me.
    Should I post them here, or do you want me to mail them to you for the wiki?

Leave a Reply

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