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 

ps3 controller not working with latest 2.6.28 kernel

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



Joined: 06 Jul 2008
Posts: 66

PostPosted: Wed Dec 31, 2008 10:16 pm    Post subject: ps3 controller not working with latest 2.6.28 kernel Reply with quote

Code:
input: Sony PLAYSTATION(R)3 Controller as /class/input/input5
sony 0003:054C:0268.0006: input: USB HID v1.11 Joystick [Sony PLAYSTATION(R)3 Controller] on usb-sb_05-2.2/input0
sony: probe of 0003:054C:0268.0006 failed with error 17

is there a patch available to fix this?
_________________
http://playstation3-homebrew-multimedia.blogspot.com/
Back to top
View user's profile Send private message
tolysz



Joined: 02 Jan 2009
Posts: 7

PostPosted: Fri Jan 02, 2009 9:46 pm    Post subject: Reply with quote

Will work in the next release :)
for now here is a patch for it:

http://www.tolysz.net/dualshock.diff

Edit: please to use this new superior patch :)
And post feedback

The more people will try it the faster it will go into official mainstream.


Last edited by tolysz on Mon Jan 05, 2009 2:35 am; edited 1 time in total
Back to top
View user's profile Send private message
ps3fanboy



Joined: 06 Jul 2008
Posts: 66

PostPosted: Sat Jan 03, 2009 12:40 am    Post subject: Reply with quote

thanks a lot.
that's the result when return codes are handled inconsistently ;-)
_________________
http://playstation3-homebrew-multimedia.blogspot.com/
Back to top
View user's profile Send private message
tolysz



Joined: 02 Jan 2009
Posts: 7

PostPosted: Sun Jan 04, 2009 5:14 am    Post subject: Reply with quote

[UPDATE!]

http://www.tolysz.net/dualshock.diff
After looong night it is working :P
as for now over USB and possibly BT [?]

Every thing handled by professional drivers, I just have added a wrapper to them. Hence if you got 2 BT dongles then have a go with 14 DS3 :).

THIS DOES NOT SUPPORT LEDs [yet?]
THIS DOES NOT SUPPORT RUMBLE [yet?]
THIS DOES NOT SUPPORT DYNAMIC RECONFIGURATIONS [yet?]

How to apply this patch
Code:

cd vanila-2.6.28
wget http://www.tolysz.net/dualshock.diff
patch -p1 < dualshock.diff

BTW. 2.6.28 is buggy :), however I do not tested it with previous versions.

and test it with jscalibrator, but after you compile it, and reboot :).

Actually, this was the first patch I ever made, it was so cool to add "less than zero" to Linux kernel :).

However, this just made me started :), I wanted to write an USB driver for DualShock, but I looked at what is already done. and decided not to.

DualShock works fine with Linux as a HID device,
modulo "reporting" [done] not by me :)
[0] modulo "broken report descriptor in DS3" [done] by me :)
+[1] some minor patches to be able to change this descriptor to arbitrary one. [done]
+[2]some minor patches to fix other drivers broken by [1] [done]
+[3]some changes to HID to allow values > 255 as inputs: needed for accelerometers as they have range 0-1024 [done] no change needed :) fixed in [0]
-----------

+[4] to allow reconfiguration on runtime :) [possible] just need someone who knows "firmware" class as I need to be able load files into kernel on runtime.
+[5] a nice tool to be able to modify HID device report description easily [possible] this will allow to tweak all HID devices so it would be extra cool.

USB works just fine :) time to start testing BT I need to recompile my kernel :P

oops: take2 recompile again :) I have missed to patch hidp :P
more issues with BT.

And as I can change this descriptor (and is already made working) my question is how shall I assign buttons and axes and motions for you?


http://ps3.jim.sh/sixaxis/usb/ btw. I axed nothings as it was bogus hid description

to description from:
http://www.usb.org/developers/hidpage/
Some possibilities:
Code:

30 X
31 Y
32 Z
33 Rx
34 Ry
35 Rz
36 Slider
37 Dial
38 Wheel
39 Hat switch
3A Counted Buffer
3B Byte Count
3C Motion Wakeup
3D Start
3E Select

40 Vx
41 Vy
42 Vz
43 Vbrx
44 Vbry
45 Vbrz
46 Vno
90 D-pad Up
91 D-pad Down
92 D-pad Right
93 D-pad Left


And if someone could post report description for SIXAXIS :) That I could check if stock DUALSHOCK got the same?
[UPDATE] I have checked are the same :)

So far:
OK, I made few decisions:
Code:

Button 00 = Cross
Button 01 = Circle
Button 03 = Square
Button 04 = Triangle

Button 04 = R1
Button 05 = L1
Button 06 = R2
Button 07 = L2

Kayboard keys
[a] = Left
[s] = Down
[d] = Right
[w] = Up

Button 08 = R3
Button 09 = L3
Button 10 = Start
Button 11 = Select
Button 12 = Sixaxis


Analog:?
Code:

Analog 00 = Joy Left X
Analog 01 = Joy Left Y

Analog 02 = Joy Right X
Analog 03 = Joy Right Y

Analog 04 = Roll ( -X / +X )
Analog 05 = Pitch ( -Y / +Y )
Analog 06 = Gyro ( -Z / +Z )
Analog 07 = Gyro ?

(+1).reverse:{
Analog 07 = Square
Analog 08 = Cross
Analog 09 = Circle
Analog 10 = Triangle
Analog 11 = R1
Analog 12 = L1
Analog 13 = R2
Analog 14 = L2
Analog 15 = Left
Analog 16 = Down
Analog 17 = Right
Analog 18 = Up
}


Last edited by tolysz on Sun Jan 04, 2009 11:31 pm; edited 6 times in total
Back to top
View user's profile Send private message
Themaister



Joined: 04 Jan 2009
Posts: 2

PostPosted: Sun Jan 04, 2009 11:15 am    Post subject: Reply with quote

Hey! Nice one. Thought my ps3-controller was broke or something.

Although, I couldn't quite follow that patch.

static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id) and no ; after? anyways. I got the ps3-controller to work by simply changing:

if (ret) with if (ret < 0) manually :) and rebuilding the driver. I'm a patching nub, so^^ Used vanilla 2.6.28 sources.
Back to top
View user's profile Send private message
tolysz



Joined: 02 Jan 2009
Posts: 7

PostPosted: Mon Jan 05, 2009 12:10 am    Post subject: Reply with quote

Just to say,

PLEASE TEST!!!!

It works :) I need some regression tests come on people :)

And Please post feedback, as it is really important!

Happy Hacking
Back to top
View user's profile Send private message
ps3fanboy



Joined: 06 Jul 2008
Posts: 66

PostPosted: Wed Jan 14, 2009 8:21 am    Post subject: Reply with quote

haven't had time to test... but hopefully soon... does the controller work with bluetooth yet?
_________________
http://playstation3-homebrew-multimedia.blogspot.com/
Back to top
View user's profile Send private message
Themaister



Joined: 04 Jan 2009
Posts: 2

PostPosted: Wed Jan 21, 2009 8:32 pm    Post subject: Reply with quote

Hi :) Nice patch you have there now, however, is it possible to disable the gyro stuff, it's impossible to configurate games when the game only accepts the changing gyro values all the time? Maybe comment out stuff in the source, etc? Also, for some reason, hal hotplugging wanted the ps3-controller to be a mouse also :S
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 Linux 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