Login

Source: 

This article is about connecting your Wii Remote to a PC. It describes various tools and programs to get you started. Once connected you can use it for various purposes like gaming, controlling slide in a presentation or just zapping through your audio/video playlist.

 

 

 

You will need:

  • A Wii remote
  • a Wii compatible bluetooth device
  • some software
  • and optionally a Nunchuck

First check if your bluetooth device is compatible with the Wii Remote or buy one that is. You can find a list at WiiLi.org. I used a Sitecom Bluetooth adapter which came with the TOSHIBA bluetooth stack on CD. The Microsoft Bluetooth Stack will not work, so you have to installl another one. I was lucky, I could use the CD that came with the Bluetooth adapter. If yours does not come with a usable stack try another BT stack.

I tried to connect my Wii Remote to a HP nc8000 laptop without success. I was using the standard drivers from HP. Unfortunatly I do not own the laptop, so I could not try different drivers.
If you are using windows go to the next chapter. Linux users can go to chapter 3.

Windows

To connect the Wii-Remote press button 1 and 2 simultaneously or use the red sync button. This will make finable by any other Bluetooth device. Let your PC search for devices and select “Nintendo RVL-CNT-01” from the list of found devices. Connect it without using a pin code.

WiinRemote

WiiRemote is an easy to use application that will allow you use your Wii Remote in windows. It provides mouse emulation and allows you to map some buttons to key presses. Unfortunately Nunchuck support is not really stable yet and the accelerometers in it are not used.
I used it for testing, just download it from http://onakasuita.org/wii/index-e.html.

Here is a screenshot of WiinRemote:

There, it is done! The Wii Remote is now connected to a windows PC.

GlovePIE

GlovePIE is a more complicated program whihc uses a scripting language to do it’s work.
From http://carl.kenner.googlepages.com/glovepie:

Quote:
With GlovePIE you can now play any game, or control any software or MIDI devices, using whatever controls you want. This includes joysticks, gamepads, mice, keyboards, MIDI input devices, HMDs, Wiimotes, trackers, and of course, Virtual Reality gloves!

After downloading GloPIE from http://carl.kenner.googlepages.com/glovepie_download, just unpack it to a directory and start it (no install required).
Here are some scripts for the Wii Remote. Needless to say that GlovePIE possibilities are endless and that this allows you to use the Wii Remote the way you like it!

BlueTunes

At http://home.comcast.net/~bluetunes/ you can download a little application,called BluesTunes. It is able to control the following players: iTunes, Winamp, Napster, Windows Media Player, VLC, Quintessential Player, Media Player Classic, Foobar2000, Zune.

I tested it with Winamp and seems to work quite well. It uses the Managed Library for Nintendo’s Wiimote by Brian Peek

Others

Tha above three programs allow are the best Wii Remote applications for Windows. Of course the are a lot more, here are some:

Linux

Although linux is getting more and more user-friendly al lot of things cost most time and effort than you are used from Windows. But in return you will be able you modify all code and thus your Wii Remote behavior. So don’t be scared, just follow the instructions and you will soon be making weird gestures in front of your linux pc.

Be sure to have BlueZ installed, this is the official linux bluetooth-stack. It’s in installed by default on Ubuntu 7.0.4.

You can use the hcitool to scan for bluetooth devices in range and get their bluetooth address. Press button 1 and 2 on the Wii Remote simultaneously and type “hcitool scan”. This will give you something like:

jos@ubuntu:~$ sudo hcitool scan
Password:
Scanning …
00:19:FD:C3:28:80       Nintendo RVL-CNT-01
jos@ubuntu:~$

To connect to your Wii Remote just type:

jos@ubuntu:~$ sudo hidd –search
Searching …
Connecting to device 00:07:61:64:A2:98

Or use the bluetooth address you have obtained with hcitool:

sudo hidd –-connect 00:19:FD:C3:28:80

After being connected to the PC the Wii Remote LEDs will continuously flash.

Disconnect with:

sudo hidd –unplug 00:19:FD:C3:28:80

WMD

WMD stands for ‘Wanna Mote Dammit’ and provides functionality to use your Wii Remote as a mouse and generates keyboard events for buttons. WMD is written in python which is very easy to modify. You can get it at http://ForTheWiiN.org. ForTheWiiN.org seems to be down, you can download wmd-0.1.2.tar.gz here.

Assuming python is installed on your sytem you will need the python-bluez, python-xlib and python-pygame packages installed.

In Ubuntu you can simply install these using:

sudo apt-get install python-bluez python-xlib python-pygame

WiiLi states that pyOSD, OSD, py-numpy, py-numpy-ext and python-matplotlib are also required. But in the current version (0.1.2) of WMD the use is disabled or obsolete, see WMD_DESIGN.txt in wmd-0.1.2.tar.gz.

Then check if the uinpit kernel module is loaded. Just use lsmod to check wich modules are loaded. Ubuntu needed the module to be loaded manually, this done with the modprobe command. Here is how to check if the module is loaded, then load the modules and check again:

jos@jos-ubuntu:~$ lsmod | grep input
jos@jos-ubuntu:~$ sudo modprobe uinput
jos@jos-ubuntu:~$ lsmod | grep input
uinput                 10240  0
jos@jos-ubuntu:~$

In Config.py edit the parameters UINPUT_DEV and MY_WIIMOTE_ADDR so that they match your system.
Now we are ready to run WMD:

sudo python WMD.py

When all is right you will be shown graph:

The console windows will show some logging and if the Wii Remote has the sensor bar (or any other infrared light source) in sight the mousepointer will be taken over.
The design of WMD is pretty clear and allow you to add your own module with some knowledge of Python.

CWiid

CWiid is a collection of Linux tools written in C for interfacing to the Nintendo Wiimote. CWiid consists of three components:

    1. libcwiid – API to integrate the Wii Remote into your application
    2. wmgui – a graphical representation of all the a data gathered by the Wii Remote
    3. wminput – event/mouse/joystick driver that allows you to emulate mouse joystick and keyboard events

First get the packages required for CWiid:

sudo apt-get install libbluetooth2 bluez-utils original-awk bison flex libbluetooth2-dev autoconf mouseemu  libgtk2.0-dev python2.5-dev

Having done that it is time to donwload, compile and install CWiid:

wget http://abstrakraft.org/cwiid/downloads/cwiid-0.6.00.tgz
tar -zxvf cwiid-0.6.00.tgz
cd cwiid-0.6.00/
./configure
make
sudo make install
sudo ldconfig /usr/local/lib/

Start wmgui by typing ‘wmgui’. Connect the Wii Remote via ‘File’ -> ‘Connect’, then set all mark under the ‘Settings’ menu.
.

To control the mouse close wmgui and start wminput. To do this you need root rights or allow acces to /dev/input/uinput:

jos@ubuntu:~$ sudo sh -c ‘echo “KERNEL==\”uinput\”, GROUP=\”admin\”" > /etc/udev/rules.d/50-cwiid-input.rules’
jos@ubuntu:~$ sudo /etc/init.d/udev restart

wminput takes control over the mouse and uses the tilting sensors in the Wii Remote to emulate the mouse which is not really comfortable.

To use the sensorbar (or any other infrared source) add somelines to xorg.conf. Somewhere near the other InputDevice sections add:

Section “InputDevice”
Identifier      “Wiimote”
Driver          “evdev”
Option          “Name”          “Nintendo Wiimote”
EndSection

In the ServerLayout section add:

InputDevice     ”Wiimote” “AlwaysCore”

Restart X (safest way is to reboot your system), log back in and type:

wminput -c ir_ptr

Now can use the use the Wii Remote the way you are used in the Wii menus!

Conclusion

There are several programs that give you the possibility to use a Wii Remote on a Windows or Linux PC. Each program has is pros and cons. Some are highly flexible and others are really easy to use. My personal favorite is CWiid because it seems to be really stable, fully supports the Nunchuck and is running on Linux Smile. For the Windows users I can recomend GlovePIE and if you are more in to programming dive into the Managed Library for Nintendo’s Wiimote.

Links and references

Windows:

Linux:

Go to top