Cordless Mouse - combo Keyboard/mouse

charlysquare_at_altern.org
Date: 04/01/04

  • Next message: Adam McLaurin: "Help tracking down a naughty process"
    Date: Thu, 1 Apr 2004 00:09:48 +0200 (CEST)
    To: freebsd-questions@FreeBSD.org
    
    

    Hi

    I've got a Cordless combo Mouse/keyboard Memorex RF7000, my keyboard is detected, but the mouse don't want to move.. i've tested it under knoppix or windows, and it works ! but under FreeBSD 5.2, i can't manage to move the cursor..

    I've been helped by others 'til now, here is what they adviced me :

    1. ----------------------------------------------
    -------------------------------------------------

    I use the following hack with a wireless Fujitsu-Siemens USB kbd+mouse
    here, maybe that helps..

    Index: hid.c
    ===================================================================
      u_long
      hid_get_data(u_char *buf, struct hid_location *loc)
      {
    - u_int hpos = loc->pos;
    + u_int hpos = loc->pos - 40;;
             u_int hsize = loc->size;
             u_int32_t data;
             int i, s;

    Index: ums.c
    ===================================================================
                     ret = UMATCH_NONE;

             free(desc, M_TEMP);
    - return (ret);
    + return (UMATCH_IFACECLASS);
      }

      USB_ATTACH(ums)

    2. ----------------------------------------------
    -------------------------------------------------

    me> dmesg | grep ums return ums0 so this is good
    me> ps ax|grep moused return :
    me> /usr/sbin/moused -p /dev/ums0 so this is great.. me>but...the mouse is not moving at all...

    OK, then back out this part of the patch, that might not be needed for
    your mouse (mine has several buttons and wheels and what not :) )

    > > hid_get_data(u_char *buf, struct hid_location *loc)
    > > {
    > > - u_int hpos = loc->pos;
    > > + u_int hpos = loc->pos - 40;;
    > > u_int hsize = loc->size;
    > > u_int32_t data;
    > > int i, s;
    > >

    3. ----------------------------------------------
    -------------------------------------------------

    me> I've rebuild my kernel, but the cursor is not moving...

    Hmm then the mouse is probably using a new variation of the protocol
    (mine does hence the first patch). I guess that will need further
    investigation to find out how it sends its position info, there are some
      debugging code in there that can be of use, but if you are not a
    programmer it will probably be a bit difficult todo...

    4. ----------------------------------------------
    -------------------------------------------------

    I used the below patch to find out how the position info looked
    from my mouse/kbd combo, use it with debug defined in ums.c.
    Looking at the output when moving the mouse might help you to find out
    what your does.

    Hope that helps you further along...

    Index: ums.c
    ===================================================================

      #define UMS_BUT(i) ((i) < 3 ? (((i) + 2) % 3) : (i))

             DPRINTFN(5, ("ums_intr: sc=%p status=%d\\\\n", sc, status));
    - DPRINTFN(5, ("ums_intr: data = %02x %02x %02x\\\\n",
    - sc->sc_ibuf[0], sc->sc_ibuf[1], sc->sc_ibuf[2]));
    + DPRINTFN(5, ("ums_intr: data = "));
    + for (i=0; i<sc->sc_isize; i++)
    + DPRINTFN(5, ("%02x ", sc->sc_ibuf[i]));
    + DPRINTFN(5, ("\\\\n"));

             if (status == USBD_CANCELLED)
                     return;

    ---------------------------------------------------------
    --------->>>> at this point, i didn't know where to search to find the mouse position...

    So i saw another solution :

    1/first i build my kernel back to the original configuration except the first modification in ums.c that Soren Schmidt adviced me (it enables moused)

    2/i added #define USB_DEBUG to src/sys/dev/usb/usb.h, (as said in http://lists.freebsd.org/pipermail/freebsd-current/2004-January/018057.html)
    then i rebuild & reinstall my kernel.

    3/i did that : sysctl hw.usb.ums.debug=15, and (re)attach the USB device.

    4/ the resulting "ums_attach:..." messages from dmesg here :

    ukbd0: BTC USB Multimedia Cordless Kit, rev 1.10/1.30, addr 2, iclass 3/1
    kdb0 at ukbd0
    ums0: BTC USB Multimedia Cordless Kit, rev 1.10/1.30, addr 2, iclass 3/1
    ums_attach: bLength=7 bDescriptorType=5 bEndpointAddress=2-in bmAttributes=3 wMaxPacketSize=6 bInterval=14
    ums0: 5 buttons and Z dir.
    ums_attach: sc=0xc68bac00
    ums_attach: X 80/8
    ums_attach: Y 88/8
    ums_attach: Z 96/8
    ums_attach: B1 72/1
    ums_attach: B2 73/1
    ums_attach: B3--74/1--------------------------------
    ums_attach: B4 75/1
    ums_attach: B5 76/1
    ums_attach: size=14, id=4

    ------------

    killall -9 moused
    ums_intr: sc=0xc68bac00 status=6
    ums_intr: data = db 39 39

    ----
    cat /dev/ums0
    ums_intr: x:0 y:0 z:0 buttons:0x0
    ums_intr: sc=0xc68bac00 status=6
    ums_intr: data = 04 00 00
    ums_intr: data = 10 02 05 f3 c0 a8 01 01 00 00 00 00 00 00
    with cat /dev/ums0 
    click on the top_right button :
    ums_intr: data: 04 02 00 00 00 a8 01 01 00 00 00 00 00 00
    click on the top_left button :
    ums_intr: data: 04 01 fe ff 00 a8 01 01 00 00 00 00 00 00
    click on the side_right button :
    ums_intr: data: 04 10 fe ff 00 a8 01 01 00 00 00 00 00 00
    click on the side_left button :
    ums_intr: data: 04 08 fe ff 00 a8 01 01 00 00 00 00 00 00
    click on the wheel :
    ums_intr: data: 04 04 00 00 00 a8 01 01 00 00 00 00 00 00
    rolling up the wheel:
    ums_intr: data: 04 00 00 00 01 a8 01 01 00 00 00 00 00 00
    rolling down the wheel:
    ums_intr: data: 04 00 00 00 ff a8 01 01 00 00 00 00 00 00
    moving the mouse :
    ums_intr: data: 04 00 fe ff 00 a8 01 01 00 00 00 00 00 00
    ums_intr: data: 04 00 ff fe 00 a8 01 01 00 00 00 00 00 00
    ums_intr: data: 04 00 02 ff 00 a8 01 01 00 00 00 00 00 00
    ums_intr: data: 04 00 05 ff <-- those are changing, etc..
    ----------------
    Right now, i can't find my mouse position, and i don't know what to do to progress...
    Could you help me please ?
    Many thanks
    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
    

  • Next message: Adam McLaurin: "Help tracking down a naughty process"

    Relevant Pages

    • Re: Ferrari rim lips
      ... Which is not to say that 3.15 should not be applied but as has been pointed out by me and others, 3.15 /could/ be applied to a lot of moving parts of the car but isn't for common sense reasons or convention, so it would be unlikely that the FIA would apply it while only Ferrari have them. ... The most likely outcome is that all the other teams produce their own version and *then* the FIA bans it as a moveable aero device. ... This is not true for the wheel rims. ... The aerodynamics of a rotating wheel are the same as a stationary wheel? ...
      (rec.autos.sport.f1)
    • logitech mouseMan wheel doesnt work with 2.6.5
      ... I guess it would be the same with stock 2.6.5) the mouse wheel and side ... what it gets from kernel driver - using xev I found that it thinks the ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • KVM & mouse wheel
      ... A few months ago I posted about problems with 2.6 kernel, ... synaptics_detect hoses imps and exps detection. ... Wheel works, I haven't tried ... I don't understand what this code is trying to check or why the protocol ...
      (Linux-Kernel)
    • Re: KVM + 2.6 + mouse wheel (is it ever going to be fixed?)
      ... I am pretty sure it is a 2.6 kernel issue since 2.4 kernel works just fine. ... I don't consider de-activating wheel and any other features as a solution ... of my Logitech trackball's scrollwheel and my KVM switch. ... support the Logitech protocol, ...
      (Fedora)
    • KVM ps mouse wheel problems
      ... I have a 2.6.9 kernel for a computer I put ... supplied USB to ps/2 converter), with the miniview KVM switch connected ... and the wheel mouse stops functioning. ...
      (Linux-Kernel)