Author Topic: creating template for logitech rumblepad  (Read 3215 times)

Esperanto

  • Guru
  • ****
  • Posts: 281
    • View Profile
creating template for logitech rumblepad
« on: May 03, 2010, 10:07:20 am »
Hi,

I wanted to create a template for teh logitech rumbplepad joystick/pad and tried to follow the descriptions here:
http://wiki.linuxmce.org/index.php/Creating_a_Device_Template_for_a_Remote_that_uses_the_kernel_input_subsystem

However with the tail -f /var/log/pluto/XX_LaunchOrbiter.sh.log | grep "GenericHIDInterface" (with hybrid orbiter) I do not get any input when pressing anything. Using evtest however does give input:

# evtest /dev/input/event6
Input driver version is 1.0.0                       
Input device ID: bus 0x3 vendor 0x46d product 0xc218 version 0x110
Input device name: "Logitech Logitech RumblePad 2 USB"           
Supported events:                                                 
  Event type 0 (Reset)                                           
    Event code 0 (Reset)                                         
    Event code 1 (Key)                                           
    Event code 3 (Absolute)                                       
    Event code 4 (?)                                             
  Event type 1 (Key)                                             
    Event code 288 (Trigger)                                     
    Event code 289 (ThumbBtn)                                     
    Event code 290 (ThumbBtn2)                                   
    Event code 291 (TopBtn)                                       
    Event code 292 (TopBtn2)                                     
    Event code 293 (PinkieBtn)                                   
    Event code 294 (BaseBtn)                                     
    Event code 295 (BaseBtn2)                                     
    Event code 296 (BaseBtn3)                                     
    Event code 297 (BaseBtn4)                                     
    Event code 298 (BaseBtn5)                                     
    Event code 299 (BaseBtn6)                                     
  Event type 3 (Absolute)                                         
    Event code 0 (X)                                             
      Value    128                                               
      Min        0                                               
      Max      255                                               
      Flat      15                                               
    Event code 1 (Y)                                             
      Value    127                                               
      Min        0                                               
      Max      255                                               
      Flat      15                                               
    Event code 2 (Z)                                             
      Value    127                                               
      Min        0                                               
      Max      255                                               
      Flat      15                                               
    Event code 5 (Rz)                                             
      Value    127                                               
      Min        0                                               
      Max      255                                               
      Flat      15                                               
    Event code 16 (Hat0X)                                         
      Value      0                                               
      Min       -1                                               
      Max        1                                               
    Event code 17 (Hat0Y)                                         
      Value      0                                               
      Min       -1                                               
      Max        1                                               
  Event type 4 (?)                                               
    Event code 4 (?)                                             
Testing ... (interrupt to exit)                                   
Event: time 1272873951.784059, type 3 (Absolute), code 5 (Rz), value 126
Event: time 1272873951.784085, type 0 (Reset), code 0 (Reset), value 0 
Event: time 1272873951.792054, type 3 (Absolute), code 2 (Z), value 122
Event: time 1272873951.792063, type 3 (Absolute), code 5 (Rz), value 255
Event: time 1272873951.792076, type 0 (Reset), code 0 (Reset), value 0 
Event: time 1272873979.735987, type 3 (Absolute), code 2 (Z), value 126
Event: time 1272873979.736009, type 0 (Reset), code 0 (Reset), value 0 
Event: time 1272873979.743991, type 3 (Absolute), code 2 (Z), value 127
Event: time 1272873979.744013, type 0 (Reset), code 0 (Reset), value 0 
Event: time 1272873979.751985, type 3 (Absolute), code 2 (Z), value 128
Event: time 1272873979.752005, type 0 (Reset), code 0 (Reset), value 0 
Event: time 1272873979.767997, type 3 (Absolute), code 5 (Rz), value 252
Event: time 1272873979.768019, type 0 (Reset), code 0 (Reset), value 0 
Event: time 1272873979.775981, type 3 (Absolute), code 2 (Z), value 130
Event: time 1272873979.776001, type 0 (Reset), code 0 (Reset), value 0

any suggestions?

thx

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: creating template for logitech rumblepad
« Reply #1 on: May 04, 2010, 06:26:50 am »
You can use that information to create the device template,

simply add 100000 to the event codes, so:

100289 for event code 289.

-Thom

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: creating template for logitech rumblepad
« Reply #2 on: May 04, 2010, 06:28:49 am »
Note that this is for any codes that X does not decode itself.

Use xev to find these key codes...

For any key codes that xev does not return, use the method I describe above. You can see this in the Gyration Go Mouse template, some key codes are handled by X (288, 289, etc.), some are not (100xxx).

-Thom

Esperanto

  • Guru
  • ****
  • Posts: 281
    • View Profile
Re: creating template for logitech rumblepad
« Reply #3 on: May 05, 2010, 09:44:41 pm »
Thom,

I tried to just add a mapping to test if it would work. However I had no success. I looked in the gyration template and saw that there 120000 was used instead of 100000. I only need to provide a mapping to be able to test it right? Besides the mapping

2,100291=2,73
3,100291=3,73

I tried

2,120291=2,73
3,120291=3,73

and just in case:

2,291=2,73
3,291=3,73

However none showed the menu. The device is detected and installed automatically. I also saw an old post http://forum.linuxmce.org/index.php?topic=8652.60 and I also have that in my log every 4 seconds:
01      05/05/10 21:27:06.843           GenericHIDInterface::DecodeEventInFD: Short read from fd 1 <0xb2588b90

Pressing this button on the pad when running 'sudo evtest /dev/input/event6' gives me:
Event: time 1273088300.879692, type 4 (?), code 4 (?), value 589828
Event: time 1273088300.879703, type 1 (Key), code 291 (TopBtn), value 1
Event: time 1273088300.879711, type 0 (Reset), code 0 (Reset), value 0
Event: time 1273088301.031694, type 4 (?), code 4 (?), value 589828
Event: time 1273088301.031702, type 1 (Key), code 291 (TopBtn), value 0
Event: time 1273088301.031708, type 0 (Reset), code 0 (Reset), value 0

xev gives no output at all (on none of the buttons, neither the joysticks).

Maybe the short read has something to do with it? Or am I doing something else wrong here? hope you can help me out.

thx

Esperanto

  • Guru
  • ****
  • Posts: 281
    • View Profile
Re: creating template for logitech rumblepad
« Reply #4 on: May 10, 2010, 07:32:37 pm »
Since I did not get a response for more then a week does that mean that nobody knows and I should file a bug ticket?

thx