July 10, 2009

Ultimate Linux Remote Control (Wiimote on Fedora)

Ultimate Linux Remote Control
I have been building Linux media center and one thing that was missing was a great remote control. I was impressed with Fiire Chief remote, but it is too expensive and the Fiire company stopped making it ;(
Then I found out that you can use Wiimote on Linux and that it costs 40$ on Ebay.
This guide isn't intended only for those with Media Centers, because you can use Wiimote as a remote for any desktop application, presentations or even games.
There are some basic hardware requirement likes usb bluetooth dongle or bluetooth already built in your laptop and Nintendo Wiimote.
This guide is more focused on Fedora but you can use it with OpenSuse, Arch and Ubuntu. The main difference is how to install tools, other things should be same. There is also an Ubuntu guide that you can use as parallel with this guide.

wiimote   Then you need to install tools and aplications that give you wiimote support:   yum install cwiid cwiid-wminput cwiid-utils   Now start wmgui application and from file menu choose connect, after that press buttons 1+2 on wiimote to put it in discovery mode so that wmgui can connect to it.   wmgui   After Wiimote is connected try pressing buttons, if you see buttons work in wmgui app then everything is working ok.   Main utility that we will be using is wminput and it needs access to /dev/input/uinput interface so let's give it ;)   su - chmod 666 /dev/input/uinput   Now you as regular user can start wminput and use Wiimote as mouse pointer and also as customize it's buttons.   wminput   If you see this, then you haven't succeeded to connect Wiimote to your Linux machine: Put Wiimote in discoverable mode now (press 1+2)... No wiimotes found unable to connect   But if you see this, then everything is working ok: Put Wiimote in discoverable mode now (press 1+2)... Ready.   By default you have Wiimote working as a mouse with buttons A and B mapped as mouse left/right buttons.   Next step is to customize Wiimote buttons for specific application that you intend to use. You can use Wiimote in any application you wish but I see it as multimedia remote so I'll show examples how to use Wiimote with Elisa Media Center (renamed to Moovida) and MythTV.   For MythTV I map button A to Enter key, button B to Escape key, Wiimote + and - keys to F10 and F11 for volume control, button 1 to P key for Pause/Play, and so on.   Here is how MythTV config file looks like: # This is the wminput-mythtv file Wiimote.A = KEY_ENTER Wiimote.B = KEY_ESC Wiimote.Up = KEY_UP Wiimote.Down = KEY_DOWN Wiimote.Left = KEY_LEFT Wiimote.Right = KEY_RIGHT Wiimote.Minus = KEY_FN_F10 Wiimote.Plus = KEY_FN_F11 Wiimote.Home = KEY_M Wiimote.1 = KEY_P Wiimote.2 = KEY_ESC   With this custom config file Wiimote will work optimally with MythTV: wminput -d -w -c wminput-mythtv   There is still room for improvement in this config file. For example you can use Wiimote accelerometers and tilt Wiimote for fast forwards and rewinds functions. If you do that, or anything else, please provide your config file in the comments of this blog.   You can check out full Wiimote range of keys, and also check out MythTV shortcut keys so you can connect right keys together.   For Elisa/Moovida Media Center I use this config file: # This is the wminput-elisa file Wiimote.A = KEY_ENTER Wiimote.B = KEY_SPACE Wiimote.Up = KEY_UP Wiimote.Down = KEY_DOWN Wiimote.Left = KEY_LEFT Wiimote.Right = KEY_RIGHT Wiimote.Minus = KEY_DOWN Wiimote.Plus = KEY_UP Wiimote.Home = KEY_F23 Wiimote.1 = KEY_BACKSPACE Wiimote.2 = KEY_ESC   Also if you create config files for XBMC or Boxee please share them. If you have any additional questions feel free to ask me.  


  • Fiire Chief remote

  • Wiimote on Linux project

  • Wiimote on Ubuntu Howto

  • Wiimote keys

  • MythTV shortcuts

  • Moovida Media Center

  • MythTV, Open Source DVR

  • XBMC Media Center

  • Boxee Media Center