0

I'm trying to use my Wii Remote (the RVL-CNT-01 model) and Nunchuk as a game controller on Ubuntu 21.10. However, it appears that only the buttons on the Wiimote are recognized out-of-the-box. How would I configure Ubuntu to pick up the Wiimote motion axis and Nunchuk inputs?

Similar topics on Ask Ubuntu advise using jstest to make sure that the controller works properly. When doing so, I get the following message:

Driver version is 2.1.0.
Joystick (Nintendo Wii Remote) has 0 axes ()
and 7 buttons (BtnA, BtnB, BtnMode, (null), (null), Btn1, Btn2).
Testing ... (interrupt to exit)
Buttons:  0:off  1:off  2:off  3:off  4:off  5:off  6:off

All seven buttons listed do work when I test them. Also, it seems like Ubuntu has mapped the D-pad to the arrow keys and blocked off access to them.

xwiishow was able to detect the D-pad and the motion input on the Wii Remote, and it detected the presence of the Nunchuk but didn't show any information about it.

Please let me know if I need to provide any additional information.

Lukas
  • 31

1 Answers1

0

I think your problem is described here:

The input mapping is very weird
The default mapping maps the Wii Remote keys to the the key-constants which resemble the Wii Remote's buttons best. This mapping is quite useless by default. To get better mappings, use the xwiimote userspace tools. Installing xwiimote-git will add an Xorg configuration file that disables the default mapping.

hid-wiimote maps the D-pad to KEY_LEFT, KEY_RIGHT, KEY_UP, KEY_DOWN which is unusual. Most gamepads map the D-pad to ABS_HAT0X, ABS_HAT0Y but it looks like hid-wiimote uses hat switches for IR data. joydev only looks at keys above BTN_MISC when mapping buttons which explains why the D-pad buttons aren't there. I'd guess the other two are KEY_NEXT (minus) and KEY_PREVIOUS (previous). See the full list of input event codes here.

nondebug
  • 368