Forum
Control XBMC with a wiimote - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Testing & Experimental (/forum-21.html)
+--- Thread: Control XBMC with a wiimote (/thread-643.html)

Pages: 1 2


Control XBMC with a wiimote - Koenkk - 20th Mar, 2013 01:29 AM

Note: this is a testing release of a XBian package

As requested by some, the XBian wiimote package. This allows you to control XBMC with your wiimote.

Requirements
  • Wiimote
  • XBian 1.0 Alpha 5 (with XBMC Frodo 12.1)
  • Bluetooth Dongle

How to install
SSH into your raspberry pi and execute
Code:
cd /home/xbian
wget http://dikonist.asuscomm.com:82/XBian/xbian-package-wiiremote0.9.deb
sudo apt-get install xbmc-eventclients-common python-support
sudo dpkg -i xbian-package-wiiremote0.9.deb
rm xbian-package-wiiremote0.9.deb

How to use
  • Connect to XBMC by pressing the 1 & 2 buttons on the pi (so the blue LEDs on the wiimote start flashing)
  • Disconnect by holding the power button on the wiimote

How to remove
SSH in and execute
Code:
sudo dpkg -r xbian-package-wiiremote

Known issues
  • Wiimote not connecting; try replugging the bluetooth dongle
  • Slows down XBMC; no workaround is available for this atm



RE: Control XBMC with a wiimote - manuka - 15th Apr, 2013 02:32 PM

Hi I tried your tutorial from a vanilla XBian install using the windows installer, first off I got this error after trying to run the line rm xbian-package-wiiremote0.9.deb

dpkg: dependency problems prevent configuration of xbian-package-wiiremote:
xbian-package-wiiremote depends on libbluetooth3; however:
Package libbluetooth3 is not installed.
xbian-package-wiiremote depends on xbian-package-xbmc (>= 2.1); however:
Version of xbian-package-xbmc on system is 2.0.

dpkg: error processing xbian-package-wiiremote (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
xbian-package-wiiremote

So I ran sudo apt-get install -f

Which upgraded XBian to 2.1. Won't know if the Wiimote will work until I get home. Did notice that one of the bugs seems to be the wiimote dropping out, there is a script here: http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/robot/wiimote/ which tries to reconnect the wiimost, I'll try this if I run into the same problem.


Control XBMC with a wiimote - Koenkk - 15th Apr, 2013 05:05 PM

On a fresh alpha 5 you first need to do

Code:
sudo apt-get update
sudo apt-get install xbian-package-xbmc



RE: Control XBMC with a wiimote - sasagr - 15th Apr, 2013 08:39 PM

Hello. Followed the above instruction. No errors during the execution of the script but fyi with "sudo dpkg -i xbian-package-wiiremote0.9.deb" it made a reboot.
The negative point is that the xbmc is not responding to my wii motion plus commands. It could be the bt dongle since it is an old d-link (model DBT-122). I am trying to double check if the widget installation is ok, but I do not see it in the installed package.
Can you suggest any test that I can do to see where is the problem? As said it could be the dongle, but before I buy I newer one I would like to be sure that the rest is ok, including the fact that the wii remote is the newer Wii Motion Plus INSIDE.

Thanks to support
rgds


RE: Control XBMC with a wiimote - manuka - 16th Apr, 2013 07:38 AM

OK so I've got my wiimote working on XBian, That bug with connecting is annoying and something I will have to put some work into to solve as I want to hide the pi and having to physically remove and reinsert the bluetooth dongle is something I'd rather not have my kids do everytime they want to watch a movie.

The other bug I have is when I try to power off using the power icon's menu the pi freezes.

(15th Apr, 2013 08:39 PM)sasagr Wrote:  Hello. Followed the above instruction. No errors during the execution of the script but fyi with "sudo dpkg -i xbian-package-wiiremote0.9.deb" it made a reboot.
The negative point is that the xbmc is not responding to my wii motion plus commands. It could be the bt dongle since it is an old d-link (model DBT-122). I am trying to double check if the widget installation is ok, but I do not see it in the installed package.
Can you suggest any test that I can do to see where is the problem? As said it could be the dongle, but before I buy I newer one I would like to be sure that the rest is ok, including the fact that the wii remote is the newer Wii Motion Plus INSIDE.

Thanks to support
rgds

What type of bluetooth dongle are you using? hciconfig should help you there. Also have you tried removing and reinserting the dongle then trying to sync?


RE: Control XBMC with a wiimote - sasagr - 16th Apr, 2013 05:03 PM

I solved the issue. I was reading this post http://forum.xbian.org/thread-549-post-7046.html and followed this instructions:
sudo apt-get install bluez bluez-compat
sudo apt-get install python-gobject python-dbus

then reboot and here we go! it seems working. Will see if any other issues will come Smile

Here again...

Arrows working
A button working
B button working

but after a few seconds of navigation it start going up and down like crazy on its own. No way to stop it unless I switch the pi off.

Is it a know bug or there is something that I can do?


RE: Control XBMC with a wiimote - manuka - 17th Apr, 2013 07:27 AM

(16th Apr, 2013 05:03 PM)sasagr Wrote:  but after a few seconds of navigation it start going up and down like crazy on its own. No way to stop it unless I switch the pi off.

Is it a know bug or there is something that I can do?

I had the same issue last night when using a different power supply @400mA rather than my usual one which is 1000mA, it basically caused a bunch of weirdness as it was enough to power the unit on and sync the wiimote but would cause issues after a few seconds - I plugged my pi into a USB2 slot on my PC and the weirdness went away.


RE: Control XBMC with a wiimote - manuka - 30th Apr, 2013 07:22 AM

A mate of mine came up with the following fix to sort the bluetooth module not trying to pair on bootup

We placed it /etc/rc2.d/ at the end of the wiimote start up script. I'm not quite sure if this is the correct place for the script, so it's a bit of a quick and dirty fix.

rmmod btusb #Unload the btusb module
sleep 1s #Wait some time... this will slow boot down, so remove if it is not nescesarry
modprobe btusb #Load the btusb module


RE: Control XBMC with a wiimote - jaheaga - 2nd Jun, 2013 12:38 AM

EDIT: Does not work with latest release Beta 1.1

Hello everybody, as the instructions provided by Koenkk does not work anymore due to the 404 error downloading the package xbian-package-wiiremote0.9.deb, I manage to get my own wiimote work on my XBian 1.0 Alpha 5.
This is how I did it with help from here

ssh to your device

Code:
sudo su           #default password = raspberry
apt-get update
apt-get install bluez python-cwiid xbmc-eventclients-common
cd /usr/local/bin
wget https://raw.github.com/paulvt/xbmc-wiimote/master/xbmc-wiimote
chmod +x xbmc-wiimote

nano /home/xbian/wiimote.sh


Code:
#!/sbin/sh  
/etc/init.d/bluetooth restart  
sleep 2  
cd /usr/local/bin
xbmc-wiimote -b 00:00:00:00:00:00 -t 7200

Code:
chmod +x /home/xbian/wiimote.sh  
nano /etc/rc.local
then when you are editing rc.local you have to add this lines before "exit 0" changing 00:00:00... for the mac of your wiimote if you dont know it, on any other linux execute this comand "hcitool scan"
Code:
/home/xbian/wiimote.sh &

then I make a cron job to restart bluetooth service each 5 minutes because after a while the wiimote doesn't connect properly

Code:
crontab -e
Code:
*/5 * * * * /etc/init.d/bluetooth restart


the 7200 means 2 hours but you can change it to whatever number you want, the default is 120 but that just wasn't enough for me.

I did a lot of research with openelec (didn't work the wiimote) and raspbmc (the wiimote works but the system is really slow)

Saludos

Jaheaga

EDIT. The rc.local script I change it , because it disconnects ramdomly and then don't connect anymore, also add a cron job to restart the bluetooth service, also noticed that 5 minutes is not the same as 2 hours, well you can configure it wherever you want


RE: Control XBMC with a wiimote - Rumbah - 2nd Sep, 2013 08:25 PM

I got the wii remote working on raspbmc but not on xbian beta 1.1.

Is there a manual to get it working for 1.1 as the things above don't work for me. Or is it not possible for beta 1.1?


RE: Control XBMC with a wiimote - jaheaga - 2nd Sep, 2013 09:44 PM

Sorry, I gave up trying to make it work with 1.1, you could use Alpha 0.5.

(2nd Sep, 2013 08:25 PM)Rumbah Wrote:  I got the wii remote working on raspbmc but not on xbian beta 1.1.

Is there a manual to get it working for 1.1 as the things above don't work for me. Or is it not possible for beta 1.1?



RE: Control XBMC with a wiimote - Rumbah - 3rd Sep, 2013 05:06 AM

(2nd Sep, 2013 09:44 PM)jaheaga Wrote:  Sorry, I gave up trying to make it work with 1.1, you could use Alpha 0.5.

I guess I hope that beta 2 will work and settle with Raspbmc till then. It's gotten pretty fast with the last updates but not as fast as Xbian.


RE: Control XBMC with a wiimote - Gemma01 - 27th Sep, 2013 12:09 AM

Looks like this'll create the problem for installation. Whatever the circumstances may be, if one determines to do it then it can done the things from any tutorial if this stuff wouldn't help him a lot ........


RE: Control XBMC with a wiimote - mk01 - 30th Sep, 2013 09:47 AM

(3rd Sep, 2013 05:06 AM)Rumbah Wrote:  
(2nd Sep, 2013 09:44 PM)jaheaga Wrote:  Sorry, I gave up trying to make it work with 1.1, you could use Alpha 0.5.

I guess I hope that beta 2 will work and settle with Raspbmc till then. It's gotten pretty fast with the last updates but not as fast as Xbian.

without someone owing WIIMOTE to be involved with testing and providing tight feedback hardly.

as no-one from devs has this device at hand.

there seems to be a general problem with lirc in beta2, maybe with fixing it wiimote will work as well.


RE: Control XBMC with a wiimote - Rumbah - 3rd Nov, 2013 11:27 AM

I'd like to help but I'm not that experienced with Linux to provide a proper help I guess. But if there is anything I can do as a novice just let me know.

If there is any developer from Germany I'm happy to borrow my BT receiver and a Wii remote to him. As shipping a BT device outside of the EU and reimporting it back can be a real problem (look at the pebble) I'm not willing to do that.