LinHES Forums http://forum.linhes.org/ |
|
wii remote as control http://forum.linhes.org/viewtopic.php?f=14&t=16760 |
Page 1 of 1 |
Author: | iscraigh [ Thu Sep 27, 2007 7:31 pm ] |
Post subject: | wii remote as control |
When I try to start the wii remote control using ~mythtv/wmd/WMD.py command (remote was found on scan) I get the following errors Code: root@mbe:/myth# /home/mythtv/wmd/WMD.py
Traceback (most recent call last): File "/home/mythtv/wmd/WMD.py", line 45, in ? wmd = WMD() File "/home/mythtv/wmd/WMD.py", line 29, in __init__ ev = EVDispatcher( cf ) # In a way this is the core of the program. It dispatches events between each module File "/home/mythtv/wmd/wmd/EVDispatcher.py", line 32, in __init__ self.xlib = EventBridge_PyXlib( self, cf ) File "/home/mythtv/wmd/wmd/EventBridges/PyXlib.py", line 22, in __init__ self.d = display.Display( ENV_DISPLAY ) File "/var/lib/python-support/python2.4/Xlib/display.py", line 80, in __init__ self.display = _BaseDisplay(display) File "/var/lib/python-support/python2.4/Xlib/display.py", line 67, in __init__ apply(protocol.display.Display.__init__, (self, ) + args, keys) File "/var/lib/python-support/python2.4/Xlib/protocol/display.py", line 44, in __init__ name, host, displayno, screenno = connect.get_display(display) File "/var/lib/python-support/python2.4/Xlib/support/connect.py", line 67, in get_display return mod.get_display(display) File "/var/lib/python-support/python2.4/Xlib/support/unix_connect.py", line 53, in get_display raise error.DisplayNameError(display) Xlib.error.DisplayNameError: Bad display name "" Not sure even what to look at. Has any one tested this? If you need more info just ask. Thanks Craig |
Author: | mjl [ Thu Sep 27, 2007 9:05 pm ] |
Post subject: | |
Hi, I think you want to start it with /home/mythtv/wmd/mythtv_wiimote.sh user mythtv seems be ok. It then waits for you to make the wii connection (press two buttons I think) I had it reading the wii a while back but no time to go further, days are to short Mike |
Author: | Eduardo [ Sat Oct 06, 2007 12:31 pm ] |
Post subject: | |
Don't think it works, but I only just started to investigate. I didn't have the Bluetooth adapter in at time of install so I needed to run 'hcid' Then when I did 'hcitool dev' it would show my USB adapter. Then I could do 'hcitool scan' and it would find my wiimote (when I used the red synch button in the battery area) I think my wii was in range and I ended up turning it on with my various fiddling so it messed me up for a while. I could not get the wiimote to stay connected, it would scan for awhile and then shutoff. I ran the wiimote script as root, and mythtv and from inside Xwindows and outside. No luck so far. But I can detect it. |
Author: | Eduardo [ Sat Oct 06, 2007 1:47 pm ] |
Post subject: | |
hmm seems a tad messed up here's what I had to do to get it running. Please note this is an outline assumes some linux skill to get working. As root: Run hcid to get my USB Bluetooth adapter recognized. Code: prompt# hcid Verify adapter is present, should see device my case is at: hci0 11:11:11:11:11:11 Code: prompt# hcitool dev Devices: hci0 11:11:11:11:11:11 You can run the hcitool to identify your WiiMote, Hit 1&2 (or red synch button) while it is scanning add the address into the file: ~mythtv/wmd/wmd/Config.py Code: prompt# hcitool scan Scanning ... <hit 1&2> 00:1A:E9:22:27:7F Nintendo RVL-CNT-0 Load the UINPUT kernel module Code: prompt# /sbin/modprobe uinput Change permissions so that mythtv can use the uinput device: Code: prompt# chmod a+r /dev/input/uinput
To get the wiimote to run in mythtv you'll probably also need to edit the key bindings in ~mythtv/wmd/wmd/Config.py see the mythwiki on that one (http://www.mythtv.org/wiki/index.php/Controlling_MythTV_using_a_Wii_remote) I guess you'll need a script to run at startup to run hcid and do the modprobe followed by the chmod, the wiki suggests /etc/rc.local not sure that knoppmyth actually runs that file. You'll also need to run the mythtv_wiimote.sh from ~mythtv/.fluxbox/apps Finally not sure how long the wiimote stays on for. when I run WMD.py, the tilt settings print out nonstop, not sure if this will slow the system down, also I guess the wiimote will stay on until powered off manually. |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |