mcuee / libusbk

libusbk official github repo
83 stars 39 forks source link

kList hangs Mi Wireless Mouse with libusb0.sys filter driver attached to the USB receiver #45

Open mcuee opened 1 year ago

mcuee commented 1 year ago

Device: Mi Bluetooth/Wireless dual mode Wireless Mouse, with USB receiver, so working as a USB wireless mouse Driver: libusb0.sys 1.2.7.3 filter driver attached to the USB receiver Windows 10 64bit

kList works fine, but then the mouse will not work after running KList. I need to remove the filter driver in order for the mouse to work again.

C:\libusbK-dev-kit> .\kList.exe

Loading USB ID's maintained by Stephen J. Gowdy <linux.usb.ids@gmail.com>..

 1. USB Serial Converter (FTDI) [Connected]
    Service              : FTDIBUS
    ClassGUID            : {36FC9E60-C465-11CF-8056-444553540000}
    DeviceID             : USB\VID_0403&PID_6001\FTDCRPIE
    DeviceInterfaceGUID  : {F9F3FF14-AE21-48A0-8A25-8011A7A931D9}
    SymbolicLink         : \\?\usb#vid_0403&pid_6001#ftdcrpie#{f9f3ff14-ae21-48a0-8a25-8011a7a931d9}
    DevicePath           : \\.\libusb0-0001
    SerialNumber         : FTDCRPIE
    BusNumber            : 0
    DeviceAddress        : 2

 2. USB Input Device ((Standard system devices)) [Connected]
    Service              : HidUsb
    ClassGUID            : {745A17A0-74D3-11D0-B6FE-00A0C90F57DA}
    DeviceID             : USB\VID_2717&PID_5013\5&E9F3E45&0&1
    DeviceInterfaceGUID  : {F9F3FF14-AE21-48A0-8A25-8011A7A931D9}
    SymbolicLink         : \\?\usb#vid_2717&pid_5013#5&e9f3e45&0&1#{f9f3ff14-ae21-48a0-8a25-8011a7a931d9}
    DevicePath           : \\.\libusb0-0002
    SerialNumber         : 5&E9F3E45&0&1
    BusNumber            : 0
    DeviceAddress        : 1

Select device (1-2) :2

Loading driver api..
Getting descriptors..

-Device:
  bLength             :18
  bDescriptorType     :0x01
  bcdUSB              :0x0110
  bDeviceClass        :0x00 (Defined at Interface level)
  bDeviceSubClass     :0x00
  bDeviceProtocol     :0x00
  bMaxPacketSize0     :64
  idVendor            :0x2717 (Xiaomi Inc.)
  idProduct           :0x5013
  bcdDevice           :0x0625
  iManufacturer       :1 (MI)
  iProduct            :2 (Mi Wireless Mouse)
  iSerialNumber       :0
  bNumConfigurations  :1
!End Device
-Configuration:
  bLength             :9
  bDescriptorType     :0x02
  wTotalLength        :34
  bNumInterfaces      :1
  bConfigurationValue :0x01
  iConfiguration      :0
  bmAttributes        :0xA0 (Self-Powered)
  MaxPower            :50 (100ma)
 -Interface:
    bLength             :9
    bDescriptorType     :0x04
    bInterfaceNumber    :0x00
    bAlternateSetting   :0x00
    bNumEndpoints       :1
    bInterfaceClass     :0x03 (Human Interface Device)
    bInterfaceSubClass  :0x01 (Boot Interface Subclass)
    bInterfaceProtocol  :0x02 (Mouse)
    iInterface          :0
   -Hid:
      bLength             :9
      bDescriptorType     :0x21
      bcdHID              :0x0110
      bCountry            :0x00 (Not supported)
      bNumDescriptors     :1
     -Report:
        bReportType         :0x22
        wReportLength       :215
        Usage Page          :0x01 (Generic Desktop Controls)
        Usage               :0x002 (Mouse)
       *Collection            :0x01 (Application)
          Usage               :0x001 (Pointer)
         *Collection            :0x00 (Physical)
            Report ID           :0x01
            Usage Page          :0x09 (Buttons)
            Usage Minimum       :0x01
            Usage Maximum       :0x05
            Logical Minimum     :0x00
            Logical Maximum     :0x01
            Report Count        :0x05
            Report Size         :0x01
            Input               :0x02
            Report Count        :0x01
            Report Size         :0x03
            Input               :0x01
            Usage Page          :0x01 (Generic Desktop Controls)
            Usage               :0x030 (Direction-X)
            Usage               :0x031 (Direction-Y)
            Logical Minimum     :0x8000
            Logical Maximum     :0x7FFF
            Report Size         :0x10
            Report Count        :0x02
            Input               :0x06
         !End Collection
         *Collection            :0x00 (Physical)
            Usage Page          :0x01 (Generic Desktop Controls)
            Usage               :0x038 (Wheel)
            Logical Minimum     :0x81
            Logical Maximum     :0x7F
            Report Size         :0x08
            Report Count        :0x01
            Input               :0x06
         !End Collection
         *Collection            :0x00 (Physical)
            Usage Page          :0x0C (Consumer)
            Usage               :0x238 (AC Pan)
            Report Count        :0x01
            Report Size         :0x08
            Logical Minimum     :0x81
            Logical Maximum     :0x7F
            Input               :0x06
         !End Collection
       !End Collection
        Usage Page          :0xFF01 (Generic Desktop Controls)
        Usage               :0x000 (Undefined)
       *Collection            :0x01 (Application)
          Report ID           :0x02
          Usage               :0x000 (Undefined)
          Logical Minimum     :0x00
          Logical Maximum     :0x00FF
          Report Size         :0x08
          Report Count        :0x07
          Input               :0x02
       !End Collection
        Usage Page          :0x0C (Consumer)
        Usage               :0x001 (Consumer Control)
       *Collection            :0x01 (Application)
          Report ID           :0x05
          Logical Minimum     :0x00
          Logical Maximum     :0x023C
          Usage Minimum       :0x00
          Usage Maximum       :0x023C
          Report Size         :0x10
          Report Count        :0x01
          Input               :0x00
       !End Collection
        Usage Page          :0x01 (Generic Desktop Controls)
        Usage               :0x080 (System Control)
       *Collection            :0x01 (Application)
          Report ID           :0x03
          Usage Minimum       :0x81
          Usage Maximum       :0x83
          Logical Minimum     :0x00
          Logical Maximum     :0x01
          Report Count        :0x03
          Report Size         :0x01
          Input               :0x02
          Report Count        :0x01
          Report Size         :0x05
          Input               :0x01
       !End Collection
        Usage Page          :0xFFBC
        Usage               :0x88
       *Collection            :0x01 (Application)
          Report ID           :0x04
          Report Count        :0x01
          Report Size         :0x08
          Logical Minimum     :0x00
          Logical Maximum     :0x00FF
          Usage Minimum       :0x00
          Usage Maximum       :0x00FF
          Input               :0x00
       !End Collection
        Usage Page          :0xFF02 (Simulation Controls)
        Usage               :0x002 (Automobile Simulation Device)
       *Collection            :0x01 (Application)
          Report ID           :0x06
          Usage               :0x002 (Automobile Simulation Device)
          Logical Minimum     :0x00
          Logical Maximum     :0x00FF
          Report Size         :0x08
          Report Count        :0x07
          Feature             :0x02
       !End Collection
     !End Report
   !End Hid
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x81
      bmAttributes        :0x03 (Interrupt)
      wMaxPacketSize      :8
      bInterval           :0x02
   !End Interface
 !End Configuration
mcuee commented 1 year ago

Relevant discussion here.

This may be a libusb0.sys filter driver issue with the paticular device. Take note there is no gurantee that libusb0.sys device filter (which functions as a upper filter) will work for all the USB devices.