LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Mouse with Tilt Wheel (https://www.linuxquestions.org/questions/linux-hardware-18/mouse-with-tilt-wheel-186975/)

robe 05-28-2004 11:40 AM

Mouse with Tilt Wheel
 
Hi,

has anybody outhere got the Tilt wheel of a Microsoft Wireless Optical Mouse 2.0 (and similar) to work?
I've searched and found several questions, but no answers ;)

A Tilt wheel is a scroll wheel, with which you can scroll also horizontal when you tilt it :D

Distribution should not be important, but its a SuSE 9.1 with Kernel 2.6.4 and Xfree86 4.3, maybe in some time X.org, I'll see when there's time for.

Please do not flame M$ Mouses, in Germany we say Never value a present (translated very free ;) )

Thanks,

--robe

r_jensen11 05-28-2004 04:13 PM

what do you have in your XF86Config file in the mouse section? Oh, und wo liegt die WM in 2005? In dem Nodern oder dem Sudern?

robe 05-28-2004 04:23 PM

Hi,

just the normal "Option" "ZAxismapping" "4 5".

Just saw the MS Intelli Mouse Explorer 4 thread, this one shall also have a tilt wheel...

I'm just wondering, that xev doesn't display anything when tilting....

The WM will be AFAIK all over Germany, different games, different towns ;) (or 5 games in one town or sth like that)

Thanks 4 Reply,

--Rob

r_jensen11 05-28-2004 07:06 PM

Quote:

Originally posted by robe
Hi,

just the normal "Option" "ZAxismapping" "4 5".

Just saw the MS Intelli Mouse Explorer 4 thread, this one shall also have a tilt wheel...

I'm just wondering, that xev doesn't display anything when tilting....

The WM will be AFAIK all over Germany, different games, different towns ;) (or 5 games in one town or sth like that)

Thanks 4 Reply,

--Rob

I think you must have something like "Option" "Buttons" "11", but that's only a guess. If you get X to see all the buttons and scroll buttons for your mouse, make sure you have the buttons be hotkeys if some applications don't see the function for those buttons. I remember reading about buttons on the left and right side of the Explorer mouse having to be hotkeyed to go forward and backward for history when browsing the internet.

Rob, wisst du dass Deustchland in dem erste Spiel verlieren wird? :p

-Rob

robe 05-31-2004 02:22 PM

Hi,

I didn't tried such a high numer with Buttons, just 9 or so.

I'll see what he'll do ;)

xev shall recognize something, doesn't it?

Ist eigentlich egal ;) I'm not a football junkie, just watching some games and enough :D

--rob(e)

robe 06-05-2004 09:12 AM

That was not the solution, I think MS is using some things that Linux can't handle yet...

Someone any Ideas?

alv6 06-07-2004 05:51 PM

Not in the hid driver.
 
I have looked at the issue. Turns out that the hid driver in the kernel does not have a setting to process the data to generate the event.

The following is the patch against 2.6.6 :
drivers/usb/input/hid-input.c
Code:

99d98
<
271c270,276
<
---
>                              case 0x238: //tiltwheel
>                                      usage->type = EV_REL;
>                                      usage->code = REL_HWHEEL;
>                                      bit = input->relbit;
>                                      max = REL_MAX;
>                                      //set_bit(REL_HWHEEL, bit);
>                                      break;
277c282,285
<                      } else  {
---
>                      }
>                      else if (usage->type == EV_REL) {
>                      }
>                      else  {
351a360
>

After putting this into the kernel, I have successfully produced HWHEEL RELATIVE motion events in the /dev/input/eventX.
AKA: The mouse send out -1 or 1 about 2-3 times a second. AKA it behaves as a wheel with constant speed.

You can check this yourself by looking in the /proc/bus/input/devices to which eventX the mouse is bound. Cat it. Then tilt the wheel,and you will see junk appear. Also /proc/bus/input/devices should no longer show the device bound to the keyboard interface.

However getting to work with xfree or x.org was above me. ZAxisMapping with 4 values produced no results. I tried to translate HWHEEL motions into buttons only to find that for some reason X was not even picking them up. Possibly a problem with X, or with the uinput driver only handling 7 or 8 buttons.

Anyway. Consider this mouse working, but not with X. Feel free to post your solutions to this problem.

Oh, IANAKD (Kernel Developer) so my patch may crash your system!!

robe 06-08-2004 09:35 AM

Hi,

tnkans for the hint.

Have you send your patch to the developers of X.org? Maybe they'll know what to do...

Tahnks a lot,

robe

alv6 06-08-2004 04:46 PM

Well the patch is for the kernel, and I did send it to Vojtech, who seems to maintain hid.
As expected, I got no reply, but the changes/bugs I have sent before to him and usb-devel, seemed to have partially trickled down to the codebase.

As for X.org, I am waiting for the proper InputDriver "evdev" patch. This way I will be able to use any input device in a generic way. There is a version going around, but I believe it is substandard, and I am weary of messing with X11.

The other way is to update an ExplorerPS/2 driver, which the input's mousedev driver talks, but that is even more scary to me, as that may involve "rewriting" the protocol.

joefish 09-19-2004 07:55 PM

Where in the file do I put the patched code? Or, can you provide me with a .diff file? Thanks.

robe 09-30-2004 02:04 PM

Hi,

I'm still trying to get my tilt wheel working, but still it doesn't want
to ;)
I patched my X.org with the 9000_all_6.7.99.2-lnx-evdev-core-v2.patch
and the 9002_all_6.7.0-lnx-evdev-mouse.patch, edited my X.org Config to
this:

Section "InputDevice"
Driver "mouse"
Identifier "Mouse[1]"
Option "Device" "/dev/input/event2"
Option "Emulate3Buttons" "off"
#Option "ButtonNumber" "7"
Option "Name" "Autodetection"
Option "Protocol" "evdev"
Option "Vendor" "Sysp"
Option "ZAxisMapping" "4 5 6 7"
Option "Resolution" "400"
Option "Dev Name" "*Microsoft*"
EndSection

but xev doesn't show up anything for the tilt wheel, the normal Mouse
Functions are alright.
When I run evtest /dev/input/event2 I get some events generated by the
tilt wheel, but them too are not specified:


# evtest /dev/input/event2
Input driver version is 1.0.0
Input device ID: bus 0x3 vendor 0x45e product 0x8c version 0x57
Input device name: "Microsoft Microsoft Wireless Optical Mouse� 1.0A"
Supported events:
Event type 0 (Reset)
Event code 0 (Reset)
Event code 1 (Key)
Event code 2 (Relative)
Event code 3 (Absolute)
Event code 20 (Repeat)
Event type 1 (Key)
Event code 240 (?)
Event code 241 (?)
Event code 256 (Btn0)
Event code 257 (Btn1)
Event code 272 (LeftBtn)
Event code 273 (RightBtn)
Event code 274 (MiddleBtn)
Event code 275 (SideBtn)
Event code 276 (ExtraBtn)
Event type 2 (Relative)
Event code 0 (X)
Event code 1 (Y)
Event code 8 (Wheel)
Event type 3 (Absolute)
Event code 40 (?)
Value 0
Min 0
Max 1
Event code 41 (?)
Value 0
Min 0
Max 3
Event code 42 (?)
Value 0
Min 0
Max 3
Event code 43 (?)
Value 0
Min 0
Max 3
Event type 20 (Repeat)
Testing ... (interrupt to exit)
Event: time 1096475340.197749, type 1 (Key), code 240 (?), value -1
Event: time 1096475340.197755, type 1 (Key), code 240 (?), value 0
Event: time 1096475340.197757, type 0 (Reset), code 0 (Reset), value 0
Event: time 1096475341.717492, type 1 (Key), code 240 (?), value 1
Event: time 1096475341.717498, type 1 (Key), code 240 (?), value 0
Event: time 1096475341.717500, type 0 (Reset), code 0 (Reset), value 0

The information about the Wireless Optical Mouse� 1.0A is not right, its
a 2.0, is that relevant?
Hope I just did anything wrong, I really like the tilt wheel....

I posted it to the xorg list, but they dont want to answer me, just dunno....

Thanks,

robe

Ryuta NAKANISHI 10-14-2004 10:35 AM

I'm using tiltwheel mouse (Logitech/Microsoft) in Linux 2.6 and XFree86 4.3.
patch is here (in JAPANESE).
http://www.t12.jp/~ryuta/misclab/debian/tiltmouse.html

case 1:
Apply this patch to kernel.
http://www.t12.jp/~ryuta/misclab/deb...ux-2.6.7.patch
and, apply this patch to XFree86 4.3
http://bugs.gentoo.org/show_bug.cgi?id=29953
Debian's XFree86 4.3, already applied this patch. So, nothing to do with XFree86.

case 2:
Apply the two pacth to Linux kernel.
http://www.t12.jp/~ryuta/misclab/deb...ux-2.6.7.patch
and
http://www.t12.jp/~ryuta/misclab/deb...ux-2.6.7.patch
No need to patch XFree86.

Sorry, my buggy English,
ryuta

robe 10-15-2004 03:22 PM

Hi,

big thanks for the Patch!

I applied it, but there's no change...

I used a Vanilla Kernel from kernel.org, 2.6.7, used the hidinput-tiltwheel-quirk-for-linux-2.6.7.patch, my Xorg was already patched with the evdev thing.

But still xev displays nothing. Is there a way to debug and see if the patch is right?

What confuses me, is, that the patch is in 2 parts rejected, but these patrts do not look very important...:

Code:

robert:/usr/src/linux # patch -p1 -R < hidinput-tiltwheel-quirk-for-linux-2.6.7.
patch
patching file drivers/usb/input/hid-core.c
patching file drivers/usb/input/hid-input.c
Hunk #1 FAILED at 1.
1 out of 3 hunks FAILED -- saving rejects to file drivers/usb/input/hid-input.c.
rej
patching file drivers/usb/input/hid.h
Hunk #1 FAILED at 2.
1 out of 2 hunks FAILED -- saving rejects to file drivers/usb/input/hid.h.rej
robert:/usr/src/linux # patch -p1 < hidinput-tiltwheel-quirk-for-linux-2.6.7.pat
ch
patching file drivers/usb/input/hid-core.c
patching file drivers/usb/input/hid-input.c
Hunk #1 FAILED at 1.
1 out of 3 hunks FAILED -- saving rejects to file drivers/usb/input/hid-input.c.
rej
patching file drivers/usb/input/hid.h
Hunk #1 FAILED at 2.
1 out of 2 hunks FAILED -- saving rejects to file drivers/usb/input/hid.h.rej


robert:/usr/src/linux # cat drivers/usb/input/hid-input.c.rej
***************
*** 1,5 ****
  /*
-  * $Id: hidinput-tiltwheel-quirk-for-linux-2.6.7.patch,v 1.1 2004/08/30 15:08:
38 ryuta Exp $
  *
  *  Copyright (c) 2000-2001 Vojtech Pavlik
  *
--- 1,5 ----
  /*
+  * $Id: hidinput-tiltwheel-quirk-for-linux-2.6.7.patch,v 1.1 2004/08/30 15:08:
38 ryuta Exp $
  *
  *  Copyright (c) 2000-2001 Vojtech Pavlik
  *


robert:/usr/src/linux # cat drivers/usb/input/hid.h.rej
***************
*** 2,8 ****
  #define __HID_H
 
  /*
-  * $Id: hidinput-tiltwheel-quirk-for-linux-2.6.7.patch,v 1.1 2004/08/30 15:08:38 ryuta Exp $
  *
  *  Copyright (c) 1999 Andreas Gal
  *  Copyright (c) 2000-2001 Vojtech Pavlik
--- 2,8 ----
  #define __HID_H
 
  /*
+  * $Id: hidinput-tiltwheel-quirk-for-linux-2.6.7.patch,v 1.1 2004/08/30 15:08:38 ryuta Exp $
  *
  *  Copyright (c) 1999 Andreas Gal
  *  Copyright (c) 2000-2001 Vojtech Pavlik

Hope you can do something with the Output...

Many Thanks,

Robe

robe 10-15-2004 04:48 PM

Just recognized something: The Kernel could not interprete Scancode of the Tilt Wheel and generates a kernel: keyboard.c: can't emulate rawmode for keycode 240. I'm really f**ked up with this wheel....

Anyone any Ideas?

I'm sure the solution is so easy, that I will die when I hear it...

robe

coolersites 02-17-2005 01:13 AM

Progress on MS Optical Mouse 2.0
 
Just wondering if anyone has made progress and can say that this mouse can be made to work?

It is possible for this mouse to work if you just give up on tilt-wheel functions?

-Aaron


All times are GMT -5. The time now is 07:45 PM.