OpenELEC / service.openelec.settings

service.openelec.settings - OpenELEC settings addon
Other
12 stars 35 forks source link

Can't connect wiimote anymore #52

Closed GerbenWelter closed 9 years ago

GerbenWelter commented 9 years ago

With OE 4.x I can't connect the wiimote anymore by using the 1+2 button combination. I can only get it to connect by using the OE settings/bluetooth menu (using a mouse) and choosing 'trust & connect'. After that I can use the wiimote. But if I turn the wiimote off or reboot OE the wiimote can't connect itself again.

This used to work but was probably by virtue of the xbmc-wiimote add-on. Even through upgrades from 3.x to 4.x. Only upgrading to 4.2.x finally broke the wiimote functionality. I tried a clean install of 4.2.1 but that didn't help. I also can't completely revert to 3.2 or 4.0 because the xbmc-wiimote addon doesn't seem to be available anymore.

stefansaraev commented 9 years ago

and I still dont see debug logs... why not read first

GerbenWelter commented 9 years ago

Here you go:

https://www.dropbox.com/s/pdysdoryc338law/log-2014-10-13-17.15.34.zip?dl=0

GerbenWelter commented 9 years ago

Now with debugging enabled.

toccata10 commented 9 years ago

Exact same problem here on a Zotac ID41. Tried the 5.0-RC3 yesterday. I have to manualy use the "trust & connect" to reconnect my wiimote.

toccata10 commented 9 years ago

Here's my workaround as autoconnect stopped working from version 4.2 (and is still broken in 5.0 RC3) 1) make sure that cron is activated in the Openelec settings addon. 2) Pair the wiimote by using "trust & connect". Note the mac address. Mine is 00:26:59:62:70:33 3) Create 2 files in the /storage/.config folder: autostart.sh which contains:

!/bin/bash

to be put in /storage/.config

then launch it every minute with a cron task

for i in {1..7} do /usr/bin/bluetoothctl </storage/.config/commands.list> /storage/.config/dummy.out wait sleep 1 done

a commands.list file with (adapt to your own mac address): connect 00:26:59:62:70:33

Then crontab -e enter a line with * * * * * /storage/.config/autostart.sh > /storage/.config/cron-out 2>&1

exit and confirm that you want to save the files. 4) change the permissions by chmod 0777 /storage/.config/autostart.sh chmod 0777 /storage/.config/commands.list

I'm not sure of the correct number of loops to perform to cover 1 minute. It has to be tested more, but it seems to do the job.

aizelauna commented 9 years ago

Here is a procedure that worked for me with OpenELEC 5.0.5 :

Source : http://openelec.tv/forum/104-bluetooth-remotes/66221-wii-remote-won-t-work-as-i-expect#90658

tomchiverton commented 8 years ago

Still broken on a Pi3 and the 6.0.3 OpenElec image (the latest, I believe).

The script also needs updating (possibly for newer OpenElec / bluetoothctl ?)

#!/bin/bash
#to be put in /storage/.config
#then launch it every minute with a cron task
for i in 1 2 3 4 5 6 7 7 8 9 10 11 12  
do
/usr/bin/bluetoothctl < /storage/.config/commands.list
wait
sleep 4
done

Adjust the number of numbers on the for line and the pause after sleep so that

time ./autostart.sh

takes just under one minute on your Pi.

Bluetooth keyboard needs to be in discovery mode (rather than just powered on), and must be paired normally via the settings to being with)