PDA

View Full Version : Wiimote (Nintendo Wii Remote Control) support as joystick/mouse?


bmfrosty
2007-07-28, 11:52
# Xbox 360 controller on Linux - experimental device driver for Xbox360 Wireless/Wired controller on Linux computers.

* Interesting fact is that Linux kernel 2.6.19 supports for the original XBOX DDR pads (not Xbox360) out-of-the-box.

I noticed that you were contemplating support for 360 wireless controllers in the Linux version, and I was wondering if you'd also consider Wiimote support, not just as a pointer, but possibly also as a Joystick interface?

http://www.wiili.org/Wiimote

http://www.wiili.org/index.php/CWiid

SneakerElph
2007-08-02, 11:06
Which brings up an interesting point:

If we ever got Linux running on a Wii, could XBMC be used?

Ah, thought crossed off, the Wii uses ATi for graphics. With PC ATi support for linux being as crappy as it is, the Wii is hopeless.

Nickman
2007-08-02, 13:14
Which brings up an interesting point:

If we ever got Linux running on a Wii, could XBMC be used?

Ah, thought crossed off, the Wii uses ATi for graphics. With PC ATi support for linux being as crappy as it is, the Wii is hopeless.

The biggest no-no would be the underpowerd wii hardware though.
We have the linux port because the xbox hardware is showing its age. The Wii is even less powerful then the xbox so that would be a crazy target.

szsori
2007-08-02, 18:52
The Wii has almost the exact specs the Xbox does:
http://en.wikipedia.org/wiki/Wii
http://en.wikipedia.org/wiki/Xbox#Technical_specifications

Since it has more memory and would be running linux, which means making proper use of the GPU would be easier, it would probably be able to run XBMC as well as the Xbox. However, it still can't do high def video and has a PowerPC processor, so I'm not sure how easy XBMC would transfer over or if it's worth the effort.

The idea of using a Wiimote with XBMC-Linux is pretty cool, though. Would make a decent controller for most emulators as well.

Asteron
2007-08-06, 10:46
I cant think of a way using it comfortably within XBMC-Linux as anything but a very good pointing device.

Is there really anything in xbmc you want to control with the tilt? Gesture support might be good, like a flick to the left/right to scroll through items. I think though there are third party applications which would do this.

szsori
2007-08-06, 22:28
Is there really anything in xbmc you want to control with the tilt?
You could either use it for fast scrolling (page up/down) or you could do simple submenus. Tilt left and it brings up a context menu where you can tilt up/down to select the item you want. Tilt right and it hides the menu.

For video, music, and pictures you could do the same with context menus. Or you could do any number of other things (volume control, fast forward/rewide, zoom in/out, pan left/right, etc).

Alternatively, with certain skins (Xephyr, for example) you could use tilt to move sideways through a navigation and then tip forward to go into that submenu and tip backward to go to the previous submenu. It would be very intuitive if done properly.

Skindred
2007-08-07, 01:53
I think it would be better to asign these 'extra menus' to a keyboard button, and then use some python script if you want the wiimote to do those buttons,
the dev team doesn't have to be wasting their time on this, and certainly not now that we they are still working really hard on it!

Someone else can make that .py script ;)

bmfrosty
2007-08-08, 01:39
A very good pointer was all I was looking for. Enough buttons on there for a pretty good set of controls too. There will have to be some context sensitivity too..

hexydes
2007-08-29, 18:56
Well this is for Linux, right? There's lots of things you could do with the Wii remote.

Assuming Compiz-Fusion is installed, you could use the Wii remote as a quick means of rotating the desktop cube. The handy reason for this would be to quickly switch from full-screen XBMC, to a standard desktop. The function for doing this would be something like hold the remote sideways (like in Excite Truck), pull the trigger underneath, and then tilt the remote. Left rotates the cube left, right rotates right, etc.

If you built some semblance of file-management into XBMC, you could use the Wii remote as a way to select multiple files and move them around.

It was already suggested that tilting would make a good way to scroll up/down the list in menus.

I'm sure some homebrew games would come out that could use it.

You could build something like iTunes' "Cover Flow" function, that lets you choose and album and spin through an album listing, like a jukebox.

Lots of different possibilities. Doesn't the Wii remote already work in Linux (I know I've seen people playing around with Compiz-Fusion with the remote before). Would it really take a lot of effort to just build that functionality into XBMC somehow?

babazoid
2007-08-29, 22:33
Actually using Cwiid or WMD the Wii remote should work in XBMC fine. Since XBMC already has mouse support built in you can just use it like a mouse. I'm pretty sure you can also just map the extra buttons to whatever functions you like in either driver (the button will send a keyboard command).

The only thing that might be tricky is using the Wiimotes accelerometer -- but as the drivers mature I'm sure you'll be able to do things like emulate scroll, etc.

babazoid
2007-08-31, 08:13
I just wanted to confirm that I got CWiid working tonight. It functions as a mouse in X, the wii buttons can be assigned to whatever you like. There are a few bugs, as Cwiid is at v 0.6 right now, but it's promising. IR pointing functions are working...

I am having trouble getting it working on my second display but I think that I just did something stupid. I'm pretty excited to be able to use XBMC from the comfort of my couch without wires... this is getting better every day!

For a brief tutorial on building Cwiid go here:

http://ubuntuforums.org/showthread.php?t=535659

SneakerElph
2007-09-12, 06:20
I've used CWiid as well with no problems. What would be nice is a python script or something that runs on XBMC startup that pairs CWiid with the wiimote, so you don't have to run console commands or anything like that before running XBMC.

Any python developers interested in that? it's probably pretty easy to do, but i'm no coder.

fysa
2007-10-16, 17:25
cwiid's winput now has a daemon mode and script that can automatically search for your Wiimote and connect when it's available. Thanks to XBMC's mouse support, I am able to successfully control the entire interface with the Wiimote.

The next step is to get 'gestures' supported. Twisting the Wiimote will be an easy gesture to support and should translate well to controlling our UI, in combination with button presses.

i.e.:

Hold A button and twist the wiimote like a volume knob to adjust volume.
Hold trigger and twist the wiimote to seek forward/back.

One of the above actions in the menu to scroll quickly -- or use relative height/Y position of the wiimote in space. i.e., hold the wiimote by your head for the top of the list, then move it down toward your waist for the bottom of the list. Anywhere in between would be a % position through a scrolling list.

A quick flick of the wiimote left or right could 'skip' instead of seek. Same with lists. Flick the wiimote up and down to page up/down.

A hundred buttons aren't necessary if gestures are intuitive.

einal
2007-10-26, 12:45
I'm using cwiid as well, but I doubt I'll ever use the motion sensor or IR pointer. I use the wiimote as a regular remote. Like someone said, there are alot of buttons on it and the best thing about it is that it's Bluetooth. No more looking insane while trying to point a crappy Xbox remote at an even crappier IR receiver.

XBMC needs a little reconfiguring in the keymap department though, I personally hate the fact that ESC is to go back to main menu, but X is Stop video. I have the B button (trigger) mapped to ESC and I want to use it to stop the video as well, instead I have to waste another button to map to X.

Hopefully I missed something in the keymap config and there are separate portions for the player, the menu etc. so ESC in dvdplayer can be mapped to one action while ESC in the menu is mapped to another.

topfs2
2007-12-22, 21:05
I don't see the problem with X being stop and esc being back, if you'd have both mapped to the same key you couldn't press back while watching a movie. It might seem a bit unusable because you wouldn't normally flip around the menu's while watching a movie but damn it would be annoying if you needed to go somewere and the video stoped and you would need to find the video and play and seek to were you were just because the 2 actions share the button :)

Well, gesture support shouldn't be all that hard to make as the wiimote has a library and all so it shouldn't be to much programing.

xfaethorx
2007-12-24, 19:09
I've had a bit of success in getting this working however its been a bit of a chour!

I'm running on gutsy gibbon so I didn't need to compile from source and just added what was available in the repository.

However after customizing my profile I lost the right mouse button which is a common fault. Although on some occasions it worked on most it didn't

to get it to work I had to xmodmap the right button to the grave key and then add that to the wminput script that I made.. (called wii)

I created a little script that when the session is started waits 30 seconds and then runs wminput -c wii -w

if it starts straight away it doesn't read the config properly. I don't know if this is an xorg.conf problem or what but its basically lead to me chasing my tail for a bit...

it means the remote doesn't start working straight away but it does eventually work...

I've mapped the follow keys to that on the wii remote.

Wiimote.A = BTN_LEFT
#Wiimote.B = BTN_RIGHT
Wiimote.B = KEY_GRAVE
Wiimote.Up = KEY_KATAKANA
Wiimote.Down = KEY_KPENTER
Wiimote.Left = KEY_HENKAN
Wiimote.Right = KEY_MUHENKAN
Wiimote.Minus = KEY_MINUS
Wiimote.Plus = KEY_EQUAL
Wiimote.Home = KEY_TAB
Wiimote.1 = KEY_SPACE
Wiimote.2 = KEY_X
Plugin.acc.X = REL_X
Plugin.acc.Y = REL_Y

It pretty much covers everything

it looks like xmodmap might take a while to kick in, don't know why but initally it doesn't respond straight away and can take a a while but it will kick in thus giving you access to the right mouse button.

it does work , its not instant but it does work and if you anything like me your media streamer is up for hours anyway so once its past the inital stage all is good.

I mapped -/+ for volume
space to 1 for pause
x to 2 for exit
home to tab so as to get full screen visualzations.
and I mapped up/down/left/right for navigation , fast forward etc.


I did notice one thing running wminput does seem to slow down other input such as normal keypresses , around 500ms but that could be my setup being on the min spec side :).

thought i'd share.

topfs2
2008-01-20, 17:57
I've submitted a patch that would make XBMC natively support the wiiremote



And if it gets accepted I'd love some comments and bug testing :)

topfs2
2008-01-27, 14:14
The patch is commited.
Just configure with
./configure --enable-cwiid
And XBMC will be compiled with Wii Remote support.
You need:
sudo apt-get install libcwiid0-dev libbluetooth1-dev
For it to pass the configure.

When XBMC is compiled you enable the support in Settings -> System -> Wii Remote -> Enable.

Hope to have comments soon with bugs and Feature Suggestions. Thx!

topfs2
2008-01-27, 14:15
Oh! btw, the lib work without bluetooth (Just doesn't enable the support) so tests on this is good as well :)

MPuser
2008-02-12, 01:31
I have compiled xbmc with ./configure --enable-cwiid and i have installed libcwiid0-dev libbluetooth-dev but i have not Settings -> System ->Wii Remote -> Enable. in the settings.

You have a solution?

topfs2
2008-02-12, 08:23
have you done a make clean before compile?
Also what does the ./configure tell you at the bottom? It should say
Wii Remote : Yes
Otherwise there must be missing packages
If it says yes and you have done a make clean please post Log
What O/S ?
And I suspect your on the latest svn?

MPuser
2008-02-12, 13:33
~ Révision 11631 extraite.
~ olivier@olivier-linux:~/xbmc/XBMC$ make clean
~ ------------------------
XBMC Configuration:
------------------------
Debugging: Yes
Profiling: No
OpenGL: Yes
Joystick: Yes
XRandR: Yes
MMS: Yes
Wiimote Yes
GMyth: No

I use ubuntu 7.10 and i have install libcwiid0-dev libbluetooth-dev , no libbluetooth1-dev

:nod:

MPuser
2008-02-12, 14:43
I have recompiled and i have not Wii Remote -> Enable.

topfs2
2008-02-12, 15:05
Can you post your log please?

If you've copied and pasted that from your configure in terminal it looks old? it should say Wii Remote not wiimote but that's may not matter. :)

You need libcwiid0 and libbluetooth2 but both of them should be installed together with the dev but check in any case?

And it should be libbluetooth-dev (I've written wrong)

The only reason I can think of that wouldn't bring up this setting if is you haven't passed the ./configure So i'd say look through it carefully and check if "-DHAS_CWIID" is in the Makefile.include at DEFINES+=. if not you can maybe append it and recompile. But if this isn't done automaticly something must be missing as you don't pass the configure

MPuser
2008-02-12, 16:12
olivier@olivier-linux:~$ /xbmc/XBMC$ make clean
bash: /xbmc/XBMC$: Aucun fichier ou répertoire de ce type
olivier@olivier-linux:~$ svn co https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/linuxport xbmc
U xbmc/XBMC/xbmc/utils/HTTP.cpp
Révision 11632 extraite.
olivier@olivier-linux:~$ cd xbmc/XBMC/
olivier@olivier-linux:~/xbmc/XBMC$ ./configure --enable-cwiid
checking for gawk... gawk
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking for main in -lGL... yes
checking for main in -lGLEW... yes
checking for main in -lGLU... yes
checking for main in -lXinerama... yes
checking for main in -lmad... yes
checking for main in -ltre... yes
checking for main in -lSDL... yes
checking for main in -lSDL_image... yes
checking for main in -lSDL_mixer... yes
checking for main in -lcdio... yes
checking for main in -ldl... yes
checking for main in -lfreetype... yes
checking for main in -lfribidi... yes
checking for main in -llzo2... no
checking for main in -llzo... yes
checking for main in -lsmbclient... yes
checking for main in -lsqlite3... yes
checking for main in -lasound... yes
checking for clock_gettime in -lrt... yes
checking for main in -lXrandr... yes
checking for mms_connect in -lmms... yes
== GMyth support disabled. ==
checking for main in -lcwiid... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for memory.h... (cached) yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/mount.h usability... yes
checking sys/mount.h presence... yes
checking for sys/mount.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking sys/vfs.h usability... yes
checking sys/vfs.h presence... yes
checking for sys/vfs.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking for unistd.h... (cached) yes
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking wctype.h usability... yes
checking wctype.h presence... yes
checking for wctype.h... yes
checking lzo/lzo1.h usability... no
checking lzo/lzo1.h presence... no
checking for lzo/lzo1.h... no
checking whether stat file-mode macros are broken... no
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for an ANSI C-conforming const... yes
checking for uid_t in sys/types.h... yes
checking for inline... inline
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for int8_t... yes
checking for mode_t... yes
checking for off_t... yes
checking for pid_t... yes
checking for C/C++ restrict keyword... __restrict
checking for size_t... yes
checking for ssize_t... yes
checking for struct stat.st_rdev... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uint8_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for unistd.h... (cached) yes
checking for working chown... yes
checking whether closedir returns void... no
checking for error_at_line... yes
checking for _LARGEFILE_SOURCE value needed for large files... no
checking whether gcc needs -traditional... no
checking whether lstat dereferences a symlink specified with a trailing slash... yes
checking whether lstat accepts an empty string... no
checking whether lstat dereferences a symlink specified with a trailing slash... (cached) yes
checking for working memcmp... yes
checking for sys/time.h... (cached) yes
checking for unistd.h... (cached) yes
checking for utime.h... (cached) yes
checking for alarm... yes
checking for working mktime... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for sys/socket.h... (cached) yes
checking types of arguments for select... int,fd_set *,struct timeval *
checking for function prototypes... yes
checking whether setvbuf arguments are reversed... no
checking return type of signal handlers... void
checking whether stat accepts an empty string... no
checking for working strcoll... yes
checking for strftime... yes
checking for working strtod... yes
checking whether utime accepts a null argument... yes
checking for vprintf... yes
checking for _doprnt... no
checking for atexit... yes
checking for dup2... yes
checking for fdatasync... yes
checking for floor... yes
checking for fs_stat_dev... no
checking for ftime... yes
checking for ftruncate... yes
checking for getcwd... yes
checking for gethostbyaddr... yes
checking for gethostbyname... yes
checking for gethostname... yes
checking for getpagesize... (cached) yes
checking for getpass... yes
checking for gettimeofday... yes
checking for inet_ntoa... yes
checking for lchown... yes
checking for localeconv... yes
checking for memchr... yes
checking for memmove... yes
checking for memset... yes
checking for mkdir... yes
checking for modf... yes
checking for munmap... yes
checking for pow... yes
checking for rmdir... yes
checking for select... yes
checking for setenv... yes
checking for setlocale... yes
checking for socket... yes
checking for sqrt... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strcspn... yes
checking for strdup... yes
checking for strerror... yes
checking for strncasecmp... yes
checking for strpbrk... yes
checking for strrchr... yes
checking for strspn... yes
checking for strstr... yes
checking for strtol... yes
checking for strtoul... yes
checking for sysinfo... yes
checking for tzset... yes
checking for utime... yes
checking for /usr/lib/python2.4/config/libpython2.4-pic.a... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating Makefile.include
config.status: creating xbmc/lib/libPython/linux/Makefile
config.status: creating config.h
config.status: config.h is unchanged

------------------------
XBMC Configuration:
------------------------
Debugging: Yes
Profiling: No
OpenGL: Yes
Joystick: Yes
XRandR: Yes
MMS: Yes
GMyth: No
Wii Remote: Yes
------------------------

olivier@olivier-linux:~/xbmc/XBMC$


Thank you for your help Topfs2 :nod:

topfs2
2008-02-12, 17:01
I meant your log as in xbmc.log when you run :D

( After configure you did a make and then a ./build.sh NOUPDATE NOCOMPILE? )

http://xbmc.org/forum/showthread.php?t=30230 You can do this to so there isn't any left

MPuser
2008-02-12, 22:24
I can't find ANY reference to the Wiiremote lib in the log.
It should either say some error OR that it successfully initialized the lib.
Are you perfectly sure you have recompiled and such? I suggest doing a complete refetch of XBMC and try again.
1. Remove the XBMC folder (Everything in it and the folder, don't leave anything behind...)
2. cd
3. svn checkout https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/linuxport/XBMC
4. cd XBMC
5. ./build.sh CONFIGOPT=--enable-cwiid
6. run.

I can't really find ANY possible solution other than it isn't compiled right.

with ./build.sh CONFIGOPT=--enable-cwiid the wiimote work!

Thank you!

but the mouse emulation work?

topfs2
2008-02-12, 22:58
Yep it should, Although you need to have sensorbar or 2 ir sources aprox. 1.5dm spaced apart (2 candles will do if you just want to try it out)

Good luck and have fun ;)

freaksworth
2008-04-12, 17:15
Hi.
Has this changed? I neither got this option in the settings (system->wiimote...) nor I got "Wii remote: yes" from ./configure --enable-cwiid.
I tried this on debian and ubuntu 8.04, compiled it with "./build CONFIGOPT=--enable-cwiid".

Thanks in advance
f

spiff
2008-04-12, 17:18
yes, this has changed.

the wiimote support is now an event client - see tools/EventClients

freaksworth
2008-04-12, 17:30
Thanks! Works! :nod:

althekiller
2008-04-12, 23:44
...2 ir sources aprox. 1.5dm spaced apart...

Lol...99% of Americans aren't going to know what a decimeter is.

topfs2
2008-04-13, 16:35
Lol...99% of Americans aren't going to know what a decimeter is.

hehe, maybe not. It's a SI Unit (http://www.chemie.fu-berlin.de/chemistry/general/si_en.html) but for the weird american way of doing it I'd say about 6 inches or so. It's the same width as the sensorbar :)

miamiwice
2008-04-13, 17:33
here are some useful conversions that may help:

1 trillion microphones = 1 megaphone
2000 mockingbirds = two kilomockingbirds
10 cards = 1 decacards
1 millionth of a fish = 1 microfiche
453.6 graham crackers = 1 pound cake
1 trillion pins = 1 terrapin
10 rations = 1 decoration
100 rations = 1 C-ration
10 millipedes = 1 centipede
3 1/3 tridents = 1 decadent
2 monograms = 1 diagram
8 nickels = 2 paradigms
2 wharves = 1 paradox

sorry to be of topic, just wanted to throw some humor in

LittleBear1981
2008-04-25, 04:16
I have done all of the apt-get as well as

1: svn checkout https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/linuxport/XBMC
2: cd XBMC
3: ./configure --enable-cwiid <-- (did not get Wii Remote: Yes)
4: ./build.sh CONFIGOPT=--enable-cwiid

and yet Wii Remote still does not work with XBMC, Ubuntu 7.10... Works with Wmgui though.

any help?

topfs2
2008-04-25, 06:01
The WiiRemote is moved to a EventClient, check out tools/EventClients/README.txt

The executable depends on libcwiid and libbluetooth and is compiled using
# g++ WiiRemote.cpp -lcwiid -o WiiRemote
The WiiRemote will emulate mouse by default but can be disabled by running with --disable-mouseemulation
The sensitivity of the mouseemulation can be set using the --deadzone_x or --deadzone_y where the number is
the percentage of the space is considered "dead", higher means more sensative.
Other commands can be listed with --help

The WiiRemote is mappable with keymap.xml where button id's are the following:
1 = Up
2 = Down
3 = Left
4 = Right
5 = A
6 = B
7 = Minus
8 = Home
9 = Plus
10 = 1
11 = 2
The name is by standard WiiRemote but this can be changed with the --joystick-name

So basicly what you need to do is (if XBMC is downloaded to your home-folder):
# cd
# cd XBMC/tools/EventClients/Clients/WiiRemote
# g++ WiiRemote.cpp -lcwiid -o WiiRemote
# ./WiiRemote

tip: do ./WiiRemote --help for more advanced commands

Fire69
2008-06-03, 12:39
Been wrestling with this --enable-cwiid for half an hour, untill I decided to read the rest of this thread. :rolleyes:
So I compile WiiRemote, now what. When I ./WiiRemote, it just sits there.
Do I have to start this manually before I run XBMC or can I put it somewhere so XBMC starts it automatically?
Sorry, but it's all not very clear I guess... :sniffle:

spiff
2008-06-03, 12:41
start it. start xbmc. just trying is hard i guess

Fire69
2008-06-03, 13:18
I'm at work, don't really have my Wii remote at my disposal now ;)

Wouldn't it be handy to have a folder where you can put things like this, so XBMC starts them automatically?

spiff
2008-06-03, 13:37
the idea is to run them as services using init scripts. you can already grab the deb package with them which i suspect does this, look around the forums

topfs2
2008-06-03, 15:43
It should just sit there, if it doesnt you have no bluetooth. the event server is not feature complete and it will be able to wake clients when it is. still it will have to be running. some time i guess xbmc will have autostart abilities or atleast tell the clients to do so. anyway the wiki have a page, search for event server. im on my cellphone so i cant link :)
BTW the deb wont run as a service automatic yet, noone have found a good script to put it in i think

Fire69
2008-06-03, 20:28
Ok, I'm at home and it's working. :P
Thanks for the info :)

Fire69
2008-06-04, 23:05
Cheered a little too soon... :/
I used the keymap.xml included with the v1.4 patch by Topfs2, copied it to /usr/share/xbmc/userdata and also to ~/.xbmc/userdata.
The WiiRemote connect just fine, I get the battery-level and all, but none of the buttons seem to work?

Fire69
2008-06-05, 09:19
It's working now, but I used the keymap.xml from Topfs2's post in http://xbmc.org/forum/showthread.php?t=33397

@Topfs2: First of all, thanks :)
Second, I don't quite understand what you mean by "it is like the one before the eventclients".
Can you explain a little?