Wiimote

From ArchWiki
Revision as of 16:30, 11 December 2011 by Strcat (Talk | contribs) (codeline -> ic)

Jump to: navigation, search

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

This article will go through the basic steps required to have a working Wiimote in Linux for general use. It will not go into much detail for some steps as there are many guides already written for some parts already.

Prerequisites

The most important piece required is Bluetooth, this must already be configured and running without the help of this guide. This should be simple enough with any guide found on the internet. The 'cwiid' package is in Community. This package contains all libraries and programs required for basic use of the Wiimote. Lastly you will need a Wiimote, this can include (although are not required) the Nunchuk and Classic Control attachments.

Connect the Wiimote

First you need to make sure to load the uinput module:

$ sudo modprobe uinput

You should have a device in Template:Filename now. For permanent use you can add it to the modules section in your rc.conf.

Thanks to cwiid you can scan for your Wiimote now:

(press the 1 and 2 buttons on your Wiimote)
$ hcitool scan
Scanning ...
       <MAC address>       Nintendo RVL-CNT-01

Once your Wiimote has been detected you can test if it is working by running the command wmgui and testing out various buttons and sensors through that interface.

Input Device

The Wiimote can act as a regular input device like a mouse using wminput. If you have no infrared source simply run:

$ wminput -w

You can control your pointer now by tilting your Wiimote forward, backward or to the sides.

If you have an infrared source run:

$ wminput -c ir_ptr -w

Infrared Sources

Possible infrared sources are

  • Nintendo Wii Sensor Bar
  • Wireless sensor bar - check eBay!
  • Small candles (should have about 30cm distance)
  • Home made sensor bar ([1])

Configuration

The default configuration files are in Template:Filename. They are a good starting point for your customized settings in Template:Filename or Template:Filename. The general syntax is:

Wiimote.Button = KEY_ON_KEYBOARD

All possible values for Wiimote.Buttons can be found here: [2], the possible values for KEY_ON_KEYBOARD in Template:Filename.

Troubleshooting

Unable to open uinput

If wminput gives this error, leaving you unable to use the wiimote, try the following:

1. Create a new file in Template:Filename (It does not matter what the name of the file is, so long as the extension is .rules)

2. Add the following to the file:

KERNEL=="uinput", GROUP="wheel", MODE:="0660"

3. Reboot

This should solve the problem. Solution was found in the forums here.

See also