Merge pull request #4735 from cg110/fix_web_server_mem_leak
[vuplus_xbmc] / tools / EventClients / README.txt
1 Event Client Examples and PS3 Sixaxis and Blu-Ray Remote Support
2 ----------------------------------------------------------------
3
4 This directory contains 6 sample programs that demonstrate XBMC's
5 event server (which is still in development). The programs are in
6 Python and C++. XBMC also needs to be running (obviously) so that it
7 can receive the events.
8
9 - example_button1.py       | example_button1.cpp
10 - example_button2.py       | example_button2.cpp
11 - example_notification.py  | example_notification.cpp
12
13 The first 2 show how button / key presses can be sent to XBMC.
14 The third one shows how to display notifications in XBMC.
15
16 - xbmcclient.py
17 - xbmcclient.h
18
19 These are the Python module and C++ header that you can use when
20 writing your own programs. It is not yet complete and likely to change
21 but is still usable.
22
23 Implementation details can be found in the comments in the sample
24 programs.
25
26
27 PS3 Controller and PS3 Blu-Ray Remote Support
28 ---------------------------------------------
29
30 There is also initial support for the PS3 controller (sixaxis) and the
31 PS3 Blu-Ray remote.
32
33 Pairing of the PS3 Blu-Ray Remote
34 ---------------------------------
35
36 The remote needs to be paired initially with the 'ps3_remote.py'
37 program in this directory which you can continue using if you do not
38 want to run 'ps3d.py' as root. The disadvantage of using
39 'ps3_remote.py' is that pairing is required on every run. Once initial
40 pairing is done, 'ps3d.py', when run as root, will automatically
41 detect incoming connections from both the PS3 remote and the Sixaxis
42 controller.
43
44 Pairing of the PS3 Sixaxis Controller (TODO)
45 --------------------------------------------
46
47 The pairing of the PS3 controller is not yet handled automatically. It
48 can however be done using the program "sixaxis.c" available from:
49
50 http://www.pabr.org/sixlinux/sixlinux.en.html
51
52 Once pairing for eiher or both has been done, run the ps3d.py program
53 as root after disabling any existing HID servers that might currently
54 be running. The program requires root prvilieges since it listens on
55 Bluetooth L2CAP PSMs 17 and 19.
56
57 Using the PS3 Sixaxis Controller
58 --------------------------------
59
60 Currently, all that is supported with the Sixaxis controller is to be able
61 emulate the mouse behavior. Hold down the PS button and wave the controller
62 around and watch the mouse in XBMC mouse. Tilt it from left to right (along
63 your Z axis) to control horizontal motion. Tilt it towards and away from you
64 along (along your X axis) to control vertical mouse movement.
65
66 That's all for now.
67
68 WiiRemote Support
69 -----------------
70
71 The executable depends on libcwiid and libbluetooth and is compiled using
72 # g++ WiiRemote.cpp -lcwiid -o WiiRemote
73 The WiiRemote will emulate mouse by default but can be disabled by running with --disable-mouseemulation
74 The sensitivity of the mouseemulation can be set using the --deadzone_x or --deadzone_y where the number is
75 the percentage of the space is considered "dead", higher means more sensative.
76 Other commands can be listed with --help
77
78 The WiiRemote is mappable with keymap.xml where button id's are the following:
79 1 = Up
80 2 = Down
81 3 = Left
82 4 = Right
83 5 = A
84 6 = B
85 7 = Minus
86 8 = Home
87 9 = Plus
88 10 = 1
89 11 = 2
90 The name is by standard WiiRemote but this can be changed with the --joystick-name
91
92 J2ME (Java Phone Application)
93 -----------------------------
94
95 To use the J2ME client only CLDC 1.0 and MIDP 1.0 is needed.
96 The client will also need bluetooth and must be able to initialize the connection.
97 For compilation of the Java Application see Clients/J2ME Client/README but precompiled versions
98 exists in our forum.
99
100 The Client is mappable in the same manner as PS3 in keymap.xml but with the name J2ME (<joystick name="J2ME">).
101 The KeyID's generated in terminal when running j2me_remote.py.