forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PC as SIXAXIS Joystick
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS3 Development
View previous topic :: View next topic  
Author Message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Wed Sep 02, 2009 3:21 am    Post subject: Re: My question Reply with quote

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.
Quote:

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.
Back to top
View user's profile Send private message
huanmengQQ



Joined: 30 Aug 2009
Posts: 7

PostPosted: Wed Sep 02, 2009 12:31 pm    Post subject: Re: My question Reply with quote

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:
2009-09-02 09:55:10.655118 < HCI Command: Create Connection (0x01|0x0005) plen 1 3
    bdaddr 00:23:06:8A:22:7B ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5
2009-09-02 09:55:10.658975 > HCI Event: Command Status (0x0f) plen 4
    Create Connection (0x01|0x0005) status 0x00 ncmd 1
2009-09-02 09:55:10.850966 > HCI Event: Role Change (0x12) plen 8
    status 0x00 bdaddr 00:23:06:8A:22:7B role 0x01
    Role: Slave
2009-09-02 09:55:10.882968 > HCI Event: Connection Packet Type Changed (0x1d) pl en 5
    status 0x00 handle 0 ptype 0x3318
    Packet type: DM1 DH1 2-DH3 2-DH5 3-DH3 3-DH5
2009-09-02 09:55:10.954957 > HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 1 bdaddr 00:23:06:8A:22:7B type ACL encrypt 0x00
2009-09-02 09:55:10.954973 < HCI Command: Read Remote Supported Features (0x01|0 x001b) plen 2
    handle 1
2009-09-02 09:55:10.957957 > HCI Event: Max Slots Change (0x1b) plen 3
    handle 1 slots 5
2009-09-02 09:55:10.958957 > HCI Event: Command Status (0x0f) plen 4
    Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1
2009-09-02 09:55:10.973956 > HCI Event: Connection Packet Type Changed (0x1d) pl en 5
    status 0x00 handle 1 ptype 0x660c
    Packet type: DM1 DM3 DM5 3-DH1 3-DH3 3-DH5
2009-09-02 09:55:10.988956 > HCI Event: Read Remote Supported Features (0x0b) pl en 11
    status 0x00 handle 1
    Features: 0xff 0xff 0x8f 0xfe 0x9b 0xf9 0x00 0x80
2009-09-02 09:55:11.044951 > HCI Event: QoS Setup Complete (0x0d) plen 21
    status 0x00 handle 1 flags 0
    Service type: 1
    Token rate: 0
    Peak bandwith: 0
    Latency: 22500
    Delay variation: -1
2009-09-02 09:55:52.656972 < HCI Command: Disconnect (0x01|0x0006) plen 3
    handle 1 reason 0x13
    Reason: Remote User Terminated Connection

_________________
Everyone is NO.1


Last edited by huanmengQQ on Wed Sep 02, 2009 7:56 pm; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
huanmengQQ



Joined: 30 Aug 2009
Posts: 7

PostPosted: Wed Sep 02, 2009 3:03 pm    Post subject: Reply with quote

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:
unsigned char feature_1[]= {
        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
   };
unsigned char feature_ef[]= {
        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[]={
        0x43,0xf4,0x00,0x06
}

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
Back to top
View user's profile Send private message MSN Messenger
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Thu Sep 03, 2009 4:23 am    Post subject: Reply with quote

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.

Quote:
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?

Quote:
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?)

Quote:
I think the PC must send some data to the PS3.But as far I have send the feature data
Code:
unsigned char feature_1[]= {
unsigned char feature_ef[]= {
unsigned char feature_08[]={

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.
Back to top
View user's profile Send private message
huanmengQQ



Joined: 30 Aug 2009
Posts: 7

PostPosted: Thu Sep 03, 2009 10:49 pm    Post subject: Reply with quote

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.

Quote:
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.

Quote:
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
Back to top
View user's profile Send private message MSN Messenger
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Fri Sep 11, 2009 3:23 am    Post subject: Reply with quote

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.

Quote:
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).

Quote:
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.
Back to top
View user's profile Send private message
Tomaz



Joined: 25 Aug 2006
Posts: 3

PostPosted: Mon Jul 05, 2010 5:01 am    Post subject: Reply with quote

Hi! Has anyone done any more research in this?

I used jimparis code and made a GUI driven script editor that connects to the ps3. Works perfect and I can make neat scripts that perform combos in Street Fighter 4 ( for beating the offline challenges )

My main issue right now is that the PS3 has to be off for the code t work, if the PS3 is on, then my app say it connects but I can not control anything, it only works if the app actually boots up the PS3, anyone know anything about that?

I plan to release the source for it once i get everything to work the way I want it to.

Oh, I'm also making this in Ubuntu since I couldn't manage to find a way to alter the bluetooth mac addy in Windows XP. But if anyone knows how to do that then I'd be happy to make the app also work in Windows.

Oh, also, if jimparis reads this, you mentioned something about pairing the PS3 to the real mac addy of the bluetooth dongle, any ideas on how to do that? Like using some special app for the PSP?
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Wed Jul 07, 2010 6:10 am    Post subject: Reply with quote

Tomaz wrote:
Hi! Has anyone done any more research in this?

I used jimparis code and made a GUI driven script editor that connects to the ps3. Works perfect and I can make neat scripts that perform combos in Street Fighter 4 ( for beating the offline challenges )

My main issue right now is that the PS3 has to be off for the code t work, if the PS3 is on, then my app say it connects but I can not control anything, it only works if the app actually boots up the PS3, anyone know anything about that?
I haven't seen that. How did you turn on the PS3, by pushing the button or by using a real controller? If using a real controller, you may run into problems if it was the same bdaddr as the emulator.

Quote:
Oh, I'm also making this in Ubuntu since I couldn't manage to find a way to alter the bluetooth mac addy in Windows XP. But if anyone knows how to do that then I'd be happy to make the app also work in Windows.

Oh, also, if jimparis reads this, you mentioned something about pairing the PS3 to the real mac addy of the bluetooth dongle, any ideas on how to do that? Like using some special app for the PSP?
Check out
http://diy-machine.blogspot.com/2010/05/pair-any-bluetooth-dongle-with-ps3-as.html
http://diy-machine.blogspot.com/2010/05/sixpair-emu-customizer.html
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS3 Development All times are GMT + 10 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group