Definite's Extractor

My findings on Life, Linux, Open Source, and so on.

Monthly Archives: November 2017

Wii Remote for Fedora

I wish to play Ur-Quan Masters(UQM) with my kids in Fedora. The installation of UQM is simple, just dnf -y install uqm.

Then I use following steps to connect Wii to Fedora:

1. Install packages

sudo dnf -y install cwiid cwiid-wminput cwiid-utils wiiuse libwiimote

2. Make udev.d Rule

This step enable non-root user to use Wii remotes.

sudo tee << /dev/null
sudo udevadm control -R

3. (Optional) Test Bluetooth Connection

  1. Run wmgui
  2. Click File and connect, you will receive the prompt that you need to press BOTH 1 and 2 on the Wii remote to activate the Bluetooth discovery mode.

Once succeeded, you can press buttons to see whether they are recognized.

4. Configure and Run wminput

I found that mapping the Wii remote to Key Pad is much more convenient that wminput default, especially for laptop. The reason is obvious: it is less likely to cause key clash.

My config is saved as ~/.cwiid/wminput and looks like:

Wiimote.Up = KEY_KP8
Wiimote.Down = KEY_KP2
Wiimote.Left = KEY_KP4
Wiimote.Right = KEY_KP6
Wiimote.A = KEY_KPENTER
Wiimote.B = KEY_KP0
Wiimote.Minus = KEY_KPMINUS
Wiimote.Plus = KEY_KPPLUS
Wiimote.Home = KEY_KPDOT
Wiimote.1 = KEY_1
Wiimote.2 = KEY_3

Then, I ran:

wminput -w -c ~/.cwiid/wminput

That’s it.

Advertisements