espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.51k stars 7.26k forks source link

usb hid device barcode scanner can not use (IDFGH-12350) #13381

Closed yel-best closed 7 months ago

yel-best commented 7 months ago

Answers checklist.

General issue report

image

I'm using this example https://github.com/espressif/esp-idf/tree/master/examples/peripherals/usb/host/hid

Please tell me some ways or reasons,thanks

Through another project, usb_host_lib, the parameters of the scanning gun I am currently using are read as follows:

I (13615) CLASS: Opening device at address 1
I (13615) CLASS: Getting device information
I (13615) CLASS:        Full speed
I (13615) CLASS:        bConfigurationValue 1
I (13615) CLASS: Getting device descriptor
*** Device descriptor ***
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0x0
bDeviceSubClass 0x0
bDeviceProtocol 0x0
bMaxPacketSize0 64
idVendor 0x218
idProduct 0x210
bcdDevice 0.00
iManufacturer 1
iProduct 2
iSerialNumber 3
bNumConfigurations 1
I (13645) CLASS: Getting config descriptor
*** Configuration descriptor ***
bLength 9
bDescriptorType 2
wTotalLength 34
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
bMaxPower 400mA
        *** Interface descriptor ***
        bLength 9
        bDescriptorType 4
        bInterfaceNumber 0
        bAlternateSetting 0
        bNumEndpoints 1
        bInterfaceClass 0x3
        bInterfaceSubClass 0x1
        bInterfaceProtocol 0x1
        iInterface 0
                *** Endpoint descriptor ***
                bLength 7
                bDescriptorType 5
                bEndpointAddress 0x83   EP 3 IN
                bmAttributes 0x3        INT
                wMaxPacketSize 8
                bInterval 1
I (13695) CLASS: Getting Manufacturer string descriptor
USBScn Chip
I (13705) CLASS: Getting Product string descriptor
USBScn Module$
I (13715) CLASS: Getting Serial Number string descriptor
2027300413413333
peter-marcisovsky commented 7 months ago

Closing the issue due to the duplicity. The same issue has been opened and is being solved in the espressif/esp-usb https://github.com/espressif/esp-usb/issues/26

yel-best commented 7 months ago

Closing the issue due to the duplicity. The same issue has been opened and is being solved in the espressif/esp-usb espressif/esp-usb#26

Thank you for your reply. Yes, you are right. I submitted this question repeatedly because I was really troubled. I hope you can understand. Thanks again.