Logitech mouse: where is the scroll wheel HID event/report? - Page 1
Forum section: electronics / projects

author: sraposo
author_rank: Newbie
timestamp: November 12, 2024, 11:48:00 am
content: Hi!That's a matter related to USB/HID, I believe, not a SoC/MCU-specific.I am working in a ESP32-S3-base project and I've just faced a weird situation: an USB Logitech mouse, that fully works when connected to a PC, does not send any byte related to scroll wheel. Input report contains only 3 bytes: 1 for buttons (including the scroll wheel switch), other for horizontal movement and the last for vertical direction. None of them present any variation when scroll wheel is spun.Another mouse, brand Knup, has a 4-byte input report, where the 4th byte is dedicated to the (vertical) scroll wheel movement.I could not get any (especial) event when scroll wheel is rolled, even considering non-mouse interface, as if this feature was not present.It's clear there's something particular about Logitech mouse. I'm wondering if mouse driver sends some output report to the mouse in order to instruct it to deliver some data related the the scroll wheel. Only guessing...Can anybody point me some direction?

author: Someone
author_rank: Super Contributor
timestamp: November 13, 2024, 01:30:24 am
content: Look at the full enumeration tree when it is connected to a computer. Mice and Keyboards these days use multiple "devices" to produce their rich functionality. Some smaller host is not utilising all the endpoints (and/or misses drivers for them).

author: sraposo
author_rank: Newbie
timestamp: November 13, 2024, 11:18:00 am
content: Hi!I had already used MS' USBView and nothing useful was detected.I used Device Monitoring Studio (free version) to sniff USB packets and I could discover that Logitech mouse has also a forth byte in input report to inform scroll wheel action, like the other mouse! I suppose Logitech mouse driver did some modification.Below, I transcript USBView report of both mice:Knup Mouse :----------------- : USB input deviceIs Port User Connectable: yesIs Port Debug Capable: noCompanion Port Number: 16Companion Hub Symbolic Link Name: USB#ROOT_HUB30#4&1ed8c4ae&0&0#{f18a0e88-c30c-11d0-8815-00a0c906bed8}Protocols Supported:USB 1.1: yesUSB 2.0: yesUSB 3.0: noDevice Power State: PowerDeviceD0---===>Device Information<===---English product name: "Usb Mouse"ConnectionStatus:Current Config Value: 0x01 -> Device Bus Speed: LowDevice Address: 0x02Open Pipes: 1===>Device Descriptor<===bLength: 0x12bDescriptorType: 0x01bcdUSB: 0x0110bDeviceClass: 0x00 -> This is an Interface Class Defined DevicebDeviceSubClass: 0x00bDeviceProtocol: 0x00bMaxPacketSize0: 0x08 = (BytesidVendor: 0x1C4F = Beijing Sigmachip Co., Ltd.idProduct: 0x0034bcdDevice: 0x0110iManufacturer: 0x01English (United States) "SIGMACHIP"iProduct: 0x02English (United States) "Usb Mouse"iSerialNumber: 0x00bNumConfigurations: 0x01---===>Open Pipes<===---===>Endpoint Descriptor<===bLength: 0x07bDescriptorType: 0x05bEndpointAddress: 0x81 -> Direction: IN - EndpointID: 1bmAttributes: 0x03 -> Interrupt Transfer TypewMaxPacketSize: 0x0004bInterval: 0x0A---===>Full Configuration Descriptor<===---===>Configuration Descriptor<===bLength: 0x09bDescriptorType: 0x02wTotalLength: 0x0022 -> ValidatedbNumInterfaces: 0x01bConfigurationValue: 0x01iConfiguration: 0x00bmAttributes: 0xA0 -> Bus Powered-> Remote WakeupMaxPower: 0x32 = 100 mA===>Interface Descriptor<===bLength: 0x09bDescriptorType: 0x04bInterfaceNumber: 0x00bAlternateSetting: 0x00bNumEndpoints: 0x01bInterfaceClass: 0x03 -> HID Interface ClassbInterfaceSubClass: 0x01bInterfaceProtocol: 0x02iInterface: 0x00===>HID Descriptor<===bLength: 0x09bDescriptorType: 0x21bcdHID: 0x0110bCountryCode: 0x00bNumDescriptors: 0x01bDescriptorType: 0x22 (Report Descriptor)wDescriptorLength: 0x0034===>Endpoint Descriptor<===bLength: 0x07bDescriptorType: 0x05bEndpointAddress: 0x81 -> Direction: IN - EndpointID: 1bmAttributes: 0x03 -> Interrupt Transfer TypewMaxPacketSize: 0x0004bInterval: 0x0ALogitech mouse:-------------------- : USB input deviceIs Port User Connectable: yesIs Port Debug Capable: noCompanion Port Number: 17Companion Hub Symbolic Link Name: USB#ROOT_HUB30#4&1ed8c4ae&0&0#{f18a0e88-c30c-11d0-8815-00a0c906bed8}Protocols Supported:USB 1.1: yesUSB 2.0: yesUSB 3.0: noDevice Power State: PowerDeviceD0---===>Device Information<===---English product name: "USB Optical Mouse"ConnectionStatus:Current Config Value: 0x01 -> Device Bus Speed: LowDevice Address: 0x03Open Pipes: 1===>Device Descriptor<===bLength: 0x12bDescriptorType: 0x01bcdUSB: 0x0200bDeviceClass: 0x00 -> This is an Interface Class Defined DevicebDeviceSubClass: 0x00bDeviceProtocol: 0x00bMaxPacketSize0: 0x08 = (BytesidVendor: 0x046D = Logitech Inc.idProduct: 0xC077bcdDevice: 0x7200iManufacturer: 0x01English (United States) "Logitech"iProduct: 0x02English (United States) "USB Optical Mouse"iSerialNumber: 0x00bNumConfigurations: 0x01---===>Open Pipes<===---===>Endpoint Descriptor<===bLength: 0x07bDescriptorType: 0x05bEndpointAddress: 0x81 -> Direction: IN - EndpointID: 1bmAttributes: 0x03 -> Interrupt Transfer TypewMaxPacketSize: 0x0004bInterval: 0x0A---===>Full Configuration Descriptor<===---===>Configuration Descriptor<===bLength: 0x09bDescriptorType: 0x02wTotalLength: 0x0022 -> ValidatedbNumInterfaces: 0x01bConfigurationValue: 0x01iConfiguration: 0x00bmAttributes: 0xA0 -> Bus Powered-> Remote WakeupMaxPower: 0x32 = 100 mA===>Interface Descriptor<===bLength: 0x09bDescriptorType: 0x04bInterfaceNumber: 0x00bAlternateSetting: 0x00bNumEndpoints: 0x01bInterfaceClass: 0x03 -> HID Interface ClassbInterfaceSubClass: 0x01bInterfaceProtocol: 0x02iInterface: 0x00===>HID Descriptor<===bLength: 0x09bDescriptorType: 0x21bcdHID: 0x0111bCountryCode: 0x00bNumDescriptors: 0x01bDescriptorType: 0x22 (Report Descriptor)wDescriptorLength: 0x002E===>Endpoint Descriptor<===bLength: 0x07bDescriptorType: 0x05bEndpointAddress: 0x81 -> Direction: IN - EndpointID: 1bmAttributes: 0x03 -> Interrupt Transfer TypewMaxPacketSize: 0x0004bInterval: 0x0A