Bug #327
Add Bluetooth Support for Wiimote
Status: | Closed | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | % Done: | 100% |
||
Category: | - | Spent time: | - | |
Target version: | - |
Description
LinHES needs bluetooth support for the WiiMote via [[http://www.benjiegillam.com/mythpywii-installation/|MythPyWii]]. From what I can tell we need the following packages:[[http://www.archlinux.org/packages/extra/i686/bluez|bluez]] [[http://www.bluez.org/download/|bluez source code]] alt (newer source code) [[http://aur.archlinux.org/packages.php?ID=19440|bluez-python]] [[http://aur.archlinux.org/packages.php?ID=5205|python-pybluez]] [[http://aur.archlinux.org/packages.php?ID=16332|cwiid]] and possibly:[[http://aur.archlinux.org/packages.php?ID=15384|wiiuse]]
Maybe make a package for MythPyWii with the other packages as dependencies?
History
Updated by cecil about 16 years ago
sudo pacman -Sy mythpywii
You'll need to manually start mythpywii after installing... I'm sure you've seen the video. I plan to have the package add it to ~/.fluxbox/apps before LinHES-run is ran. Anything else needed?
Updated by mihanson about 16 years ago
1) Module "uinput" needs to be added to /etc/rc.conf
2A) Need to create udev rule so "mythtv" can use uinput (defalts to 600 owned by root)
2B) Create /etc/udev/rules.d/z99-local.rules
# For Bluetooth/WiiMote
KERNEL=="uinput", GROUP="mythtv"
3) My bluetooth device was not brought up (like a network interface) at boot. As a quick and dirty work around I placed the following in /etc/runit/1.local:
# For Bluetooth/WiiMote
/usr/sbin/hciconfig hci0 up
Full path was required else hciconfig was not found. hci? will need adjusting if there is more than one bluetooth adapter in a machine. If you have a better place than 1.local, by all means adjust it. (runit service?)
4) Add the following line before LinHES-run in ~mythtv/.fluxbox/apps
[startup] {/usr/bin/myth_py_wii.py}
That's it so far. I can connect my wiimote via bluetooth, but no buttons work yet. Will take a look at config files later.
Updated by mihanson about 16 years ago
Also add the following to /etc/runit/1.local:
/usr/bin/wminput -d &
Updated by mihanson about 16 years ago
======This post overrides all others made by me with regard to how this works:======
1) Patch /usr/bin/myth_py_wii.py (diff attached, but it is untested as far as patching is concerned!) The patch is simple and changes only one line of code.Change line 151
def wmcb(self, messages):
to
def wmcb(self, messages, timeIgnore):
2) Module "uinput" needs to be added to /etc/rc.conf
3) Need to create udev rule so "mythtv" can use uinput (defaults to 600 owned by root)
Create /etc/udev/rules.d/z90-wiimote.rules
# For Bluetooth/WiiMote
KERNEL=="uinput", MODE="0660", GROUP="mythtv"
4) My bluetooth device was not brought up (like a network interface) at boot. As a quick and dirty work around I placed the following in /etc/runit/1.local:
# For Bluetooth/WiiMote
/usr/sbin/hciconfig hci0 up
Full path was required else hciconfig was not found. hciX will need adjusting if there is more than one bluetooth adapter in a machine. If you have a better place than 1.local, by all means adjust it. (runit service?)
5) Copy cwiid config files to mythtv's home directory:
mkdir -p /home/mythtv/.cwiid/wminput
cp /etc/cwiid/wminput/* /home/mythtv/.cwiid/wminput/
chown -R mythtv:mythtv /home/mythtv/.cwiid
6) Add the following line ==before== LinHES-run in ~mythtv/.fluxbox/apps
[startup] {/usr/bin/myth_py_wii.py}
That's it. It works.
Updated by jams over 15 years ago
- Assignee changed from cecil to mihanson
Updated by mihanson over 15 years ago
- % Done changed from 0 to 100
- Status changed from New to Closed