Skip to main content
Visitor II
May 3, 2021
Question

USB string descriptor modification

  • May 3, 2021
  • 6 replies
  • 1589 views

Hi All,

I practice an HID USB project at windows 10 with NUCLEO-F303ZE. And I initiated a project by STM32CUBEIDE and STM32CUBE. I alsp can get enumeration of connecting procedure so far so good. My project has a request which needs to response string descriptor 0xEE. Because I found if the host sends 80 60 EE 03 00 00 12 00, the device will get stall. like the below picture:

0693W00000AN7gZQAT.jpgMy question is how to modify the procedure to let the device can determine the string descriptor then send back the data which I need?

TT.

    This topic has been closed for replies.

    6 replies

    Super User
    May 3, 2021

    You project likely contains a source file which deals with descriptor requests. Read it, understand, then add the needed descriptor.

    Super User
    May 3, 2021

    String descriptors are found within usbd_desc.c.

    Super User
    May 4, 2021

    It's okay to stall unsupported desriptor requests, including the Microsoft extensions (as Pavel A. pointed out above).

    JW

    TTsao.1Author
    Visitor II
    May 5, 2021

    Hi All,

    Thank you for your help. I have solved the problem.

    Visitor II
    August 16, 2021

    您好,我最近在使用STM32G0B1�?�USB的开�?�。

    �?�样的,在数�?�传输时,usb device有时也会�?�生�?�顿。请问您�?��?�是如何解决的?

    Graduate II
    August 16, 2021

    @TTsao.1​ what programm or harware are you using to sniff USB? im very interested