You are on page 1of 9

QtSixA/sixad Manual

Contents Intro The Sixaxis in Linux The sixad driver Usage Configure sixad The sixad configuration file specification QtSixA The interface The sixad utilities hidraw-dump sixpair -!"d# sixad-$ac! sixad-raw Connecting and disconnecting devices Sixaxis&'ualShoc!3 (e)pad *emote page 2 page 2 page 3 page 3 page 4 page 4 page 7 page 8 page 8 page 8 page 8 page % page % page % page %

+tSix,&sixad -anual

.&%

Intro
+tSix, is an interface to /sixad/0 an application that can connect 1S3 hardware 2Sixaxis&'ualShoc!30 (e)pads and *emotes3 to a Linux-compati"le machine4 5+tSix,5 is the 6U7 2interface30 while 5sixad5 is the "ac!end C88 code4 Currentl) sixad supports9 - Sixaxis&'ualShoc!3 2"uttons0 axis0 accelerometers0 leds and rum"le3 - 1S3 (e)pads - 1S3 :' *emotes - 1S3 3in. (e)-ote 2$o)stic! to mouse&!e)"oard dri;er3 There/s also other small utilities that can "e helpful for users9 - hidraw-dump 'umps e;ent information from hidraw de;ices0 $ust li!e hcidump does for "luetooth - sixpair&sixpair-!"d 1airs the sixaxis 2or <-!"d for !e)pads3 to the current machine/s "luetooth adapter0 or the .st command-line argument4 =ote that :' *emotes don/t need pairing with sixad4 - sixad-$ac! -a!es a sixaxis a;aila"le as a -7'7 !e)"oard4 - sixad-raw *egisters a new $o)stic! using a sixaxis hidraw interface0 useful to get accelerometers wor!ing on US: mode4 - sixad-3in. ,llows to use 3in. (e)-ote $o)stic! "uttons as mouse&!e)"oard0 li!e sixad originall) does4 These tools are more deepl) explained later in this file4 The Sixaxis in Linux The sixaxis wor!s out-of-the "ox in Linux> $ust get )ourself an US: ca"le0 connect the sixaxis to the computer0 and press the /1S/ "utton on the sixaxis to acti;ate it4 ?ou won/t get all sixaxis features this wa) though @ leds will !eep "lin!ing0 accelerometers and rum"le won/t wor!4 =ote9 when connected o;er US: the sixaxis leds will stop "lin!ing when the internal "atter) is full) charged4 The 3in. (e)-ote also wor!s ") default4 Aust connect the doc! o;er us"0 hold the 1S "utton on the !e)mote4 ?ou can use /sixad-3in./ to get extra functionalit)4 There is alread) wor! in progress to ma!e the leds and rum"le wor! ") default in Linux0 it/s $ust a matter of time now4 Same thing applies to "luetooth too 2through :lueB34 +tSix, sol;es this ") implementing a custom dri;er 2"ased on linux uinput3 that supports leds0 accelerometers and rum"le4 The default wa) to handle sixaxis in +tSix, is "luetooth0 "ut it can "e used for US:as well 2no leds or rum"le support though34

+tSix,&sixad -anual

2&%

The sixad driver


5sixad5 is a small dri;er "ased on good old /hidd/ 2"ac! on the "lueC 34xx da)s44434 7t currentl) supports sixaxis0 !e)pads and remotes4 The !e)pad support will actuall) load the s)stem default dri;er0 so where;er it will wor! or not depends on each s)stem4 1lease note that sixad is a "luetooth application0 not meant for US:4 Dor US: related tas!s0 chec! the /sixad-raw/ utilit)4 ,nother thing worth !nowing is that sixad uses a different "luetooth method than the new :lueB 44xx stac! 2present on man) recent distros30 so the) will pro"a"l) conflict each other4 sixad tries to wor! around this0 "ut it/s not alwa)s possi"le4 Chec! the /(nown issues/ section if )ou find an) pro"lems4 Usage Ehen ran with no command-line arguments0 sixad will print this9
usage: sixad <command> command can be: -h, --help -v, --version -s, --start --stop --remote -r, --restore --boot-!es --boot-no Show help (this message) Show sixad version Start sixad Stop sixad BD emote mode estore regular bluetooth "uto-starts sixad at boot time Does not auto-start sixad at boot time

#ou can also chec$: sixad-raw, sixad-noti%!

The /help/ command will simpl) displa) this message0 while /;ersion/ will displa) the current sixad ;ersion4 ,ll other commands will reFuire root access4 The /start/ command will start sixad 2and stop regular "luetooth if needed34 /hcid/ will "e used here to !eep the regular "luetooth from pic!ing up "luetooth pac!ets0 which are needed for sixad4 Gnce )ou/;e connected all )our sixaxis and !e)pads0 )ou can use the /restore/ command to restore the regular "luetooth if needed4 The /stop/ command will stop sixad and all ser;ices 2sixad-remote and sixad-sixaxis30 disconnecting all sixad-related de;ices in the process4 ,fter stopping sixad0 regular "luetooth is restored4 The /remote/ command is used to connect 1S3 :' *emotes to the computer 2note that pairing is not needed here34 ,fter running this command0 hold Hnter8Start "uttons on the remote to connect4 Gnl) . remote can "e connected at a time4 1lease note that0 when searching for remotes0 the "luetooth de;ice will "e ;er) "us)> if )ou ha;e other "luetooth de;ices currentl) connected0 the) will seem slower during this time4 Ehen sixad finds a remote0 it will stop searching 2remem"er @ onl) . remote at a time30 so )ou/re good again after that4 :ut0 if sixad finds a remote and it somehow disconnects0 it will start the search again4 =ote9 ?ou should pro"a"l) connect the remotes first0 then the sixaxis and !e)pads4 -uch easier this wa)444 The /restore/ command will restore the regular "luetooth4 7t/s the same as in /stop/0 "ut sixad and connected de;ices won/t "e affected4 The /"oot-)es/ and /"oot-no/ will ena"le sixad to start 2or not3 during "oot4 Ehen this method is acti;ated0 pressing the 1S "utton will connect an) sixaxis or !e)pad right awa)0 "ut regular "luetooth won/t wor!4 =ote9 "efore )ou can connect o;er "luetooth0 )ou need to pair )our sixaxis or !e)pad to the current computer4 Chec! the sixad utilities section0 sixpair0 for that4

+tSix,&sixad -anual

3&%

Configure sixad The sixad glo"al configuration is stored in /&etc&default&sixad/4 7t currentl) has two options @ 'H:U6 and LH6,C?4 To change them0 use something li!e /'H:U6I./0 where the ;alue can "e J or . 2off or on0 respecti;el)34 Ehen 'H:U6 is on0 sixad will print additional messages when ran4 Ehen LH6,C? is on0 sixad will on longer manage the sixaxis4 7nstead the default $o)stic! dri;er will "e used 2ie0 no leds0 accelerometers or rum"le34 S)stem configuration is stored in /&;ar&li"&sixad&/0 as follows9 &var&lib&sixad& - -ain sixad folder &var&lib&sixad&'':((:'':((:'':((& - Specific "luetooth adapter settings folder0 ignore
&var&lib&sixad&pro%iles& - 'e;ice profiles folder &var&lib&sixad&pro%iles&de%ault - 'efault sixad configuration file &var&lib&sixad&pro%iles&hidraw - 'efault sixad configuration file for hidraw &var&lib&sixad&pro%iles&'':((:'':((:'':(( - Specific de;ice configuration file

de;ices

7f some of these files don/t exist )et0 sixad will use internal defaults4 ,ll the users in the group /sixad/ will ha;e read8write permissions o;er those files4 sixad will tr) to load the specifc de;ice configuration first4 7f not found it tries to load the /default/ one4 7f that is not found either0 it will use the internal default configuration4 sixad-raw will first tr) to load the /hidraw/ file0 then /default/4 The sixad configuration file specification The files inside /&var&lib&sixad&/ folow these rules9 - Lines started with K are ignored - Hmpt) lines are ignored - Lines with data must "e 5string)o%)con%ig<space>value50 li!e this9 5enable)leds *5 - /stringLofLconfig/ must onl) contain ,SC77 characters 2ie0 no /M/ or /N/3 - /;alue/ must alwa)s "e a num"er 2J&. is used for off&on3 - onl) . data per line sixad will handle missing data0 "ut resol;e to internal defaults4 7f a specific de;ice configuration doesn/t ha;e 5enable)leds50 sixad will load the internal default ;alue for that0 e;en if the /default/ file still has it4 Hxample9 Dile /&var&lib&sixad&pro%iles&'':((:'':((:'':((+ is missing some configuration0 "ut the file /&var&lib&sixad&pro%iles&de%ault/ has it4 Still0 in this case0 the missing configuration in the .st file will not "e loaded from the 2nd one0 "ut from internal defaults4 The internal defaults are9 - Hna"le leds0 auto-set ") $o)stic! num"er - Hna"le $o)stic! 2"uttons0 axis0 sensi"le "uttons and accelerometers3 - Hna"le rum"le0 new mode - Hna"le connection animation 2led8rum"le3 - Hna"le all remote features 2numeric0 d;d0 direcctional and multimedia3 - Hna"le auto-disconnect if no action after 3J minutes - 'isa"le input 2mouse and !e)"oard3 , complete file 2with all currentl) a;aila"le settings3 is shown in the next page4

+tSix,&sixad -anual

4&%

, ,,,,,,,,,,,,,,,,,,,,,,,,,, , sixad con%iguration %ile , ,,,,,,,,,,,,,,,,,,,,,,,,,, , , -eatures enable)leds * enable).o!stic$ ' enable)input * enable)remote ' enable)rumble ' enable)timeout ' , /0D led)n)auto * led)n)number * led)anim ' , 1o!stic$ enable)buttons * enable)sbuttons * enable)axis * enable)accel * enable)accon ' enable)speed ' enable)pos ' , 2nput - 3one $e!)select ' $e!)l4 ' $e!)r4 ' $e!)start ' $e!)up ' $e!)right ' $e!)down ' $e!)le%t ' $e!)l5 ' $e!)r5 ' $e!)l* ' $e!)r* ' $e!)tri ' $e!)cir ' $e!)s6u ' $e!)cro ' $e!)ps ' axis)le%t)t!pe ' axis)le%t)up ' axis)le%t)right ' axis)le%t)down ' axis)le%t)le%t ' axis)right)t!pe ' axis)right)up ' axis)right)right ' axis)right)down ' axis)right)le%t ' axis)speed 7 use)lr4 ' , emote remote)numberic * remote)dvd * remote)directional * remote)multimedia * , umble old)rumble)mode ' , 8imeout timeout)mins 4' , 9isc out)o%)reach)disconnects '

+tSix,&sixad -anual

O&%

Pere/s a description of the ;alues9


String Features ena"leLleds ena"leL$o)stic! ena"leLinput ena"leLremote ena"leLrum"le ena"leLtimeout L ! ledLnLauto ledLnLnum"er ledLanim "o#stic$ ena"leL"uttons ena"leLs"uttons ena"leLaxis ena"leLaccel ena"leLaccon ena"leLspeed ena"leLpos Input !e)L< axisLleftLt)pe axisLleftLup axisLleftLright axisLleftLdown axisLleftLleft axisLrightL< axisLspeed useLlr3 %e&ote remoteLnumeric remoteLd;d remoteLdirectional remoteLmultimedia %u&'le oldLrum"leLmode Ti&eout timeoutLmins Misc outLofLreachLdisconnects 1ossi"le ;alues J or . J or . J or . J or . J or . J or . J or . .Q-R.J J or . J or . J or . J or . J or . J or . J or . J or . JQ-R-,S J0 2 or 3 JQ-R-,S JQ-R-,S JQ-R-,S JQ-R-,S 2same3 .Q-R% J or . J or . J or . J or . J or . J or . .Q-R8inf J or . 7nformation Ehere;er to use leds4 7f not0 all leds will "e off Ehere;er to register a $o)stic! for this de;ice Ehere;er to register a mouse8!e)"oard for this de;ice Ehere;er to use specific remote features 2remote onl)3 Ehere;er to use rum"le Ehere;er to auto-disconnect after unused for some time Ehere;er to use led according to $o)stic! num"er Specific led num"er 2if ledLnLauto is off3 Ehere;er to animate new connections 2will also rum"le0 if acti;e3 Ehere;er to handle "utton e;ents Ehere;er to handle sensi"le "utton e;ents Ehere;er to handle axis e;ents Ehere;er to handle accelerometer e;ents Ehere;er to handle 5acceleration5 e;ents 2calculated with accelerometers3 Ehere;er to handle 5speed5 e;ents 2calculated with accelerometers3 Ehere;er to handle 5position5 e;ents 2calculated with accelerometers3 Ehat !e) this "utton will pro;ide 2see )our !ernel/s input4h for a list3 J - don/t use axis> 2 - use for !e)s> 3 - use for mouse 7n !e)s mode0 used as !e)L<9 in mouse mode0 see "elow 2.3 7n !e)s mode0 used as !e)L<9 in mouse mode0 see "elow 2.3 7n !e)s mode0 used as !e)L<9 in mouse mode does nothing 7n !e)s mode0 used as !e)L<9 in mouse mode does nothing 2same thing as with axisLleftL<3 ,xis speed multiplicator> default ;alue is T 2higher ;alue means slower mouse3 Ehen on0 L3 will ena"le&disa"le !e)s while *3 does it for mouse Ehere;er to use the num"eric !e)s on the remote Ehere;er to use the 'U' !e)s on the remote Ehere;er to use the directional !e)s on the remote Ehere;er to use the multimedia !e)s on the remote0 see "elow 223 Ehere;er to use the old linux rum"le mode or not> usuall) off Timeout in minutes used to disconnect when no unused Ehere;er to auto-disconnect when de;ice goes too far 2sixaxis onl)0 experimental3

=otes from the ta"le9 . @ Ehen axisLleftLup&right are set to mouse mode0 ;alue can "e *HLLS0 *HLL?0 *HLLEPHHL or *HLLPEPHHL4 See )our !ernel/s input4h file to !now the real ;alues4 2 @ These are !e)s defined on the !ernel0 not the SD8T ones 2the real multimedia !e)s34 -ost applications won/t handle these properl)4

+tSix,&sixad -anual

T&%

QtSixA The interface


7mportant note9 ,lthough the interface is ;er) useful for setting up things li!e profiles0 it/s "eing targetted for complete rewrite soon4 Dor this reason it will not "e explained in this manual4 Gnce read)0 the manual will "e updated0 and a proper +tSix, section will "e written4 1lease continue to the next page4

+tSix,&sixad -anual

7&%

The sixad utilities


Pere is a detailed explanation of each utilit) that comes with sixad4 hidra()du&p This utilit) will dump e;ent information from hidraw de;ices0 $ust li!e hcidump does for "luetooth4 Simpl) run9
: ;sudo< hidraw-dump &dev&hidraw(

Ehere /S/ is the hidraw interface num"er4 sixpair*)$'d+ This utilit) pair )ou sixaxis to the computer 2<-!"d for !e)pad30 reFuired to connect o;er "luetooth4 7t accepts one command-line argument0 which is the -,C to pair with 2if no arguments0 it will tr) to get the default -,C from )our default "luetooth adapter34 ?ou need to connect )our "luetooth adapter 2and turn it on0 if such switch exists30 and )our sixaxis or !e)pad ;ia US:4 Gnce read)0 run9
: ;sudo< sixpair;-$bd< ;'':((:'':((:'':((<

Use <-!"d for !e)pads4 The .st argument 2JJ9SS4443 is optional4 1S3 :' *emote don/t need this4 sixad),ac$ This utilit) will turn a sixaxis into a -7'7 !e)"oard4 This is made through A,C(0 so ma!e sure A,C( is running first4 7t has one command-line option /-"/4 Ehen used0 "lac! !e)s will "e handled 2default is to use white !e)s onl)34 The !e) mapping is as follows9 Select - Change current octa;e 2from 3 to T3 Start - Start&Stop A,C( transport L3 - Transport "ac!wards *3 - Transport forwards 1S - 1anic "utton 2other !e)s will pla) notes0 using sensi"le "uttons3 Left ,xis ;ertical *ight ,xis horiContal ,ccelerometer S ,ccelerometer ? ,ccelerometer B - CC -odulation - CC 1an - CC -isc . 2Jx.J3 - CC -isc 2 2Jx..3 - CC -isc 3 2Jx.23

-a!e sure )ou ena"led sensi"le "uttons for this sixaxis0 since that is used for the !e) presses 2sensiti;eV3 ?ou can ena"le&disa"le features in sixad 2ie0 disa"le accelerometers to disa"le CC -isc e;ents3 *un it li!e this9
: sixad-.ac$ ;-b< &dev&input&.s(

Ehere /S/ is the sixaxis $o)stic! num"er4 The /-"/ argument is optional4 =ote9 ?ou should use this utilit) together with sixad4 Using this on regular sixaxis 2US:3 will not wor! properl)4 sixad)ra( This utilit) will ma!e a hidraw de;ice of a sixaxis wor! with the sixad dri;er4 7t/s useful for accelerometers and input 2ie0 mouse8!e)"oard34 7t will not handle leds and rum"le though4 Simpl) run9
: ;sudo< sixad-raw &dev&hidraw(

Ehere /S/ is the hidraw interface num"er4 sixad)-in. This utilit) will ma!e the 3in. (e)-ote use $o)stic! axis&"uttons as mouse&!e)"oard4 The input profile is hardcoded 2same as /('H/ in +tSix,30 and the useLlr3 option is alwa)s acti;e4 Simpl) run9
: ;sudo< sixad-4in* &dev&hidraw(

Ehere /S/ is the hidraw interface num"er 2the !e)mote registers 2 hidraw interfaces0 use the last one34

+tSix,&sixad -anual

8&%

Connecting and disconnecting devices


Sixaxis/!ualShoc$7f )ou want to connect and wor! ;ia US:0 )ou/re in the wrong place4 Sixaxis wor! in Linux out-of-the-"ox0 please read the intro4 7f )ou want to access the accelerometers ;ia US:0 then it/s a different stor)4 7n this case0 configure sixad for /hidraw/ and use the sixad-raw utilit) 2this information was explained "efore in this document34 To connect o;er "luetooth0 if )ou first need to pair )our sixaxis4 Dor that0 see the sixad utilities0 sixpair section4 Gnce done0 start sixad with /sixad -s/ and press the 1S "utton4 Gn some distri"utions0 "luetooth is not automaticall) acti;ated4 ?ou can tr) /sixad --stop> sixad -s/ in this case4 To disconnect0 press and hold the 1S "utton for .2 seconds4 /e#pad (e)pads are not currentl) wor!ing ;ia US: on Linux4 7f )ou got it wor!ing ;ia US:0 let me !nowV To connect o;er "luetooth0 do the same thing as for the sixaxis0 as explained a"o;e4 =ote that sixad will use the s)stem dri;er for the !e)pad0 so where;er it will wor! fine or not depends on )our current distri"ution4 To disconnect0 $ust push the switch for it4 The !e)pad will auto-disconnect itself after "eing unused for O minutes though4 %e&ote *emotes cannot "e used on US:4 Dor "luetooth0 follow the explanation in the main sixad section0 /remote/ argument option4 There/s no wa) to disconnect a remote ;ia hardware4 ?ou/ll ha;e to use +tSix, or !ill sixad to force it to disconnect4 Still0 note that sixad will auto-disconnect an) de;ice after "eing unused for 3J minutes4 -in. /e#Mote Aust connect the doc! ;ia US:0 and hold the 1S "utton4 The red light will flash Fuic!l) when connected4 See the sixad utilities section for tips on how to ma!e it/s $o)stic! axis and "uttons wor! as mouse&!e)"oard4

+tSix,&sixad -anual

%&%

You might also like