EEVblog Electronics Community Forum
Electronics => Projects, Designs, and Technical Stuff => Topic started by: sraposo on November 12, 2024, 11:48:00 am
-
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?
-
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).
-
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 :
-----------------
[Port1] : USB input device
Is Port User Connectable: yes
Is Port Debug Capable: no
Companion Port Number: 16
Companion Hub Symbolic Link Name: USB#ROOT_HUB30#4&1ed8c4ae&0&0#{f18a0e88-c30c-11d0-8815-00a0c906bed8}
Protocols Supported:
USB 1.1: yes
USB 2.0: yes
USB 3.0: no
Device Power State: PowerDeviceD0
---===>Device Information<===---
English product name: "Usb Mouse"
ConnectionStatus:
Current Config Value: 0x01 -> Device Bus Speed: Low
Device Address: 0x02
Open Pipes: 1
===>Device Descriptor<===
bLength: 0x12
bDescriptorType: 0x01
bcdUSB: 0x0110
bDeviceClass: 0x00 -> This is an Interface Class Defined Device
bDeviceSubClass: 0x00
bDeviceProtocol: 0x00
bMaxPacketSize0: 0x08 = (8) Bytes
idVendor: 0x1C4F = Beijing Sigmachip Co., Ltd.
idProduct: 0x0034
bcdDevice: 0x0110
iManufacturer: 0x01
English (United States) "SIGMACHIP"
iProduct: 0x02
English (United States) "Usb Mouse"
iSerialNumber: 0x00
bNumConfigurations: 0x01
---===>Open Pipes<===---
===>Endpoint Descriptor<===
bLength: 0x07
bDescriptorType: 0x05
bEndpointAddress: 0x81 -> Direction: IN - EndpointID: 1
bmAttributes: 0x03 -> Interrupt Transfer Type
wMaxPacketSize: 0x0004
bInterval: 0x0A
---===>Full Configuration Descriptor<===---
===>Configuration Descriptor<===
bLength: 0x09
bDescriptorType: 0x02
wTotalLength: 0x0022 -> Validated
bNumInterfaces: 0x01
bConfigurationValue: 0x01
iConfiguration: 0x00
bmAttributes: 0xA0 -> Bus Powered
-> Remote Wakeup
MaxPower: 0x32 = 100 mA
===>Interface Descriptor<===
bLength: 0x09
bDescriptorType: 0x04
bInterfaceNumber: 0x00
bAlternateSetting: 0x00
bNumEndpoints: 0x01
bInterfaceClass: 0x03 -> HID Interface Class
bInterfaceSubClass: 0x01
bInterfaceProtocol: 0x02
iInterface: 0x00
===>HID Descriptor<===
bLength: 0x09
bDescriptorType: 0x21
bcdHID: 0x0110
bCountryCode: 0x00
bNumDescriptors: 0x01
bDescriptorType: 0x22 (Report Descriptor)
wDescriptorLength: 0x0034
===>Endpoint Descriptor<===
bLength: 0x07
bDescriptorType: 0x05
bEndpointAddress: 0x81 -> Direction: IN - EndpointID: 1
bmAttributes: 0x03 -> Interrupt Transfer Type
wMaxPacketSize: 0x0004
bInterval: 0x0A
Logitech mouse:
--------------------
[Port2] : USB input device
Is Port User Connectable: yes
Is Port Debug Capable: no
Companion Port Number: 17
Companion Hub Symbolic Link Name: USB#ROOT_HUB30#4&1ed8c4ae&0&0#{f18a0e88-c30c-11d0-8815-00a0c906bed8}
Protocols Supported:
USB 1.1: yes
USB 2.0: yes
USB 3.0: no
Device Power State: PowerDeviceD0
---===>Device Information<===---
English product name: "USB Optical Mouse"
ConnectionStatus:
Current Config Value: 0x01 -> Device Bus Speed: Low
Device Address: 0x03
Open Pipes: 1
===>Device Descriptor<===
bLength: 0x12
bDescriptorType: 0x01
bcdUSB: 0x0200
bDeviceClass: 0x00 -> This is an Interface Class Defined Device
bDeviceSubClass: 0x00
bDeviceProtocol: 0x00
bMaxPacketSize0: 0x08 = (8) Bytes
idVendor: 0x046D = Logitech Inc.
idProduct: 0xC077
bcdDevice: 0x7200
iManufacturer: 0x01
English (United States) "Logitech"
iProduct: 0x02
English (United States) "USB Optical Mouse"
iSerialNumber: 0x00
bNumConfigurations: 0x01
---===>Open Pipes<===---
===>Endpoint Descriptor<===
bLength: 0x07
bDescriptorType: 0x05
bEndpointAddress: 0x81 -> Direction: IN - EndpointID: 1
bmAttributes: 0x03 -> Interrupt Transfer Type
wMaxPacketSize: 0x0004
bInterval: 0x0A
---===>Full Configuration Descriptor<===---
===>Configuration Descriptor<===
bLength: 0x09
bDescriptorType: 0x02
wTotalLength: 0x0022 -> Validated
bNumInterfaces: 0x01
bConfigurationValue: 0x01
iConfiguration: 0x00
bmAttributes: 0xA0 -> Bus Powered
-> Remote Wakeup
MaxPower: 0x32 = 100 mA
===>Interface Descriptor<===
bLength: 0x09
bDescriptorType: 0x04
bInterfaceNumber: 0x00
bAlternateSetting: 0x00
bNumEndpoints: 0x01
bInterfaceClass: 0x03 -> HID Interface Class
bInterfaceSubClass: 0x01
bInterfaceProtocol: 0x02
iInterface: 0x00
===>HID Descriptor<===
bLength: 0x09
bDescriptorType: 0x21
bcdHID: 0x0111
bCountryCode: 0x00
bNumDescriptors: 0x01
bDescriptorType: 0x22 (Report Descriptor)
wDescriptorLength: 0x002E
===>Endpoint Descriptor<===
bLength: 0x07
bDescriptorType: 0x05
bEndpointAddress: 0x81 -> Direction: IN - EndpointID: 1
bmAttributes: 0x03 -> Interrupt Transfer Type
wMaxPacketSize: 0x0004
bInterval: 0x0A