Author Topic: USB gamepad - anyone have one, happy to test alternative detection?  (Read 2085 times)

phenigma

  • wants to work for LinuxMCE
  • **
  • Posts: 920
    • View Profile
Re: USB gamepad - anyone have one, happy to test alternative detection?
« Reply #15 on: February 03, 2013, 05:58:45 pm »
Fixes are in svn for erroneous detection issues. 

I also fixed an issue where the detection radar only functioning properly if a joystick was plugged in, for the first time, after bootup.  It would not function correctly on a core if the joystick was first plugged in prior to, or during, boot.  Basically the radar is starts before dcerouter which prevents the detection message from reaching the dcerouter during boot.  The radar then would not fire any additional detection messages and the joystick was never detected.

http://svn.linuxmce.org/trac.cgi/attachment/ticket/1675/

I'm not sure when these will be rolled in, everything is working well.

J.

jamo

  • Guru
  • ****
  • Posts: 457
    • View Profile
    • LMCE user Page
Re: USB gamepad - anyone have one, happy to test alternative detection?
« Reply #16 on: February 04, 2013, 08:07:30 am »
Hi Phenigma

Thanks for having a look at this. I will try to apply and test your patches on my false positives (hp6710b notebooks accelerometer) and let you know. Will be great if this is addressed.

jamo

  • Guru
  • ****
  • Posts: 457
    • View Profile
    • LMCE user Page
Re: USB gamepad - anyone have one, happy to test alternative detection?
« Reply #17 on: February 04, 2013, 08:39:08 pm »
Oops- spoke too soon. I will test after all is rolled in. I thought it was a script fix, not a c++ program fix. I can't test that without doing an update once the change has been merged. Will keep an eye on the ticket and try it once merged.

phenigma

  • wants to work for LinuxMCE
  • **
  • Posts: 920
    • View Profile
Re: USB gamepad - anyone have one, happy to test alternative detection?
« Reply #18 on: February 04, 2013, 10:31:38 pm »
There are two 'fixes' to repair the issue.  The first is script based only and will fix improper initial detection.  The USB_Game_Pad (c++) fixes the same issues AFTER a game pad has been detected.  USB_Game_Pad and the detection radars are independent.  All is working great here so I'm hopeful it will be rolled in soon.  I can provide copies of the scripts which, after you delete the existing GamePad devices in webadmin, will no longer detect and add new game pad devices.  Once a joystick device is plugged in it would create the game pad device and USB_Game_Pad takes over at that point.

If your issue is solely that you have erroneous detection and want that to stop.  You can use the following scripts as replacements then reboot the core/md in question (to reload the detection radar) and delete the existing game_pad devices from webadmin.  As long as you don't plug in anything that presents as a joystick then USB_Game_Pad should not run after this.

http://pastebin.com/nLSpwphr <- Gamepad_Detect.sh
http://pastebin.com/FbW50EiH <- AVWizard_Gamepad_Detect.sh

J.
« Last Edit: February 04, 2013, 10:36:03 pm by phenigma »

phenigma

  • wants to work for LinuxMCE
  • **
  • Posts: 920
    • View Profile
Re: USB gamepad - anyone have one, happy to test alternative detection?
« Reply #19 on: February 04, 2013, 10:33:45 pm »
Thanks for having a look at this. I will try to apply and test your patches on my false positives (hp6710b notebooks accelerometer) and let you know. Will be great if this is addressed.

You're welcome, it's been buggin the crap out of me too :).  Just for completeness, could you post the output of:
Code: [Select]
udevadm info --query property --name /dev/input/js0for your accelerometer device.  (Accelerometer in my laptop doesn't present at /dev/input/js?)  I know it will not mis-detect a mouse device now but I'm not sure what the accelerometer presents as.

J.

jamo

  • Guru
  • ****
  • Posts: 457
    • View Profile
    • LMCE user Page
Re: USB gamepad - anyone have one, happy to test alternative detection?
« Reply #20 on: February 06, 2013, 05:53:30 am »
Sure, here it is on the accelerometer machine (hp6710b):

Code: [Select]
root@moon34:~# udevadm info --query property --name /dev/input/js0
UDEV_LOG=3
DEVPATH=/devices/platform/lis3lv02d/input/input7/js0
MAJOR=13
MINOR=0
DEVNAME=/dev/input/js0
SUBSYSTEM=input
ID_INPUT=1
ID_PATH=platform-lis3lv02d
DEVLINKS=/dev/char/13:0

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5476
  • DOES work for LinuxMCE.
    • View Profile
Re: USB gamepad - anyone have one, happy to test alternative detection?
« Reply #21 on: February 06, 2013, 05:55:16 am »
I really want to beat whomever did the udev rules for these devices to a fucking pulp...

-Thom

phenigma

  • wants to work for LinuxMCE
  • **
  • Posts: 920
    • View Profile
Re: USB gamepad - anyone have one, happy to test alternative detection?
« Reply #22 on: February 06, 2013, 10:32:16 pm »
Sure, here it is on the accelerometer machine (hp6710b):

Thanks jamo!  You're device does not present ID_INPUT_JOYSTICK=1.  Your device will not be erroneously detected after the next snapshot is released.

J.

phenigma

  • wants to work for LinuxMCE
  • **
  • Posts: 920
    • View Profile
Re: USB gamepad - anyone have one, happy to test alternative detection?
« Reply #23 on: February 06, 2013, 10:32:50 pm »
I really want to beat whomever did the udev rules for these devices to a fucking pulp...

-Thom

Agreed.

J.

posde

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2846
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: USB gamepad - anyone have one, happy to test alternative detection?
« Reply #24 on: February 06, 2013, 11:18:16 pm »
apt-get upgrade will bring it into the system.

phenigma

  • wants to work for LinuxMCE
  • **
  • Posts: 920
    • View Profile
Re: USB gamepad - anyone have one, happy to test alternative detection?
« Reply #25 on: February 06, 2013, 11:37:15 pm »
Thanks posde!  I wasn't sure if it was in the repo yet or not.

J.