Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Guitar Hero3 wii controller in Ubuntu

  1. #1
    Join Date
    Aug 2006
    Beans
    91

    Guitar Hero3 wii controller in Ubuntu

    I just picked up GH3 for my Wii and I'm loving the game. I also play Frets on Fire on my ubuntu machine quite frequently and I thought it would be a SIMPLE matter to connect my GH3 controller to my PC via bluetooth and jam out. Boy was I wrong! I have everything set up for the wii remote control and it works splendidly, BUT when I try to connect my wiimote with the GH3 adapter added on I get the following error:
    Code:
    Registering key BTN_RIGHT for button A with code 111
    Registering key BTN_LEFT for button B with code 110
    Registering key ['KEY_LEFTCTRL', 'KEY_LEFTALT', 'BTN_LEFT'] for button D with code 1d
    Registering key ['KEY_LEFTCTRL', 'KEY_LEFTALT', 'BTN_LEFT'] for button D with code 38
    Registering key ['KEY_LEFTCTRL', 'KEY_LEFTALT', 'BTN_LEFT'] for button D with code 110
    Registering key ['KEY_LEFTALT'] for button L with code 38
    Registering key KEY_1 for button 1 with code 2
    Registering key KEY_2 for button 2 with code 3
    Registering key ['KEY_LEFTCTRL'] for button U with code 1d
    Registering key ['KEY_F8'] for button R with code 42
    [[1074025828, 2], [1074025830, 0], [1074025830, 1], [1074025828, 1], [1074025828, 0], [1074025829, 273], [1074025829, 272], [1074025829, 29], [1074025829, 56], [1074025829, 272], [1074025829, 56], [1074025829, 2], [1074025829, 3], [1074025829, 29], [1074025829, 66]]
    Could not import pygame. Set DISABLE_PYGAME=1
    CONNECTING
    Looking for Wiimote services at address  00:1A:E9:30:4D:F0
    Victory! We have found that Wiimote!
    We are now connected to Wiimote at address  00:1A:E9:30:4D:F0
    CONNECTED
    Traceback (most recent call last):
      File "WMD.py", line 45, in <module>
        wmd = WMD()
      File "WMD.py", line 41, in __init__
        cycles = wm.main_loop()
      File "/home/ricky/Downloads/wmd-0.1.2/wmd/Wiimote/WMManager.py", line 42, in main_loop
        self.parser.parse( data )
      File "/home/ricky/Downloads/wmd-0.1.2/wmd/Wiimote/Input.py", line 102, in parse
        self.split_report( report, type )
      File "/home/ricky/Downloads/wmd-0.1.2/wmd/Wiimote/Input.py", line 119, in split_report
        func( slice )
      File "/home/ricky/Downloads/wmd-0.1.2/wmd/Wiimote/Input.py", line 155, in slice_STAT
        self.process_stats( s )
    TypeError: process_stats() takes exactly 1 argument (2 given)
    I also noticed that even on the wii, the GH3 controller does NOT work until you put the disk in and click on it in the menu. This initializes a system update and then once that is done, the Guitar can control the cursor in the menu. This leads me to believe that its using some new type of interface with the wii than we are used to seeing. So, there has to be a way to get this working with WMD. I just havent figured it out yet. Has anyone else tried this? I'm going to start poking around in the python files to see what the cause is.

    Also, if i use
    Code:
    sudo hidd --search
    and
    Code:
    sudo hcidump -X
    with JUST the wiimote, i get the expected results, but as soon as i plug in the GH adapter it spat out the following lines then stopped responding to key presses (even if i removed the GH adapter).
    Code:
    > ACL data: handle 6 flags 0x02 dlen 12
        L2CAP(d): cid 0x0041 len 8 [psm 0]
          0000: a1 20 00 00 02 00 00 57                           . .....W
    can anyone with a little more experience shed some light on this issue?

    Thanks,
    DJuniah

  2. #2
    Join Date
    Jul 2007
    Location
    San Antonio, Texas
    Beans
    342
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: Guitar Hero3 wii controller in Ubuntu

    wow. that's really strange... my guess is that redoctane knew some people were gonna try it on the pc and did something to the guitar that would change the signal. but it's not like it's a permanent road-block right!
    ...

  3. #3
    Join Date
    Jul 2005
    Beans
    32

    Re: Guitar Hero3 wii controller in Ubuntu

    In "Input.py" find:
    Code:
      def process_stats( s ):
        pass
    
      def process_bat( b ):
        pass
    And change it so it reads:
    Code:
      def process_stats( self, s ):
        pass
    
      def process_bat( self, b ):
        pass
    Alternatively process_stats and process_bat don't do anything, so you could just comment out any calls to them.

    I'm planning on getting GH3 for my Wii sometime soon and I want to use it in FoF, so hopefully someone will get all this working.

  4. #4
    Join Date
    Jul 2005
    Beans
    32

    Re: Guitar Hero3 wii controller in Ubuntu

    Actually I just looked at the svn version of wmd and notice that Input.py has been updated a fair bit from the version I downloaded (https://svn.forthewiin.org/wmd/trunk...imote/Input.py)

    Might be worth checking out the lastest version from SVN.

  5. #5
    Join Date
    Aug 2006
    Beans
    91

    Re: Guitar Hero3 wii controller in Ubuntu

    Ok, getting a little further now. It is at least seeing that there is a peripheral attached but it doesent seem to know what to do with it. Heres the console output:
    Code:
    uinput: Attempting to autodetect device file
    uinput: /dev/misc/uinput isn't a usable uinput device file
    uinput: autodetection chose /dev/input/uinput as uinput device file
    uinput: Trying to open /dev/input/uinput as control device
    uinput: Writing WIIMOTE_UUD
    uinput: Registering 31 events
    uinput: Creating device
    uinput: initialized and ready
    Could not import pygame. Set DISABLE_PYGAME=1
    CONNECTING
    Looking for Wiimote services at address 00:1A:E9:30:4D:F0
    Victory! We have found that Wiimote!
    We are now connected to Wiimote at address 00:1A:E9:30:4D:F0
    CONNECTED
    EXTCON_ATTACH EVENT v=1
    Event type WM_CLOCK_BEAT is being ignored
    EXTCON_ATTACH EVENT v=1
    tilt (x,y) = (141, 130)
    tilt (x,y) = (141, 130)
    tilt (x,y) = (141, 131)
    tilt (x,y) = (141, 131)
    tilt (x,y) = (143, 131)
    tilt (x,y) = (144, 132)
    tilt (x,y) = (144, 132)
    tilt (x,y) = (145, 133)
    Wiimote Calibration Bytes:  [112, 0, 22, 131, 129, 132, 8, 157, 156, 156, 42, 0, 0, 0, 0, 0, 0, 0, 0]
    tilt (x,y) = (145, 133)
    tilt (x,y) = (146, 134)
    tilt (x,y) = (146, 134)
    tilt (x,y) = (146, 134)
    tilt (x,y) = (146, 134)
    tilt (x,y) = (146, 135)
    tilt (x,y) = (146, 135)
    tilt (x,y) = (145, 135)
    tilt (x,y) = (145, 135)
    tilt (x,y) = (145, 135)
    Invalid memory read during controller attachment
    Traceback (most recent call last):
      File "WMD.py", line 45, in <module>
        wmd = WMD()
      File "WMD.py", line 41, in __init__
        cycles = wm.main_loop()
      File "/home/ricky/Downloads/wmd-0.1.2/wmd/Wiimote/WMManager.py", line 46, in main_loop
        self.parser.parse( data )
      File "/home/ricky/Downloads/wmd-0.1.2/wmd/Wiimote/Input.py", line 36, in parse
        self.split_report( rep_payload, rep_def )
      File "/home/ricky/Downloads/wmd-0.1.2/wmd/Wiimote/Input.py", line 63, in split_report
        func( slice_bl )
      File "/home/ricky/Downloads/wmd-0.1.2/wmd/Wiimote/Input.py", line 158, in slice_MEM_READ_DATA
        self.wmstate.incoming_ram_data( slb )
      File "/home/ricky/Downloads/wmd-0.1.2/wmd/Wiimote/Input.py", line 327, in incoming_ram_data
        callback( data )
      File "/home/ricky/Downloads/wmd-0.1.2/wmd/Wiimote/Input.py", line 375, in read_extcont_type_callback
        if ext_device_name in self.valid_ext_device_names:
    UnboundLocalError: local variable 'ext_device_name' referenced before assignment

  6. #6
    Join Date
    Jul 2005
    Beans
    32

    Re: Guitar Hero3 wii controller in Ubuntu

    Did you check out an entire new version of the whole program from SVN? Or just grab that one file. I know my post wasn't very clear, but you'll have to use subversion to check out everything.

  7. #7
    Join Date
    Aug 2006
    Beans
    91

    Re: Guitar Hero3 wii controller in Ubuntu

    yes i made sure to grab everything and do a full checkout, but no luck. I did see the new file that looks like it handles controller add-ons though. I'm guessing what i seek has something to do with a definition that needs to be added to that.

  8. #8
    Join Date
    Jul 2005
    Beans
    32

    Re: Guitar Hero3 wii controller in Ubuntu

    The error is saying ext_device_name isn't defined but they are trying to check the value of it.

    Perhaps change:
    Code:
     def __init__( self, ev, wmmode ):
        self.ev = ev
        self.wmmode = wmmode
    to read
    Code:
     def __init__( self, ev, wmmode ):
        self.ev = ev
        self.wmmode = wmmode
        self.ext_device_name = ""
    That should make sure that ext_device_name is set to something when the object is created (although I thought what they had would have done that).

    It looks like this bit:
    Code:
        if off == 0xfe and ct1 == ct2:
          if ct1 == 0xfd:
            ext_device_name = 'Classic'
          elif ct1 == 0xfe:
            ext_device_name = 'Nunchuk'
          else:
            log( LOG_ERR, "Unknown device type %x" % ct1 )
        else:
          log( LOG_ERR, "Invalid memory read during controller attachment" )
    Will need to be updated to handle the Guitar, but without one to play with myself I can't figure out what values to put in there.

    Actually, looking at that the log should contain a line saying "Unknown device type xxxx" we need to add stuff to handle the guitar like:

    Code:
        if off == 0xfe and ct1 == ct2:
          if ct1 == 0xfd:
            ext_device_name = 'Classic'
          elif ct1 == 0xfe:
            ext_device_name = 'Nunchuk'
          elif ct1 == xxxx:
            ext_device_name = 'Guitar'
          else:
            log( LOG_ERR, "Unknown device type %x" % ct1 )
        else:
          log( LOG_ERR, "Invalid memory read during controller attachment" )
    Where 'xxxx' is whatever is in the log file, and 'Guitar' will have to be added to valid_ext_devices' or whatever it was. Of course we still won't actually have code to handle the Guitar.

  9. #9
    Join Date
    Jul 2005
    Beans
    32

    Re: Guitar Hero3 wii controller in Ubuntu

    Actually, as an idea for a quick and dirty fix, change it to:
    Code:
        if off == 0xfe and ct1 == ct2:
          if ct1 == 0xfd:
            ext_device_name = 'Classic'
          elif ct1 == 0xfe:
            ext_device_name = 'Nunchuk'
          else:
            ext_device_name = 'Nunchuk'
            log( LOG_ERR, "Unknown device type %x" % ct1 )
        else:
          log( LOG_ERR, "Invalid memory read during controller attachment" )
    Which will make it think the Guitar is a Nunchuck. Might be enough to get the buttons and stuff working, which would be all you'd need for FoF?

  10. #10
    Join Date
    Aug 2006
    Beans
    91

    Re: Guitar Hero3 wii controller in Ubuntu

    Thanks for all the awesome replies, I'll give it a shot later on tonight and report back on with a full writeup of what i had to do to get it working.
    (if i can manage to tear myself away from frets on fire that is )

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •