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 

From pc send data to PS3

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS3 Development
View previous topic :: View next topic  
Author Message
huanmengQQ



Joined: 30 Aug 2009
Posts: 7

PostPosted: Mon Aug 31, 2009 12:32 pm    Post subject: From pc send data to PS3 Reply with quote

Hello everyone!

Now I just want to send data from the PC to control the PS3.So I send the sixaxis's data just as
the report descriptor's format.But it doesn't work.

The code is:

Code:

unsigned char report_1[50]={
                  0xA1,0x01,0x00,0x80,0x00,0x00,0x00,0x80,0x80,0x80,
                  0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x00,
                  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
                  0x03,0x05,0x16,0xFF,0xCD,0x00,0x00,0x33,0x7F,0x77,
                  0x01,0x80,0x02,0x07,0x02,0x14,0x01,0x96,0x01,0xE8};
unsigned char report_2[50]={
                  0xA1,0x01,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,
                  0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
                  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
                  0x03,0x05,0x16,0x00,0x00,0x00,0x00,0x33,0x02,0x77,
                  0x01,0x9E,0x02,0x08,0x01,0xF2,0x01,0x93,0x00,0x02};
unsigned char report_3[50]={
                  0xA1,0x01,0x00,0x20,0x00,0x00,0x00,0x80,0x80,0x80,
                  0x80,0x00,0x00,0x00,0x00,0x00,0x7f,0x00,0x00,0x00,
                  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
                  0x03,0x05,0x16,0x00,0x00,0x00,0x00,0x33,0x02,0x77,
                  0x01,0x9E,0x02,0x08,0x01,0xF2,0x01,0x93,0x00,0x02};
      
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
   };

                send ( sctl, feature_1,50,MSG_DONTWAIT );
                usleep(1000000);
                send ( sctl, feature_ef,50,MSG_DONTWAIT );
                usleep(send ( 1000000);
                send ( sint, report_1,50,MSG_NOSIGNAL );
                usleep(100000);
                send ( sint, report_2,50,MSG_NOSIGNAL );
                usleep(100000);
                send ( sint, report_3,50,MSG_NOSIGNAL );
                usleep(100000);
                send ( sint, report_2,50,MSG_NOSIGNAL );
                usleep(100000);             


Thanks for any help!
_________________
Everyone is NO.1
Back to top
View user's profile Send private message MSN Messenger
huanmengQQ



Joined: 30 Aug 2009
Posts: 7

PostPosted: Mon Aug 31, 2009 8:58 pm    Post subject: Reply with quote

Anyone can help me?

May be I didn't express myself exactly.
I want to use the PC to control the PS3,so I change the class of the bluetooth adaptor to 0x000508 which is the class of sixaxis.And then I use the code download from the http://anselm.hoffmeister.be/computer/hidclient/index.html.en which run on the PC.Finally use the PS3 to find and connect to the bluetooth adaptor.It works well,the mouse and the keyboard can control the PS3 smoothly.

But when I change the sdprecord to sixaxis's and send the data to the PS3 ,it doesn't work. How should I do?

I also read the article http://forums.ps2dev.org/viewtopic.php?t=11334&start=0&postdays=0&postorder=asc&highlight=&sid=ee21398c96cfe8912c0c33f41cea49d1.
But I don't receive the 0xf4 feature report.Shuld I send the get_report to get the 0xf4 feature?Or the report is sent when PS3 is connected?
_________________
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: Wed Sep 02, 2009 3:13 am    Post subject: Reply with quote

You already posted this in the other thread, no need to double-post it. I will answer there.
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
Page 1 of 1

 
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