PC as SIXAXIS Joystick

Technical discussion on the newly released and hard to find PS3.

Moderators: cheriff, emoon

jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Re: My question

Post by jimparis »

huanmengQQ wrote:I just also want to use the PC as the joystick to control the PS3.So we studied the sixaxis's HID descriptor and use the format to send the data to the PS3.The data is:
You should use my code, or Brandon's code. You don't need to use that other "hidclient" code, because the PS3 does not need a SDP record.
PS:I also downloaded the jimparis's source code ,but it also didn't work!The message is
emu: can't connect to 00:23:06:8A:22:7B psm 17: Host is down
also
emu: can't connect to 00:23:06:8A:22:7B psm 17: Connection timed out
Are you sure 00:23:06:8A:22:7B is the Bluetooth address of your PS3? It looks like it's one of OUIs that Sony typically uses for controllers. How did you obtain it? The best way is to use the Sixpair utility on a controller that has previously been paired with the PS3.
huanmengQQ
Posts: 7
Joined: Sun Aug 30, 2009 6:01 pm

Re: My question

Post by huanmengQQ »

Thank you for your response.
jimparis wrote: You should use my code, or Brandon's code. You don't need to use that other "hidclient" code, because the PS3 does not need a SDP record.
I think it is useless when I try to use the BT adptor to connect to the PS3.But if I use the PS3 to connect to the BT adptor it may be useful.So I use the SDP record.
jimparis wrote: Are you sure 00:23:06:8A:22:7B is the Bluetooth address of your PS3? It looks like it's one of OUIs that Sony typically uses for controllers. How did you obtain it? The best way is to use the Sixpair utility on a controller that has previously been paired with the PS3.
Yes, I'm sure it is the bluetooth address of my PS3,I get it by using the Sixpair utility.

pdebian:/home/tted/samba/temp# ./sixpair
Current Bluetooth master: 00:23:06:8a:22:7b
Setting master bd_addr to 00:11:67:c3:cc:42

I have changed the class , the bluetooth address and the link mode of the adptor but I can not connect to the PS3.Shuld I change other something in order to connect to the PS3?
This is the log which I got from using the "hcidump -t -x -V"

Code: Select all

2009-09-02 09&#58;55&#58;10.655118 < HCI Command&#58; Create Connection &#40;0x01|0x0005&#41; plen 1 3
    bdaddr 00&#58;23&#58;06&#58;8A&#58;22&#58;7B ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
    Packet type&#58; DM1 DM3 DM5 DH1 DH3 DH5
2009-09-02 09&#58;55&#58;10.658975 > HCI Event&#58; Command Status &#40;0x0f&#41; plen 4
    Create Connection &#40;0x01|0x0005&#41; status 0x00 ncmd 1
2009-09-02 09&#58;55&#58;10.850966 > HCI Event&#58; Role Change &#40;0x12&#41; plen 8
    status 0x00 bdaddr 00&#58;23&#58;06&#58;8A&#58;22&#58;7B role 0x01
    Role&#58; Slave
2009-09-02 09&#58;55&#58;10.882968 > HCI Event&#58; Connection Packet Type Changed &#40;0x1d&#41; pl en 5
    status 0x00 handle 0 ptype 0x3318
    Packet type&#58; DM1 DH1 2-DH3 2-DH5 3-DH3 3-DH5
2009-09-02 09&#58;55&#58;10.954957 > HCI Event&#58; Connect Complete &#40;0x03&#41; plen 11
    status 0x00 handle 1 bdaddr 00&#58;23&#58;06&#58;8A&#58;22&#58;7B type ACL encrypt 0x00
2009-09-02 09&#58;55&#58;10.954973 < HCI Command&#58; Read Remote Supported Features &#40;0x01|0 x001b&#41; plen 2
    handle 1
2009-09-02 09&#58;55&#58;10.957957 > HCI Event&#58; Max Slots Change &#40;0x1b&#41; plen 3
    handle 1 slots 5
2009-09-02 09&#58;55&#58;10.958957 > HCI Event&#58; Command Status &#40;0x0f&#41; plen 4
    Read Remote Supported Features &#40;0x01|0x001b&#41; status 0x00 ncmd 1
2009-09-02 09&#58;55&#58;10.973956 > HCI Event&#58; Connection Packet Type Changed &#40;0x1d&#41; pl en 5
    status 0x00 handle 1 ptype 0x660c
    Packet type&#58; DM1 DM3 DM5 3-DH1 3-DH3 3-DH5
2009-09-02 09&#58;55&#58;10.988956 > HCI Event&#58; Read Remote Supported Features &#40;0x0b&#41; pl en 11
    status 0x00 handle 1
    Features&#58; 0xff 0xff 0x8f 0xfe 0x9b 0xf9 0x00 0x80
2009-09-02 09&#58;55&#58;11.044951 > HCI Event&#58; QoS Setup Complete &#40;0x0d&#41; plen 21
    status 0x00 handle 1 flags 0
    Service type&#58; 1
    Token rate&#58; 0
    Peak bandwith&#58; 0
    Latency&#58; 22500
    Delay variation&#58; -1
2009-09-02 09&#58;55&#58;52.656972 < HCI Command&#58; Disconnect &#40;0x01|0x0006&#41; plen 3
    handle 1 reason 0x13
    Reason&#58; Remote User Terminated Connection
Last edited by huanmengQQ on Wed Sep 02, 2009 7:56 pm, edited 1 time in total.
Everyone is NO.1
huanmengQQ
Posts: 7
Joined: Sun Aug 30, 2009 6:01 pm

Post by huanmengQQ »

Ah....It works perfectly.I just change the link mode of the bluetooth adptor by using the "hciconfig hci0 lm accept".It is the slave mode before I change the link mode ,but it didn't work which I also don't know why.After I change the mode again,it works.But it is very diffcult to connect to the PS3.Always I must try more than 3 times.

Thanks very much for your response.

Now I want to use the PS3 to find and connect the PC without change the BT address,so I think the SDP record is necessary.But now I can get the 0xf4 feature report from the PS3.I want to konw that in order to get the 0xf4 report from the PS3 what shuld I do?

I think the PC must send some data to the PS3.But as far I have send the feature data

Code: Select all

unsigned char feature_1&#91;&#93;= &#123;
        0x43,0x02,0x01, 0x03, 0x00, 0x05, 0x0c, 0x01, 0x02, 0x18,
        0x18, 0x18, 0x18, 0x09, 0x0a, 0x10, 0x11, 0x12,
        0x13, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x02,
        0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x04, 0x04,
        0x04, 0x04, 0x00, 0x00, 0x02, 0x01, 0x02, 0x00,
        0x64, 0x00, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00
   &#125;;
unsigned char feature_ef&#91;&#93;= &#123;
        0x53,0xef,0xef, 0x04, 0x00, 0x05, 0x03, 0x01, 0xa0, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x02, 0x74, 0x02, 0x71, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04 
unsigned char feature_08&#91;&#93;=&#123;
        0x43,0xf4,0x00,0x06
&#125;
Just as the code I have send to you.But the PS3 give no response.I really don't konw how to do next.
Please help me.
Thanks again.
Everyone is NO.1
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

huanmengQQ wrote:Ah....It works perfectly.I just change the link mode of the bluetooth adptor by using the "hciconfig hci0 lm accept".It is the slave mode before I change the link mode ,but it didn't work which I also don't know why.After I change the mode again,it works.
That is strange, I never had to set "lm accept". I guess it might be a difference in the Bluetooth adapter.
But it is very diffcult to connect to the PS3.Always I must try more than 3 times.
That's also strange. Are you sure you're getting a good wireless signal between the PC and PS3?
Now I want to use the PS3 to find and connect the PC without change the BT address,so I think the SDP record is necessary.But now I can get the 0xf4 feature report from the PS3.I want to konw that in order to get the 0xf4 report from the PS3 what shuld I do?
I don't know if the PS3 supports doing this, for controllers. You could do it for a simulated keyboard or mouse, but do you have any reason to expect that it should work for controllers too? (does making a connection in that way work with a normal sixaxis?)
I think the PC must send some data to the PS3.But as far I have send the feature data

Code: Select all

unsigned char feature_1&#91;&#93;= &#123;
unsigned char feature_ef&#91;&#93;= &#123;
unsigned char feature_08&#91;&#93;=&#123;
Just as the code I have send to you.But the PS3 give no response.I really don't konw how to do next.
Please help me.
Thanks again.
The PS3 is normally in charge, you just send replies to its HID requests. If it's not sending you any HID requests, then it's probably not going to work at all, regardless of what you send. I don't think blindly sending reports to the PS3 without having received a HID_GET_REPORT query is going to do anything.
huanmengQQ
Posts: 7
Joined: Sun Aug 30, 2009 6:01 pm

Post by huanmengQQ »

jimparis wrote:That is strange, I never had to set "lm accept". I guess it might be a difference in the Bluetooth adapter.
That's also strange. Are you sure you're getting a good wireless signal between the PC and PS3?
I think I have found the reason.After I changed the BT address and the class of the adptor,I use the command "hciconfig hci0 reset".Although I don't know why but I can connect to the PS3 smoothly.
I don't know if the PS3 supports doing this, for controllers. You could do it for a simulated keyboard or mouse, but do you have any reason to expect that it should work for controllers too? (does making a connection in that way work with a normal sixaxis?)
In fact I also don't know whether the PS3 supports that or not.I think it may be the best way to control the PS3 just as the normal sixaxis.(Firstly,the PS3 find and connect to the PC,and remember the BT address and the SDP record of the bluetooth adptor.And then I can use the PC to connect to and control the PS3.)So I want to use the SDP record without change the BT address of the bluetooth address.But it seems not simple.

I had tried to use the PS3 to find and connect to the sixaxis,but it doesn't work at all.I even can't find the controller when I use the bluetooth search.
The PS3 is normally in charge, you just send replies to its HID requests. If it's not sending you any HID requests, then it's probably not going to work at all, regardless of what you send. I don't think blindly sending reports to the PS3 without having received a HID_GET_REPORT query is going to do anything.
I also studied the data when the PC communicate with the PS3.I also found that the PS3 fisrtly send the HID_GET_REPORT to the controller.I want to know do you have any idea to get the HID_GET_REPORT without change the BT address of the bluetooth adptor?

Thanks for your rapidly response.
Everyone is NO.1
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

huanmengQQ wrote:I think I have found the reason.After I changed the BT address and the class of the adptor,I use the command "hciconfig hci0 reset".Although I don't know why but I can connect to the PS3 smoothly.
Yeah, it doesn't surprise me that you'd need to reset the adapter after changing its address.
I had tried to use the PS3 to find and connect to the sixaxis,but it doesn't work at all.I even can't find the controller when I use the bluetooth search.
Agreed, the controller does not work that way (it always initiates the connection to the PS3).
I also studied the data when the PC communicate with the PS3.I also found that the PS3 fisrtly send the HID_GET_REPORT to the controller.I want to know do you have any idea to get the HID_GET_REPORT without change the BT address of the bluetooth adptor?
I know of no way to do that. If you don't want to change your adapter address, you could connect to the PS3 via USB and perform the pairing protocol with your adapter's address, but you'd need a USB gadget device (like a PSP) to be able to do that.
Post Reply