View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 4 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: wii remote as control
PostPosted: Thu Sep 27, 2007 7:31 pm 
Offline
Joined: Mon Mar 21, 2005 1:43 pm
Posts: 388
Location: Nanaimo BC
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 27, 2007 9:05 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
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


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 06, 2007 12:31 pm 
Offline
Joined: Wed Nov 09, 2005 2:11 am
Posts: 8
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 06, 2007 1:47 pm 
Offline
Joined: Wed Nov 09, 2005 2:11 am
Posts: 8
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.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu