Page 22 of 22 FirstFirst ... 12202122
Results 211 to 218 of 218

Thread: Xbox 360 Controller in Feisty

  1. #211
    Join Date
    Dec 2007
    Beans
    1,045

    Re: Xbox 360 Controller in Feisty

    Quote Originally Posted by Grumbel View Post
    If we are talking about xboxdrv, you have to start the driver twice, once for each controller and give the proper "--wid" on startup. This hasn't been tested much, but should work and if not its not hard to fix.

    it is written this. It is a bit complicated. Is there a script that does the installation for us?
    here the src from the xbosdrv site: url
    Code:
      
    Plug in your Xbox360 gamepad and then unload the xpad driver via:
    
     % rmmod xpad
    
    If you want to permanently unload it add the following line to
    /etc/modprobe.d/blacklist:
    
    blacklist xpad
    
    Next you have to load the uinput kernel module which allows userspace
    programms to create input devices and the joydev module which gives
    you the /dev/input/jsX device:
    
     % modprobe uinput
     % modprobe joydev
    
    You also have to make sure that you have access rights to
    /dev/input/uinput, either add yourself to the appropriate group,
    adjust the permissions or run xboxdrv as root.
    
    Once ensured that xpad is out of the way and everything is in place
    start the userspace driver with:
    
     % ./xboxdrv
    
    Or in case you don't have the neccesary rights (being in group root
    should often be enough) start the driver as root via:
    
     % sudo ./xboxdrv
    
    This will create /dev/input/js0 and allow you to access the gamepad
    from any game. To exit the driver press Ctrl-c. 
    If you have multiple wired controllers you need to start multiple instances
    of the xboxdrv driver and append the -i argument like this:
    
     % ./xboxdrv -i 1
    
    If you have multiple wireless controller you need to start multiple
    instances of the xboxdrv driver and append the --wid argument like
    this:
    
     % ./xboxdrv --wid 1
    
    You have to sync the wireless controller as usual.
    
    This will then use the second detected controller, see to see which id
    your controller has:
    
     % ./xboxdrv --list-controller
    
    When everything works as expected it is recomment that you run xboxdrv
    with the silent option:
    
     % ./xboxdrv --silent
    :
    I found this example
    sudo /home/kdb424/xboxdrv-linux-0.4.9/xboxdrv --device-by-id 0x1bad:0xf016 --type xbox360 --silent

    scons
    gives this error:

    scons: Reading SConscript files ...
    Checking for C++ library X11... yes
    Checking for C++ library usb... yes
    Checking for C++ header file boost/thread/thread.hpp... yes
    Checking for C++ library boost_thread-mt... yes
    scons: done reading SConscript files.
    scons: Building targets ...
    g++ -o src/arg_parser.o -c -g -O2 -Wall -ansi -pedantic src/arg_parser.cpp
    g++ -o src/command_line_options.o -c -g -O2 -Wall -ansi -pedantic src/command_line_options.cpp
    g++ -o src/evdev_helper.o -c -g -O2 -Wall -ansi -pedantic src/evdev_helper.cpp
    g++ -o src/firestorm_dual_controller.o -c -g -O2 -Wall -ansi -pedantic src/firestorm_dual_controller.cpp
    g++ -o src/force_feedback_handler.o -c -g -O2 -Wall -ansi -pedantic src/force_feedback_handler.cpp
    g++ -o src/helper.o -c -g -O2 -Wall -ansi -pedantic src/helper.cpp
    g++ -o src/linux_uinput.o -c -g -O2 -Wall -ansi -pedantic src/linux_uinput.cpp
    g++ -o src/modifier.o -c -g -O2 -Wall -ansi -pedantic src/modifier.cpp
    g++ -o src/pretty_printer.o -c -g -O2 -Wall -ansi -pedantic src/pretty_printer.cpp
    g++ -o src/saitek_p2500_controller.o -c -g -O2 -Wall -ansi -pedantic src/saitek_p2500_controller.cpp
    g++ -o src/uinput.o -c -g -O2 -Wall -ansi -pedantic src/uinput.cpp
    g++ -o src/usb_read_thread.o -c -g -O2 -Wall -ansi -pedantic src/usb_read_thread.cpp
    src/usb_read_thread.cpp: In member function 'int USBReadThread::read(uint8_t*, int, int)':
    src/usb_read_thread.cpp:61: error: 'boost:osix_time' has not been declared
    scons: *** [src/usb_read_thread.o] Error 1
    scons: building terminated because of errors.

    I ran this
    apt-get update



    apt-get install -f -y install beep
    apt-get install -f -y
    apt-get install -f -y install g++

    apt-get install -f -y install libboost1.37-dev
    apt-get install -f -y install libboost-thread1.37-dev
    apt-get install -f -y install scons
    apt-get install -f -y install libusb-dev
    apt-get install -f -y install git-core
    apt-get install -f -y install libx11-dev
    apt-get install -f -y install x11proto-core-dev
    apt-get install -f -y install python-dbus

    apt-get install -f -y install libboost-thread-dev
    apt-get install -f -y install libboost1.35-dev
    apt-get install -f -y install libboost1.35-dev ; beep

    apt-get install -f -y install libboost-thread-dev


    apt-get install -f -y install scons

    scons


    and got




    scons: *** No SConstruct file found.
    File "/usr/lib/scons/SCons/Script/Main.py", line 817, in _main
    scons: Reading SConscript files ...
    Checking for C++ library X11... (cached) yes
    Checking for C++ library usb... (cached) yes
    Checking for C++ header file boost/thread/thread.hpp... (cached) yes
    Checking for C++ library boost_thread-mt... (cached) yes
    scons: done reading SConscript files.
    scons: Building targets ...
    g++ -o src/usb_read_thread.o -c -g -O2 -Wall -ansi -pedantic src/usb_read_thread.cpp
    g++ -o src/xbox360_controller.o -c -g -O2 -Wall -ansi -pedantic src/xbox360_controller.cpp
    g++ -o src/xbox360_wireless_controller.o -c -g -O2 -Wall -ansi -pedantic src/xbox360_wireless_controller.cpp
    g++ -o src/xbox_controller.o -c -g -O2 -Wall -ansi -pedantic src/xbox_controller.cpp
    g++ -o src/xboxdrv.o -c -g -O2 -Wall -ansi -pedantic src/xboxdrv.cpp
    g++ -o src/xboxmsg.o -c -g -O2 -Wall -ansi -pedantic src/xboxmsg.cpp
    g++ -o src/xpad_device.o -c -g -O2 -Wall -ansi -pedantic src/xpad_device.cpp
    g++ -o xboxdrv src/xboxdrv.o src/xboxmsg.o src/uinput.o src/arg_parser.o src/pretty_printer.o src/helper.o src/modifier.o src/command_line_options.o s
    rc/xbox_controller.o src/xpad_device.o src/xbox360_controller.o src/xbox360_wireless_controller.o src/firestorm_dual_controller.o src/saitek_p2500_con
    troller.o src/evdev_helper.o src/linux_uinput.o src/usb_read_thread.o src/force_feedback_handler.o -lX11 -lusb -lboost_thread-mt
    src/xboxdrv.o: In function `Xboxdrv::run_main(CommandLineOptions const&)':
    /home/xboxdrv-linux-0.4.9/src/xboxdrv.cpp:535: undefined reference to `uInput::set_ff_callback(boost::f
    unction<void ()(unsigned char, unsigned char), std::allocator<void> > const&)'
    collect2: ld returned 1 exit status
    scons: *** [xboxdrv] Error 1
    scons: building terminated because of errors.

    ./xboxdrv
    ./xboxdrv: error while loading shared libraries: libboost_thread-mt.so.1.35.0: cannot open shared object file: No such file or directory
    Last edited by frenchn00b; January 4th, 2010 at 12:37 AM.

  2. #212
    Join Date
    Dec 2007
    Beans
    1,045

    Re: Xbox 360 Controller in Feisty

    Code:
    # apt-get install libboost1.35-dev 
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
      libboost1.35-dev: Depends: libicu36 but it is not installable
                        Recommends: libboost-iostreams1.35-dev but it is not going to be installed
                        Recommends: libboost-regex1.35-dev but it is not going to be installed
    E: Broken packages

    whatever is tried, I get always this error

    xboxdrv-linux-0.4.9# scons
    scons: Reading SConscript files ...
    Checking for C++ library X11... yes
    Checking for C++ library usb... yes
    Checking for C++ header file boost/thread/thread.hpp... yes
    Checking for C++ library boost_thread-mt... yes
    scons: done reading SConscript files.
    scons: Building targets ...
    g++ -o src/arg_parser.o -c -g -O2 -Wall -ansi -pedantic src/arg_parser.cpp
    g++ -o src/command_line_options.o -c -g -O2 -Wall -ansi -pedantic src/command_line_options.cpp
    g++ -o src/evdev_helper.o -c -g -O2 -Wall -ansi -pedantic src/evdev_helper.cpp
    g++ -o src/firestorm_dual_controller.o -c -g -O2 -Wall -ansi -pedantic src/firestorm_dual_controller.cpp
    g++ -o src/force_feedback_handler.o -c -g -O2 -Wall -ansi -pedantic src/force_feedback_handler.cpp
    g++ -o src/helper.o -c -g -O2 -Wall -ansi -pedantic src/helper.cpp
    g++ -o src/linux_uinput.o -c -g -O2 -Wall -ansi -pedantic src/linux_uinput.cpp
    g++ -o src/modifier.o -c -g -O2 -Wall -ansi -pedantic src/modifier.cpp
    g++ -o src/pretty_printer.o -c -g -O2 -Wall -ansi -pedantic src/pretty_printer.cpp
    g++ -o src/saitek_p2500_controller.o -c -g -O2 -Wall -ansi -pedantic src/saitek_p2500_controller.cpp
    g++ -o src/uinput.o -c -g -O2 -Wall -ansi -pedantic src/uinput.cpp
    g++ -o src/usb_read_thread.o -c -g -O2 -Wall -ansi -pedantic src/usb_read_thread.cpp
    src/usb_read_thread.cpp: In member function 'int USBReadThread::read(uint8_t*, int, int)':
    src/usb_read_thread.cpp:70: error: 'memcpy' was not declared in this scope
    scons: *** [src/usb_read_thread.o] Error 1
    scons: building terminated because of errors.
    Last edited by frenchn00b; January 4th, 2010 at 12:36 AM.

  3. #213
    Join Date
    Feb 2008
    Beans
    2

    Xbox 360 Controller Module Hangs at Startup

    Hello all, I am currently using an xpad.ko module v0.1.7 compiled for kernel 2.6.20.21 and I have written code to successfully read controller values for a standard WIRED Microsoft XBox360 controller (official MS hardware, recently purchased).

    Everything works fine unless the controller is connected to the USB port prior to booting, this causes the system to hang when it reaches the "insmod /<directory_path>/xpad.ko" in my init. If I unplug the controller the system will recover and boot properly and the controller will work fine when it is plugged in again.

    I am also loading the following modules during init:

    insmod /lib/modules/2.6.20.21/kernel/drivers/usb/serial/usbserial.ko
    insmod /lib/modules/2.6.20.21/kernel/drivers/usb/serial/pl2303.ko
    insmod /lib/modules/2.6.20.21/kernel/drivers/usb/serial/ftdi_sio.ko
    insmod /lib/modules/2.6.20.21/kernel/drivers/usb/input/xpad.ko

    Ordering the xpad.ko before or after these other calls has no effect, it will hang on the xpad call.

    I see that others have raised this issue in this thread before but I have read all 22 pages and I could not find a post that resolved this problem specifically. Simply unplugging the controller before booting is not an acceptable workaround for my needs, sorry.
    Has anyone been able to fix this?

    Thank you for your help,
    S.

  4. #214
    Join Date
    Dec 2007
    Beans
    1,045

    Re: Xbox 360 Controller Module Hangs at Startup

    Quote Originally Posted by Jtheletter View Post
    Hello all, I am currently using an xpad.ko module v0.1.7 compiled for kernel 2.6.20.21 and I have written code to successfully read controller values for a standard WIRED Microsoft XBox360 controller (official MS hardware, recently purchased).

    Everything works fine unless the controller is connected to the USB port prior to booting, this causes the system to hang when it reaches the "insmod /<directory_path>/xpad.ko" in my init. If I unplug the controller the system will recover and boot properly and the controller will work fine when it is plugged in again.

    I am also loading the following modules during init:

    insmod /lib/modules/2.6.20.21/kernel/drivers/usb/serial/usbserial.ko
    insmod /lib/modules/2.6.20.21/kernel/drivers/usb/serial/pl2303.ko
    insmod /lib/modules/2.6.20.21/kernel/drivers/usb/serial/ftdi_sio.ko
    insmod /lib/modules/2.6.20.21/kernel/drivers/usb/input/xpad.ko

    Ordering the xpad.ko before or after these other calls has no effect, it will hang on the xpad call.

    I see that others have raised this issue in this thread before but I have read alland I could not find a post that resolved this problem specifically. Simply unplugging the controller before booting is not an acceptable workaround for my needs, sorry.
    Has anyone been able to fix this?

    Thank you for your help,
    S.
    It seems that the drivers or the developments of xpad 360 driver has low activity, although the website still lives. Not much replies & results indeed as you wrote :
    22 pages

  5. #215
    Join Date
    Sep 2007
    Beans
    144

    Re: Xbox 360 Controller Module Hangs at Startup

    Quote Originally Posted by Jtheletter View Post
    Hello all, I am currently using an xpad.ko module v0.1.7 compiled for kernel 2.6.20.21 and I have written code to successfully read controller values for a standard WIRED Microsoft XBox360 controller (official MS hardware, recently purchased).
    Have you made sure that the old xpad driver that came with the kernel is out of the way? If not it will be automatically loaded. So either delete the old xpad.ko, overwrite it with the new driver or blacklist the module so that it is not automatically loaded by creating a file /etc/modprobe.d/xpad.conf with a line:

    blacklist xpad

  6. #216
    Join Date
    Dec 2007
    Beans
    1,045

    Re: Xbox 360 Controller Module Hangs at Startup

    Quote Originally Posted by Grumbel View Post
    Have you made sure that the old xpad driver that came with the kernel is out of the way? If not it will be automatically loaded. So either delete the old xpad.ko, overwrite it with the new driver or blacklist the module so that it is not automatically loaded by creating a file /etc/modprobe.d/xpad.conf with a line:

    blacklist xpad
    if he does rmmod xpad when trying after compilation, it shall work.

    dgen -j is interesting. It gives 4 xbox gamepad instead of one. It is an interestign debugger.

  7. #217
    Join Date
    Feb 2008
    Beans
    2

    Re: Xbox 360 Controller Module Hangs at Startup

    Quote Originally Posted by Grumbel View Post
    Have you made sure that the old xpad driver that came with the kernel is out of the way? If not it will be automatically loaded. So either delete the old xpad.ko, overwrite it with the new driver or blacklist the module so that it is not automatically loaded by creating a file /etc/modprobe.d/xpad.conf with a line: blacklist xpad
    First, thank you to both frenchn00b and Grumbel for your quick responses. Unfortunately the kernel I am working with is a custom build of 2.6.20.21 for a single board computer that originally had less than 40MB of HDD space, so many of the kernel tools and unused modules were removed by the original creator to save space. I am trying to avoid rebuilding a new kernel for this SBC because that will cause other problems for me down the line. Thankfully it has been upgraded to a 2GB HDD so I have some more room to work, but the preferred upgrade process is to add modules after init rather than build a new kernel.

    There is no preexisting xpad.ko for this custom kernel, so there is no conflict with two xpad.ko modules being loaded. There seems to be a problem with xpad.ko partially loading but not being able to finish/exit when the 360 controller is already plugged in.

    Here is a snippet of dmesg that shows what happens if I boot with the 360 controller attached but do not load xpad at boot, then later manually modprobe it. Dmesg output is in bold, my comments are in //italic.


    usb 1-2: new full speed USB device using ohci_hcd and address 2
    usb 1-2: configuration #1 chosen from 1 choice

    //the xbox controller has been detected and connects as a generic device, next I call 'modprobe xpad'
    input: Microsoft Xbox 360 Controller as /class/input/input0
    input: Microsoft Xbox 360 Controller as /class/input/input1

    //xpad loads enough to recognize the controller as the 360, this is where loading xpad will hang until I disconnect the controller. I should note I can run jstest and my own code to read the controller even though modprobe is hanging
    usb 1-2: USB disconnect, address 2
    //this disconnect is from me manually unplugging the controller
    usbcore: registered new interface driver xpad
    drivers/usb/input/xpad.c: driver for Xbox controllers v0.1.7

    //after the controller is unplugged the modprobe finishes and exits, if controller is reconnected it is recognized and works

    I have found that if I run "insmod /<dir_path>/xpad.ko &" in my rc0.d I can use the controller but the insmod process will stick around in the background. I don't see any memory leak or processor hogging for this process if I check with "top" but it seems like a very bad idea to let insmod hang in an open process.

    Anyway, this sequence of events leads me to believe that xpad.ko is 99% loaded but there is an error in xpad.c and/or usbcore such that it is waiting on some event that cannot occur while the controller is connected. Thoughts on this?

    My other planned approach was to disable ohci_hcd during boot using a blacklist, then insmod xpad, then re-enable ohci afterwards. The problem is that my custom kernel is missing all of the sbin programs needed to build an initramfs image to utilize the blacklist at boot. grrr. Any other ideas on how to disable USB until xpad is loaded?

    Thanks for any help you can give,
    J.S.

  8. #218
    Join Date
    Feb 2010
    Location
    Italy
    Beans
    4
    Distro
    Ubuntu 9.10 Karmic Koala

    Question Re: Xbox 360 Controller on ubuntu 9.10

    Hi, I found problems installing the headset Microsoft LifeChat ZX-6000 on Ubuntu 9.10. I followed the manual step by step, but nothing to do ... sorry for my bad English:

    Error:

    mauro@workstation:~/.xpad360$ cd /home/mauro/.xpad360
    mauro@workstation:~/.xpad360$ sudo make
    make modules -C /lib/modules/2.6.31-19-generic/build SUBDIRS=/home/mauro/.xpad360
    make[1]: ingresso nella directory «/usr/src/linux-headers-2.6.31-19-generic»
    CC [M] /home/mauro/.xpad360/xpad.o
    /home/mauro/.xpad360/xpad.c: In function ‘xpad_open’:
    /home/mauro/.xpad360/xpad.c:339: error: ‘struct input_dev’ has no member named ‘private’
    /home/mauro/.xpad360/xpad.c: In function ‘xpad_close’:
    /home/mauro/.xpad360/xpad.c:350: error: ‘struct input_dev’ has no member named ‘private’
    /home/mauro/.xpad360/xpad.c: In function ‘xpad_probe’:
    /home/mauro/.xpad360/xpad.c:440: error: ‘struct input_dev’ has no member named ‘cdev’
    /home/mauro/.xpad360/xpad.c:441: error: ‘struct input_dev’ has no member named ‘private’
    /home/mauro/.xpad360/xpad.c: In function ‘usb_xpad_init’:
    /home/mauro/.xpad360/xpad.c:519: error: implicit declaration of function ‘info’
    make[2]: *** [/home/mauro/.xpad360/xpad.o] Errore 1
    make[1]: *** [_module_/home/mauro/.xpad360] Errore 2
    make[1]: uscita dalla directory «/usr/src/linux-headers-2.6.31-19-generic»
    make: *** [all] Errore 2

    lsusb:

    mauro@workstation:~/.xpad360$ lsusb
    Bus 002 Device 007: ID 045e:0719 Microsoft Corp.
    Bus 002 Device 005: ID 045e:0714 Microsoft Corp.
    Bus 002 Device 004: ID 045e:0717 Microsoft Corp.
    Bus 002 Device 003: ID 045e:0707 Microsoft Corp.
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 001 Device 009: ID 045e:075d Microsoft Corp.
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    dmesg | tail -n20

    mauro@workstation:~/.xpad360$ dmesg | tail -n20
    [ 7501.533367] 8:3:1: usb_set_interface failed
    [ 7501.837047] usb 1-1: new high speed USB device using ehci_hcd and address 9
    [ 7501.985340] usb 1-1: configuration #1 chosen from 1 choice
    [ 7501.988133] uvcvideo: Found UVC 1.00 device Microsoft® LifeCam Cinema(TM) (045e:075d)
    [ 7501.996870] input: Microsoft® LifeCam Cinema(TM) as /devices/pci0000:00/0000:00:02.1/usb1/1-1/1-1:1.0/input/input17
    [ 7503.117114] 9:3:1: cannot get freq at ep 0x82
    [ 7504.241805] usb 2-2: USB disconnect, address 6
    [ 7504.244080] xpad: xpad_irq_in - usb_submit_urb failed with result -19
    [ 7504.316121] 9:3:1: cannot get freq at ep 0x82
    [ 7505.449116] 9:3:1: cannot get freq at ep 0x82
    [ 7507.469032] usb 2-2: new full speed USB device using ohci_hcd and address 7
    [ 7507.694216] usb 2-2: configuration #1 chosen from 1 choice
    [ 7507.697664] input: Xbox 360 Wireless Receiver as /devices/pci0000:00/0000:00:02.0/usb2/2-2/2-2:1.0/input/input18
    [ 7507.697921] input: Xbox 360 Wireless Receiver as /devices/pci0000:00/0000:00:02.0/usb2/2-2/2-2:1.2/input/input19
    [ 7507.698139] input: Xbox 360 Wireless Receiver as /devices/pci0000:00/0000:00:02.0/usb2/2-2/2-2:1.4/input/input20
    [ 7507.698340] input: Xbox 360 Wireless Receiver as /devices/pci0000:00/0000:00:02.0/usb2/2-2/2-2:1.6/input/input21
    [ 8837.311908] padlock: VIA PadLock not detected.
    [ 8837.411250] alg: No test for xts(twofish) (xts(twofish-generic))
    [ 8837.472897] alg: No test for xts(serpent) (xts(serpent-generic))
    [ 8837.503701] EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended.

    Thank's for support!

Page 22 of 22 FirstFirst ... 12202122

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
  •