Skip to content

samples: usb: shell: Added list_dd command #105039

Merged
kartben merged 1 commit intozephyrproject-rtos:mainfrom
roma-jam-lab:pr-add-usb-shell-list-cmd-extention
Apr 17, 2026
Merged

samples: usb: shell: Added list_dd command #105039
kartben merged 1 commit intozephyrproject-rtos:mainfrom
roma-jam-lab:pr-add-usb-shell-list-cmd-extention

Conversation

@roma-jam
Copy link
Copy Markdown
Contributor

@roma-jam roma-jam commented Mar 6, 2026

Description

Descriptor dump usbh shell command: usbh device list_dd <addr> to have lsusb -v -d analogue.

Command allows to get dump of the descriptors in the readable format.

USB MSC Device

uart:~$ usbh device list_dd 1
Device Descriptor:
  bLength                        18
  bDescriptorType                 1
  bcdUSB                       2.00
  bDeviceClass                    0
  bDeviceSubClass                 0
  bDeviceProtocol                 0
  bMaxPacketSize0                64
  idVendor                   0xFFFF
  idProduct                  0x5678
  bcdDevice                    2.00
  iManufacturer                   1
  iProduct                        2
  iSerial                         3
  bNumConfigurations              1
  Configuration Descriptor:
    bLength                         9
    bDescriptorType                 2
    wTotalLength               0x0020
    bNumInterfaces                  1
    bConfigurationValue             1
    iConfiguration                  0
    bmAttributes                 0x80
    bMaxPower                     100 mA
    Interface Descriptor:
      bLength                         9
      bDescriptorType                 4
      bInterfaceNumber                0
      bAlternateSetting               0
      bNumEndpoints                   2
      bInterfaceClass                 8
      bInterfaceSubClass              6
      bInterfaceProtocol             80
      iInterface                      0
      Endpoint Descriptor:
        bLength                         7
        bDescriptorType                 5
        bEndpointAddress             0x01
        bmAttributes                 0x02
        wMaxPacketSize                 64
        bInterval                       0
      Endpoint Descriptor:
        bLength                         7
        bDescriptorType                 5
        bEndpointAddress             0x82
        bmAttributes                 0x02
        wMaxPacketSize                 64
        bInterval                       0

USB CDC Device

uart:~$ usbh device list_dd 1
Device Descriptor:
  bLength                        18
  bDescriptorType                 1
  bcdUSB                       1.10
  bDeviceClass                    0
  bDeviceSubClass                 0
  bDeviceProtocol                 0
  bMaxPacketSize0                64
  idVendor                   0x10C4
  idProduct                  0xEA60
  bcdDevice                    1.00
  iManufacturer                   1
  iProduct                        2
  iSerial                         3
  bNumConfigurations              1
  Configuration Descriptor:
    bLength                         9
    bDescriptorType                 2
    wTotalLength               0x0020
    bNumInterfaces                  1
    bConfigurationValue             1
    iConfiguration                  0
    bmAttributes                 0x80
    bMaxPower                     100 mA
    Interface Descriptor:
      bLength                         9
      bDescriptorType                 4
      bInterfaceNumber                0
      bAlternateSetting               0
      bNumEndpoints                   2
      bInterfaceClass               255
      bInterfaceSubClass              0
      bInterfaceProtocol              0
      iInterface                      2
      Endpoint Descriptor:
        bLength                         7
        bDescriptorType                 5
        bEndpointAddress             0x81
        bmAttributes                 0x02
        wMaxPacketSize                 64
        bInterval                       0
      Endpoint Descriptor:
        bLength                         7
        bDescriptorType                 5
        bEndpointAddress             0x01
        bmAttributes                 0x02
        wMaxPacketSize                 64
        bInterval                       0

USB HID Device

uart:~$ usbh device list_dd 1
Device Descriptor:
  bLength                        18
  bDescriptorType                 1
  bcdUSB                       2.00
  bDeviceClass                    0
  bDeviceSubClass                 0
  bDeviceProtocol                 0
  bMaxPacketSize0                 8
  idVendor                   0x046D
  idProduct                  0xC52B
  bcdDevice                   12.11
  iManufacturer                   1
  iProduct                        2
  iSerial                         0
  bNumConfigurations              1
  Configuration Descriptor:
    bLength                         9
    bDescriptorType                 2
    wTotalLength               0x0054
    bNumInterfaces                  3
    bConfigurationValue             1
    iConfiguration                  4
    bmAttributes                 0xA0
    bMaxPower                      98 mA
    Interface Descriptor:
      bLength                         9
      bDescriptorType                 4
      bInterfaceNumber                0
      bAlternateSetting               0
      bNumEndpoints                   1
      bInterfaceClass                 3
      bInterfaceSubClass              1
      bInterfaceProtocol              1
      iInterface                      0
    Unhandled Descriptor:
      bLength                         9
      bDescriptorType                33
      Endpoint Descriptor:
        bLength                         7
        bDescriptorType                 5
        bEndpointAddress             0x81
        bmAttributes                 0x03
        wMaxPacketSize                  8
        bInterval                       8
    Interface Descriptor:
      bLength                         9
      bDescriptorType                 4
      bInterfaceNumber                1
      bAlternateSetting               0
      bNumEndpoints                   1
      bInterfaceClass                 3
      bInterfaceSubClass              1
      bInterfaceProtocol              2
      iInterface                      0
    Unhandled Descriptor:
      bLength                         9
      bDescriptorType                33
      Endpoint Descriptor:
        bLength                         7
        bDescriptorType                 5
        bEndpointAddress             0x82
        bmAttributes                 0x03
        wMaxPacketSize                  8
        bInterval                       2
    Interface Descriptor:
      bLength                         9
      bDescriptorType                 4
      bInterfaceNumber                2
      bAlternateSetting               0
      bNumEndpoints                   1
      bInterfaceClass                 3
      bInterfaceSubClass              0
      bInterfaceProtocol              0
      iInterface                      0
    Unhandled Descriptor:
      bLength                         9
      bDescriptorType                33
      Endpoint Descriptor:
        bLength                         7
        bDescriptorType                 5
        bEndpointAddress             0x83
        bmAttributes                 0x03
        wMaxPacketSize                 32
        bInterval                       2

USB UAC Device

uart:~$ usbh device list_dd 1
Device Descriptor:
  bLength                        18
  bDescriptorType                 1
  bcdUSB                       1.10
  bDeviceClass                    0
  bDeviceSubClass                 0
  bDeviceProtocol                 0
  bMaxPacketSize0                64
  idVendor                   0x0C76
  idProduct                  0x161F
  bcdDevice                    1.00
  iManufacturer                   0
  iProduct                        1
  iSerial                         0
  bNumConfigurations              1
  Configuration Descriptor:
    bLength                         9
    bDescriptorType                 2
    wTotalLength               0x00E1
    bNumInterfaces                  4
    bConfigurationValue             1
    iConfiguration                  0
    bmAttributes                 0x80
    bMaxPower                     100 mA
    Interface Descriptor:
      bLength                         9
      bDescriptorType                 4
      bInterfaceNumber                0
      bAlternateSetting               0
      bNumEndpoints                   0
      bInterfaceClass                 1
      bInterfaceSubClass              1
      bInterfaceProtocol              0
      iInterface                      0
    Unhandled Descriptor:
      bLength                        10
      bDescriptorType                36
    Unhandled Descriptor:
      bLength                        12
      bDescriptorType                36
    Unhandled Descriptor:
      bLength                        12
      bDescriptorType                36
    Unhandled Descriptor:
      bLength                         9
      bDescriptorType                36
    Unhandled Descriptor:
      bLength                         9
      bDescriptorType                36
    Unhandled Descriptor:
      bLength                         7
      bDescriptorType                36
    Unhandled Descriptor:
      bLength                        10
      bDescriptorType                36
    Unhandled Descriptor:
      bLength                         9
      bDescriptorType                36
    Interface Descriptor:
      bLength                         9
      bDescriptorType                 4
      bInterfaceNumber                1
      bAlternateSetting               0
      bNumEndpoints                   0
      bInterfaceClass                 1
      bInterfaceSubClass              2
      bInterfaceProtocol              0
      iInterface                      0
    Interface Descriptor:
      bLength                         9
      bDescriptorType                 4
      bInterfaceNumber                1
      bAlternateSetting               1
      bNumEndpoints                   1
      bInterfaceClass                 1
      bInterfaceSubClass              2
      bInterfaceProtocol              0
      iInterface                      0
    Unhandled Descriptor:
      bLength                         7
      bDescriptorType                36
    Unhandled Descriptor:
      bLength                        11
      bDescriptorType                36
      Endpoint Descriptor:
        bLength                         9
        bDescriptorType                 5
        bEndpointAddress             0x01
        bmAttributes                 0x09
        wMaxPacketSize                200
        bInterval                       1
    Unhandled Descriptor:
      bLength                         7
      bDescriptorType                37
    Interface Descriptor:
      bLength                         9
      bDescriptorType                 4
      bInterfaceNumber                2
      bAlternateSetting               0
      bNumEndpoints                   0
      bInterfaceClass                 1
      bInterfaceSubClass              2
      bInterfaceProtocol              0
      iInterface                      0
    Interface Descriptor:
      bLength                         9
      bDescriptorType                 4
      bInterfaceNumber                2
      bAlternateSetting               1
      bNumEndpoints                   1
      bInterfaceClass                 1
      bInterfaceSubClass              2
      bInterfaceProtocol              0
      iInterface                      0
    Unhandled Descriptor:
      bLength                         7
      bDescriptorType                36
    Unhandled Descriptor:
      bLength                        11
      bDescriptorType                36
      Endpoint Descriptor:
        bLength                         9
        bDescriptorType                 5
        bEndpointAddress             0x82
        bmAttributes                 0x05
        wMaxPacketSize                200
        bInterval                       1
    Unhandled Descriptor:
      bLength                         7
      bDescriptorType                37
    Interface Descriptor:
      bLength                         9
      bDescriptorType                 4
      bInterfaceNumber                3
      bAlternateSetting               0
      bNumEndpoints                   1
      bInterfaceClass                 3
      bInterfaceSubClass              0
      bInterfaceProtocol              0
      iInterface                      0
    Unhandled Descriptor:
      bLength                         9
      bDescriptorType                33
      Endpoint Descriptor:
        bLength                         7
        bDescriptorType                 5
        bEndpointAddress             0x83
        bmAttributes                 0x03
        wMaxPacketSize                  4
        bInterval                      32

USB UVC Device

uart:~$ usbh device list_dd 1
Device Descriptor:
  bLength                        18
  bDescriptorType                 1
  bcdUSB                       2.00
  bDeviceClass                  239
  bDeviceSubClass                 2
  bDeviceProtocol                 1
  bMaxPacketSize0                64
  idVendor                   0x1E45
  idProduct                  0x8022
  bcdDevice                   58.01
  iManufacturer                   3
  iProduct                        1
  iSerial                         2
  bNumConfigurations              1
  Configuration Descriptor:
    bLength                         9
    bDescriptorType                 2
    wTotalLength               0x0144
    bNumInterfaces                  2
    bConfigurationValue             1
    iConfiguration                  4
    bmAttributes                 0x80
    bMaxPower                     500 mA
    Interface Association:
      bLength                         8
      bDescriptorType                11
      bFirstInterface                 0
      bInterfaceCount                 2
      bFunctionClass                 14
      bFunctionSubClass               3
      bFunctionProtocol               0
      iFunction                       5
    Interface Descriptor:
      bLength                         9
      bDescriptorType                 4
      bInterfaceNumber                0
      bAlternateSetting               0
      bNumEndpoints                   1
      bInterfaceClass                14
      bInterfaceSubClass              1
      bInterfaceProtocol              0
      iInterface                      5
    Unhandled Descriptor:
      bLength                        13
      bDescriptorType                36
    Unhandled Descriptor:
      bLength                        18
      bDescriptorType                36
    Unhandled Descriptor:
      bLength                        11
      bDescriptorType                36
    Unhandled Descriptor:
      bLength                         9
      bDescriptorType                36
    Unhandled Descriptor:
      bLength                        27
      bDescriptorType                36
      Endpoint Descriptor:
        bLength                         7
        bDescriptorType                 5
        bEndpointAddress             0x83
        bmAttributes                 0x03
        wMaxPacketSize                 16
        bInterval                       6
    Unhandled Descriptor:
      bLength                         5
      bDescriptorType                37
    Interface Descriptor:
      bLength                         9
      bDescriptorType                 4
      bInterfaceNumber                1
      bAlternateSetting               0
      bNumEndpoints                   0
      bInterfaceClass                14
      bInterfaceSubClass              2
      bInterfaceProtocol              0
      iInterface                      0
    Unhandled Descriptor:
      bLength                        14
      bDescriptorType                36
    Unhandled Descriptor:
      bLength                        27
      bDescriptorType                36
    Unhandled Descriptor:
      bLength                        30
      bDescriptorType                36
    Unhandled Descriptor:
      bLength                        10
      bDescriptorType                36
    Unhandled Descriptor:
      bLength                         6
      bDescriptorType                36
    Interface Descriptor:
      bLength                         9
      bDescriptorType                 4
      bInterfaceNumber                1
      bAlternateSetting               1
      bNumEndpoints                   1
      bInterfaceClass                14
      bInterfaceSubClass              2
      bInterfaceProtocol              0
      iInterface                      0
      Endpoint Descriptor:
        bLength                         7
        bDescriptorType                 5
        bEndpointAddress             0x81
        bmAttributes                 0x05
        wMaxPacketSize                128
        bInterval                       1
    Interface Descriptor:
      bLength                         9
      bDescriptorType                 4
      bInterfaceNumber                1
      bAlternateSetting               2
      bNumEndpoints                   1
      bInterfaceClass                14
      bInterfaceSubClass              2
      bInterfaceProtocol              0
      iInterface                      0
      Endpoint Descriptor:
        bLength                         7
        bDescriptorType                 5
        bEndpointAddress             0x81
        bmAttributes                 0x05
        wMaxPacketSize                256
        bInterval                       1
    Interface Descriptor:
      bLength                         9
      bDescriptorType                 4
      bInterfaceNumber                1
      bAlternateSetting               3
      bNumEndpoints                   1
      bInterfaceClass                14
      bInterfaceSubClass              2
      bInterfaceProtocol              0
      iInterface                      0
      Endpoint Descriptor:
        bLength                         7
        bDescriptorType                 5
        bEndpointAddress             0x81
        bmAttributes                 0x05
        wMaxPacketSize                384
        bInterval                       1
    Interface Descriptor:
      bLength                         9
      bDescriptorType                 4
      bInterfaceNumber                1
      bAlternateSetting               4
      bNumEndpoints                   1
      bInterfaceClass                14
      bInterfaceSubClass              2
      bInterfaceProtocol              0
      iInterface                      0
      Endpoint Descriptor:
        bLength                         7
        bDescriptorType                 5
        bEndpointAddress             0x81
        bmAttributes                 0x05
        wMaxPacketSize                512
        bInterval                       1
    Interface Descriptor:
      bLength                         9
      bDescriptorType                 4
      bInterfaceNumber                1
      bAlternateSetting               5
      bNumEndpoints                   1
      bInterfaceClass                14
      bInterfaceSubClass              2
      bInterfaceProtocol              0
      iInterface                      0
      Endpoint Descriptor:
        bLength                         7
        bDescriptorType                 5
        bEndpointAddress             0x81
        bmAttributes                 0x05
        wMaxPacketSize                768
        bInterval                       1
    Interface Descriptor:
      bLength                         9
      bDescriptorType                 4
      bInterfaceNumber                1
      bAlternateSetting               6
      bNumEndpoints                   1
      bInterfaceClass                14
      bInterfaceSubClass              2
      bInterfaceProtocol              0
      iInterface                      0
      Endpoint Descriptor:
        bLength                         7
        bDescriptorType                 5
        bEndpointAddress             0x81
        bmAttributes                 0x05
        wMaxPacketSize                780
        bInterval                       1
    Interface Descriptor:
      bLength                         9
      bDescriptorType                 4
      bInterfaceNumber                1
      bAlternateSetting               7
      bNumEndpoints                   1
      bInterfaceClass                14
      bInterfaceSubClass              2
      bInterfaceProtocol              0
      iInterface                      0
      Endpoint Descriptor:
        bLength                         7
        bDescriptorType                 5
        bEndpointAddress             0x81
        bmAttributes                 0x05
        wMaxPacketSize                800
        bInterval                       1

Related

N/A

Comment thread subsys/usb/host/usbh_shell.c Outdated
Comment thread subsys/usb/host/usbh_shell.c Outdated
Comment thread subsys/usb/host/usbh_shell.c Outdated
Comment thread subsys/usb/host/usbh_shell.c Outdated
Comment thread subsys/usb/host/usbh_shell.c
Comment thread subsys/usb/host/usbh_shell.c Outdated
@roma-jam
Copy link
Copy Markdown
Contributor Author

roma-jam commented Mar 11, 2026

But it seems like all the work you are describing is already there:

Yes! Yes! I need exactly the implementation of the api->init(c_data) which leads to the (for example in case of uvc) to usbh_uvc_init(). Because during this logic the driver should use the channels, associated with the EPs of the particular interface, which represents the class.

But current implementation is:

static int usbh_uvc_init(struct usbh_class_data *const c_data)
{
	return 0;
}

Do you have something more regarding usbh_uvc_init()?

Meanwhile, I'll go and check other class implementation PRs....

@roma-jam
Copy link
Copy Markdown
Contributor Author

roma-jam commented Mar 11, 2026

Hi @josuah,

I checked the implementation of available class drivers and found out:

  1. CDC ECM: https://github.com/zephyrproject-rtos/zephyr/pull/99097/changes#diff-450e239ee919eaf9b1734dd85ec26679c8b30b3bdee2c6948d413eedc2f789dbR323
  2. Vendor specific serial: https://github.com/zephyrproject-rtos/zephyr/pull/99173/changes#diff-40f6ee6fe5cd749ddf5cde565d69f8725fb3c9a5f50fef64134fe9e3bd1437e2R124

and both of them request the descriptor and parse the EP descriptors internally via usbh_desc_get_next().

But both of them are using the cached values of udev->cfg_desc or usbh_desc_get_iface.

Why not help the class drivers and free them from parsing the whole config descriptor every time with just linking the ep_desc with interface number?

Sorry if I am missing something, but it seems that we have interface number as an argument in
usbh_*_probe(...., const uint8_t iface) why just not to use it? 🤔

@josuah
Copy link
Copy Markdown
Contributor

josuah commented Mar 11, 2026

Why not help the class drivers and free them from parsing the whole config descriptor every time with just linking the ep_desc with interface number?

I was about to suggest this. ^_^

@roma-jam roma-jam force-pushed the pr-add-usb-shell-list-cmd-extention branch from 57dcdf5 to 7b3b257 Compare March 12, 2026 12:22
@roma-jam
Copy link
Copy Markdown
Contributor Author

roma-jam commented Mar 12, 2026

Hi @josuah,

I added two common helpers to the usbh_desc.h and extended the usbh device list output.

Also I used real USB devices + ESP32S3 to get the dump and you may find it in the PR description.

Thus, introduced helpers might help to simplify the logic of *_desc_parsing_whatever in such PRs, as:

  1. subsys: usb: host: Add USB Host CDC ECM Class Support for Ethernet #99097
  2. subsys: usb: host: Add USB Host Vendor specific serial class support #99173
  3. usb: host: class: support for usb host video class #94085

PTAL when convenient.
Thanks!

@roma-jam roma-jam force-pushed the pr-add-usb-shell-list-cmd-extention branch from 7b3b257 to f18bbf0 Compare March 12, 2026 12:38
@roma-jam roma-jam marked this pull request as ready for review March 12, 2026 12:45
@zephyrbot zephyrbot added the area: USB Universal Serial Bus label Mar 12, 2026
@roma-jam roma-jam requested a review from josuah March 12, 2026 12:48
@roma-jam
Copy link
Copy Markdown
Contributor Author

Ah, no ellipsis notation… makes sense.

Sorry, will update then asap.

@josuah
Copy link
Copy Markdown
Contributor

josuah commented Mar 12, 2026

Ah, no ellipsis notation… makes sense.

I am not sure... it makes sense to support ellipsis notation when wrapping vprintf-like functions. There is no other way to do it?

SonarQube will be wrong in many occasions (i.e. due to macros, rules that are there to hint users to give a look), so are not blocking on PRs currently. Not bad idea to give a look though!

@roma-jam
Copy link
Copy Markdown
Contributor Author

Hi @josuah,

There is no other way to do it?

Sure there is. I don't mind to change it to more explicit smaller calls.

PS. wait a sec, I am about to push the changes....

@roma-jam roma-jam force-pushed the pr-add-usb-shell-list-cmd-extention branch 2 times, most recently from 2559c63 to 54926c8 Compare March 12, 2026 14:18
Comment thread subsys/usb/host/usbh_shell.c Outdated
Comment thread subsys/usb/host/usbh_shell.c Outdated
@roma-jam
Copy link
Copy Markdown
Contributor Author

roma-jam commented Mar 12, 2026

Hi @josuah,

much better now, IMHO (but let's wait for the SonarQube).

SonarQube will be wrong in many occasions

This time it is not completely wrong. Having the *_fmt function like, can create potential risk and format-string bugs become runtime. Why take a risk if it is possible to avoid it. 🤷

PS. If you have any USB UVC device (USB camera), feel free to try it out as they have a larger configuration descriptor usually.
Also Ethernet adapters, but I don't have any ... (

@roma-jam roma-jam force-pushed the pr-add-usb-shell-list-cmd-extention branch from 54926c8 to 3dca0e2 Compare March 12, 2026 14:25
Comment thread subsys/usb/host/usbh_shell.c Outdated
Copy link
Copy Markdown
Contributor

@josuah josuah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the step-by-step improvements.

It might be useful to take the class modification to another PR so that this can be presented to authors of USB host class PRs without involving discussion about the shell.

Comment thread subsys/usb/host/usbh_shell.c Outdated
Comment thread subsys/usb/host/usbh_shell.c Outdated
Comment thread subsys/usb/host/usbh_desc.c Outdated
@roma-jam roma-jam marked this pull request as draft March 13, 2026 09:17
@roma-jam roma-jam force-pushed the pr-add-usb-shell-list-cmd-extention branch 2 times, most recently from a9a8d54 to c69b71f Compare March 13, 2026 12:27
@roma-jam roma-jam force-pushed the pr-add-usb-shell-list-cmd-extention branch from c69b71f to d6d788e Compare March 13, 2026 12:52
@roma-jam roma-jam changed the title samples: usb: shell: Extended usbh device list output samples: usb: shell: Added list_dd command Mar 13, 2026
@roma-jam
Copy link
Copy Markdown
Contributor Author

Hi @josuah,

I simplified the PR by:

  • removing the helpers, as they are not necessary in here
  • introducing new shell command usbh device list_dd <address>
  • considering the way of printing every entry in Configuration Descriptor (according to the discussion here)
  • considering to save a small amount of flash by removing the extra space at the beginning and replace it with indent increment as a compromise

I also updated the description with new output and updated the README according to the new style.

The rest things such as:

it might be common to take an uint8_t iface interface number as parameter instead of if_desc? As the class ->probe() API takes iface.

I will add later, when gain more experience with class drivers. Maybe it won't be necessary at all or I modify the helpers somehow.

PTAL once again, when convenient.
Thanks.

@roma-jam roma-jam requested a review from josuah March 13, 2026 13:02
Comment thread subsys/usb/host/usbh_shell.c
Comment thread subsys/usb/host/usbh_shell.c
@roma-jam roma-jam force-pushed the pr-add-usb-shell-list-cmd-extention branch from d6d788e to f622ffa Compare March 13, 2026 13:10
@roma-jam roma-jam marked this pull request as ready for review March 13, 2026 13:12
@zephyrbot zephyrbot added the area: Samples Samples label Mar 13, 2026
Comment thread subsys/usb/host/usbh_shell.c
@roma-jam roma-jam force-pushed the pr-add-usb-shell-list-cmd-extention branch from f622ffa to aa688ff Compare March 13, 2026 13:51
@roma-jam roma-jam requested a review from kartben March 13, 2026 13:52
josuah
josuah previously approved these changes Mar 13, 2026
Copy link
Copy Markdown
Contributor

@josuah josuah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad to get more feedback on command naming from USB maintainer/contributors.

Thank you for this useful utility.

Copy link
Copy Markdown
Contributor

@jfischer-no jfischer-no left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit message needs to be fixed as well.
This is more about host support in general.

usb: host: shell: add device list_dd command

Add shell command to print all USB device descriptors.

Signed-off-by: Roman Leonov <jam_roma@yahoo.com>

Comment thread subsys/usb/host/usbh_shell.c
Comment thread subsys/usb/host/usbh_shell.c Outdated
Comment thread subsys/usb/host/usbh_shell.c Outdated
Comment thread subsys/usb/host/usbh_shell.c Outdated
@roma-jam roma-jam force-pushed the pr-add-usb-shell-list-cmd-extention branch from aa688ff to d96b04a Compare April 10, 2026 17:55
@roma-jam roma-jam requested review from jfischer-no and josuah April 10, 2026 17:56
Added:
- usbh shell command to dump descriptors

Signed-off-by: Roman Leonov <jam_roma@yahoo.com>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
@roma-jam roma-jam force-pushed the pr-add-usb-shell-list-cmd-extention branch from d96b04a to ad1468a Compare April 10, 2026 18:22
@sonarqubecloud
Copy link
Copy Markdown

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

Copy link
Copy Markdown
Contributor

@josuah josuah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As part of the SHELL_HELP() PR, it could be great to have a description of what list_dd means, as so far the only doc is trying and see what happens, or this PR.

Thank you for this utility, will be useful!

@kartben kartben merged commit a0dee7d into zephyrproject-rtos:main Apr 17, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Samples Samples area: USB Universal Serial Bus

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants