HUB: Bad transfer status 1: CHECK_SHORT_DEV_DESC E ;HUB: Stage failed: CHECK_SHORT_DEV_DESC error in esp32S3

mano-30
Posts: 2
Joined: Wed Aug 28, 2024 2:28 pm

HUB: Bad transfer status 1: CHECK_SHORT_DEV_DESC E ;HUB: Stage failed: CHECK_SHORT_DEV_DESC error in esp32S3

Postby mano-30 » Thu Aug 29, 2024 5:41 am

I was trying out the uvc example project by connecting the webcam to a custom PCB with the ESP32S3 chip. I used a USB breakout board to connect the webcam to the ESP32S3. I connected D- to GPIO19 and D+ to GPIO20. I connected VBUS to 5V on the breakout board and GND pin to ESP's GND. When I connected the webcam to the ESP, I am getting bad transfer status 1. However, if I connect the webcam to the microusb port of ESP32S3 DevKit C, I am not facing this issue. I am attaching the logs of the code where I am facing this issue.
  1. I (31) boot: ESP-IDF v5.3-dirty 2nd stage bootloader
  2. I (31) boot: compile time Aug 27 2024 15:00:45
  3. I (31) boot: Multicore bootloader
  4. I (35) boot: chip revision: v0.1
  5. I (38) boot.esp32s3: Boot SPI Speed : 80MHz
  6. I (43) boot.esp32s3: SPI Mode       : DIO
  7. I (48) boot.esp32s3: SPI Flash Size : 2MB
  8. I (53) boot: Enabling RNG early entropy source...
  9. I (58) boot: Partition Table:
  10. I (62) boot: ## Label            Usage          Type ST Offset   Length
  11. I (69) boot:  0 nvs              WiFi data        01 02 00009000 00006000
  12. I (76) boot:  1 phy_init         RF data          01 01 0000f000 00001000
  13. I (84) boot:  2 factory          factory app      00 00 00010000 00100000
  14. I (91) boot: End of partition table
  15. I (96) esp_image: segment 0: paddr=00010020 vaddr=3c0a0020 size=257d4h (153556) map
  16. I (132) esp_image: segment 1: paddr=000357fc vaddr=3fc9ae00 size=04f98h ( 20376) load
  17. I (136) esp_image: segment 2: paddr=0003a79c vaddr=40374000 size=0587ch ( 22652) load
  18. I (142) esp_image: segment 3: paddr=00040020 vaddr=42000020 size=9a59ch (632220) map
  19. I (260) esp_image: segment 4: paddr=000da5c4 vaddr=4037987c size=11488h ( 70792) load
  20. I (285) boot: Loaded app from partition at offset 0x10000
  21. I (285) boot: Disabling RNG early entropy source...
  22. I (297) esp_psram: Found 2MB PSRAM device
  23. I (297) esp_psram: Speed: 40MHz
  24. I (297) cpu_start: Multicore app
  25. I (717) esp_psram: SPI SRAM memory test OK
  26. I (726) cpu_start: Pro cpu start user code
  27. I (726) cpu_start: cpu freq: 240000000 Hz
  28. I (726) app_init: Application information:
  29. I (729) app_init: Project name:     usb-uvc
  30. I (734) app_init: App version:      1
  31. I (739) app_init: Compile time:     Aug 28 2024 18:57:16
  32. I (745) app_init: ELF file SHA256:  5a8b9cb46...
  33. I (750) app_init: ESP-IDF:          v5.3-dirty
  34. I (755) efuse_init: Min chip rev:     v0.0
  35. I (760) efuse_init: Max chip rev:     v0.99
  36. I (765) efuse_init: Chip rev:         v0.1
  37. I (770) heap_init: Initializing. RAM available for dynamic allocation:
  38. I (777) heap_init: At 3FCA4188 len 00045588 (277 KiB): RAM
  39. I (783) heap_init: At 3FCE9710 len 00005724 (21 KiB): RAM
  40. I (789) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
  41. I (795) heap_init: At 600FE100 len 00001EE8 (7 KiB): RTCRAM
  42. I (802) esp_psram: Adding pool of 2048K of PSRAM memory to heap allocator
  43. I (810) spi_flash: detected chip: generic
  44. I (813) spi_flash: flash io: dio
  45. W (817) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
  46. I (831) sleep: Configure to isolate all GPIO pins in sleep state
  47. I (837) sleep: Enable automatic switching of GPIO sleep configuration
  48. I (845) main_task: Started on CPU0
  49. I (855) esp_psram: Reserving pool of 32K of internal memory for DMA/internal allocations
  50. I (855) main_task: Calling app_main()
  51. I (865) gpio: GPIO[0]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
  52. W (875) USB HOST: User callback to set USB device configuration is enabled, but not used
  53. I (915) example_connect: Start example_connect.
  54. I (915) pp: pp rom version: e7ae62f
  55. I (915) net80211: net80211 rom version: e7ae62f
  56. I (935) wifi:wifi driver task: 3fcbaec4, prio:23, stack:6656, core=0
  57. I (935) wifi:wifi firmware version: 0caa81945
  58. I (935) wifi:wifi certification version: v7.0
  59. I (935) wifi:config NVS flash: enabled
  60. I (935) wifi:config nano formating: disabled
  61. I (945) wifi:Init data frame dynamic rx buffer num: 8
  62. I (945) wifi:Init static rx mgmt buffer num: 5
  63. I (955) wifi:Init management short buffer num: 32
  64. I (955) wifi:Init static tx buffer num: 8
  65. I (955) wifi:Init tx cache buffer num: 32
  66. I (965) wifi:Init static tx FG buffer num: 2
  67. I (965) wifi:Init static rx buffer size: 1600
  68. I (975) wifi:Init static rx buffer num: 8
  69. I (975) wifi:Init dynamic rx buffer num: 8
  70. I (975) wifi_init: rx ba win: 8
  71. I (985) wifi_init: accept mbox: 6
  72. I (985) wifi_init: tcpip mbox: 32
  73. I (995) wifi_init: udp mbox: 6
  74. I (995) wifi_init: tcp mbox: 6
  75. I (995) wifi_init: tcp tx win: 15000
  76. I (1005) wifi_init: tcp rx win: 5760
  77. I (1005) wifi_init: tcp mss: 1440
  78. I (1015) wifi_init: WiFi IRAM OP enabled
  79. I (1015) wifi_init: WiFi RX IRAM OP enabled
  80. I (1025) phy_init: phy_version 680,a6008b2,Jun  4 2024,16:41:10
  81. I (1055) wifi:mode : sta (f0:f5:bd:6e:6f:d8)
  82. I (1055) wifi:enable tsf
  83. I (1065) example_connect: Connecting to <wifi_name>...
  84. I (1065) example_connect: Waiting for IP(s)
  85. E (2415) HUB: Bad transfer status 1: CHECK_SHORT_DEV_DESC
  86. E (2415) HUB: Stage failed: CHECK_SHORT_DEV_DESC
  87. I (3815) wifi:new:<6,0>, old:<1,0>, ap:<255,255>, sta:<6,0>, prof:1, snd_ch_cfg:0x0
  88. I (3815) wifi:state: init -> auth (0xb0)
  89. I (3825) wifi:state: auth -> assoc (0x0)
  90. I (3825) wifi:state: assoc -> run (0x10)
  91. I (3845) wifi:connected with <wifi_name>, aid = 6, channel 6, BW20, bssid = e4:55:a8:28:f4:1e
  92. I (3845) wifi:security: WPA2-PSK, phy: bgn, rssi: -59
  93. I (3845) wifi:pm start, type: 1
  94. I (3845) wifi:dp: 1, bi: 102400, li: 3, scale listen interval from 307200 us to 307200 us
  95. I (3855) wifi:set rx beacon pti, rx_bcn_pti: 0, bcn_timeout: 25000, mt_pti: 0, mt_time: 10000
  96. I (3875) wifi:<ba-add>idx:0 (ifx:0, e4:55:a8:28:f4:1e), tid:0, ssn:0, winSize:64
  97. I (3915) wifi:AP's beacon interval = 102400 us, DTIM period = 1
  98. I (4865) esp_netif_handlers: example_netif_sta ip: 192.168.11.132, mask: 255.255.252.0, gw: 192.168.8.1
  99. I (4865) example_connect: Got IPv4 event: Interface "example_netif_sta" address: 192.168.11.132
  100. I (4915) example_connect: Got IPv6 event: Interface "example_netif_sta" address: fe80:0000:0000:0000:f2f5:bdff:fe6e:6fd8, type: ESP_IP6_ADDR_IS_LINK_LOCAL
I have set all the USB-OTG menuconfig parameters to 500 ms as well. Is this a hardware issue or do I have to make some changes in the code?

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: HUB: Bad transfer status 1: CHECK_SHORT_DEV_DESC E ;HUB: Stage failed: CHECK_SHORT_DEV_DESC error in esp32S3

Postby chegewara » Thu Aug 29, 2024 3:45 pm

Can you post sdkconfig? That may help to spot problem.
In general uvc descriptors are very long, even up to 1500 bytes, so please to compare with uvc example code.

mano-30
Posts: 2
Joined: Wed Aug 28, 2024 2:28 pm

Re: HUB: Bad transfer status 1: CHECK_SHORT_DEV_DESC E ;HUB: Stage failed: CHECK_SHORT_DEV_DESC error in esp32S3

Postby mano-30 » Fri Aug 30, 2024 7:44 am

Here is the sdkconfig file. I will look into the uvc parameters, but if it works for the devkit, then it should work for the custom pcb as well?
Attachments
sdkconfig.txt
(61.44 KiB) Downloaded 64 times

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: HUB: Bad transfer status 1: CHECK_SHORT_DEV_DESC E ;HUB: Stage failed: CHECK_SHORT_DEV_DESC error in esp32S3

Postby chegewara » Fri Aug 30, 2024 3:53 pm

Yeah, if its the same code then its suggesting hardware problem.

I wanted to check this param, just to make sure
CONFIG_USB_HOST_CONTROL_TRANSFER_MAX_SIZE
Sometimes it may be issue with some USB devices, when descriptor is 255 or 256 bytes long, i dont remember. But again, if you are testing with the same firmware and the same camera, then its not the case.

Who is online

Users browsing this forum: Baidu [Spider], nopnop2002 and 143 guests