espressif / esp-protocols

Collection of ESP-IDF components related to networking protocols
163 stars 115 forks source link

Support for 4G Modem with USB interface (IDFGH-8221) #133

Closed rmshub closed 1 year ago

rmshub commented 1 year ago

Is esp-modem supports usb interface to connect with 4G modem using PPP for ESP32-S3 device

abhi-ratnman commented 1 year ago

I've the same question. Please let me know if possible @team

rmshub commented 1 year ago

Hi Team,

Any update for this request ?

david-cermak commented 1 year ago

The console example supports USB interface, please check

https://github.com/espressif/esp-protocols/tree/master/components/esp_modem/examples/modem_console#usb-dte-support

It's just a sub-component to this example at this moment. We're working on making this an independent component, deployable separately in the component manager.

abhi-ratnman commented 1 year ago

@david-cermak thanks for the update. How long should it take for the independent component? As we are moving with production code. So we should wait or move forward with the sub-component?

tore-espressif commented 1 year ago

@abhi-ratnman @rmshub Could you please take a look at https://github.com/espressif/esp-protocols/pull/89 ? And let me know whether this changes fit your needs?

Early version of USB_DTE plugin is uploaded here, and source code is under review https://github.com/espressif/idf-extra-components/pull/92. I'd appreciate any ideas!

cc @leeebo

abhi-ratnman commented 1 year ago

I checked the component and example. Is there support for other modules? The code is for BG96. How to add support for SIM7672? @david-cermak @tore-espressif

tore-espressif commented 1 year ago

@abhi-ratnman you need to find VID and PID of the device. You can use USB Device Tree Viewer on windows or lsusb on linux to find it out.

Then, you need to know interface number that is used for AT commands. You should find that in SIM7672 datasheet, or you can find it by trial-and-error, starting from 0.

then you can use these values to initialize USB-DTE

struct esp_modem_usb_term_config usb_config = ESP_MODEM_DEFAULT_USB_CONFIG(vid, pid, intf_num);
const esp_modem_dte_config_t dte_config = ESP_MODEM_DTE_DEFAULT_USB_CONFIG(usb_config);  
ESP_LOGI(TAG, "Waiting for USB device connection...");
auto dte = create_usb_dte(&dte_config);
abhi-ratnman commented 1 year ago

@tore-espressif @david-cermak

struct esp_modem_usb_term_config usb_config = ESP_MODEM_DEFAULT_USB_CONFIG(0x1e0e, 0x9011);

    usb_config.interface_idx = 3;

    const esp_modem_dte_config_t dte_config = ESP_MODEM_DTE_DEFAULT_USB_CONFIG(usb_config);  

    ESP_LOGI(TAG, "Waiting for USB device connection...");

    auto dte = create_usb_dte(&dte_config);

    std::unique_ptr<DCE> dce = create_SIM7600_dce(&dce_config, dte, esp_netif);

Used the above config. Still the code is stuck in waiting for USB Device connection. The interface number in the sheet is 1 but tried from 0-3 still it is not getting connected.

The hardware connection is good as i have tested the same connection with https://github.com/espressif/esp-iot-solution/tree/usb/add_usb_solutions/examples/usb/host/usb_cdc_4g_module this code. And it gets connection (in menuconfig selected sim7600 as the board.)

tore-espressif commented 1 year ago

@abhi-ratnman could you share full device and configuration descriptors? I will take a look

tore-espressif commented 1 year ago

@abhi-ratnman In case you missed it: image

abhi-ratnman commented 1 year ago

@tore-espressif which device and configuration descriptors are required?

Also the reset part is taken care of and i try restarting it manually in case not done automatically. I've tested the usb CDC code like that only and it works fine.

tore-espressif commented 1 year ago

which device and configuration descriptors are required?

Ideally all of them :) @abhi-ratnman

To get your USB descriptors you can do the following:

  1. Connect (and turn on) the modem to host PC USB port
  2. Then, depending on your platform: 2a. Windows: Install USB Device Tree Viewer, find the modem in list of connected USB device and attach all information here 2b. Linux: run lsusb --verbose and attach the output here
abhi-ratnman commented 1 year ago

USB DESC.txt

Please find the above attached file @tore-espressif

abhi-ratnman commented 1 year ago

Hi @tore-espressif any update? Do u want any more information?

tore-espressif commented 1 year ago

Please find the above attached file @tore-espressif

please use usb_config.interface_idx = 5;, the rest of your configuration seems correct.

abhi-ratnman commented 1 year ago

@tore-espressif checked usb_config.interface_idx = 5;as well the code is still stuck at the same place. Is there any way to change the USB in and out address as per mentioned in this issue https://github.com/espressif/esp-iot-solution/issues/121#issuecomment-1021137502

Also a strange thing is happening, whenever ESP try to connect USB the module gets restart. Photo of the connection is as below. USB_connection

tore-espressif commented 1 year ago

@abhi-ratnman if your code gets stuck on device open, it indicates a different problem, could you please share your log?

Is there any way to change the USB in and out address as per mentioned in this issue https://github.com/espressif/esp-iot-solution/issues/121#issuecomment-1021137502

USB endpoint addresses are bound into USB interfaces. Interface 5 contains endpoints 0x81 and 0x0A. Endpoints mentioned in the linked comment 0x86 and 0x0F correspond to interface 4. you can find the rest in the descriptors that you sent me.

I'll test in on HW as soon as I get my SIM7600 (~few days)

abhi-ratnman commented 1 year ago

@tore-espressif please find the below log output.

ESP-ROM:esp32s3-20210327 Build:Mar 27 2021 rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT) SPIWP:0xee mode:DIO, clock div:1 load:0x3fcd0108,len:0x1664 load:0x403b6000,len:0xb7c load:0x403ba000,len:0x2f74 entry 0x403b6248 I (24) boot: ESP-IDF v4.4.1-dirty 2nd stage bootloader I (25) boot: compile time 16:16:10 I (25) boot: chip revision: 0 I (27) boot.esp32s3: Boot SPI Speed : 80MHz I (32) boot.esp32s3: SPI Mode : DIO I (36) boot.esp32s3: SPI Flash Size : 2MB I (41) boot: Enabling RNG early entropy source... I (46) boot: Partition Table: I (50) boot: ## Label Usage Type ST Offset Length I (57) boot: 0 nvs WiFi data 01 02 00009000 00006000 I (65) boot: 1 phy_init RF data 01 01 0000f000 00001000 I (72) boot: 2 factory factory app 00 00 00010000 00100000 I (80) boot: End of partition table I (84) esp_image: segment 0: paddr=00010020 vaddr=3c090020 size=23b8ch (146316) map I (119) esp_image: segment 1: paddr=00033bb4 vaddr=3fc932a0 size=029e4h ( 10724) load I (121) esp_image: segment 2: paddr=000365a0 vaddr=40374000 size=09a78h ( 39544) load I (133) esp_image: segment 3: paddr=00040020 vaddr=42000020 size=861f8h (549368) map I (232) esp_image: segment 4: paddr=000c6220 vaddr=4037da78 size=05820h ( 22560) load I (237) esp_image: segment 5: paddr=000cba48 vaddr=50000000 size=00010h ( 16) load I (244) boot: Loaded app from partition at offset 0x10000 I (244) boot: Disabling RNG early entropy source... I (261) cpu_start: Pro cpu up. I (261) cpu_start: Starting app cpu, entry point is 0x403753cc 0x403753cc: call_start_cpu1 at C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_system/port/cpu_start.c:160

I (0) cpu_stDrt: A1pp cusu:up. _BLK2DATA4_REG is used 2 bits starting with 0 bit D (268) efuse: In EFUSE_BLK2DATA4_REG is used 8 bits starting with 13 bit D (283) clk: RTC_SLOW_CLK calibration value: 3626547 I (292) cpu_start: Pro cpu start user code I (292) cpu_start: cpu freq: 160000000 I (292) cpu_start: Application information: I (295) cpu_start: Project name: modem-console I (300) cpu_start: App version: afafcb7-dirty I (306) cpu_start: Compile time: Oct 11 2022 16:16:02 I (312) cpu_start: ELF file SHA256: 41dca3480fadb3cf... I (318) cpu_start: ESP-IDF: v4.4.1-dirty V (323) memory_layout: reserved range is 0x3c0b3b8c - 0x3c0b3bac D (329) memory_layout: Checking 5 reserved memory ranges: D (335) memory_layout: Reserved memory range 0x3fc84000 - 0x3fc93298 D (341) memory_layout: Reserved memory range 0x3fc932a0 - 0x3fc97868 D (347) memory_layout: Reserved memory range 0x3fceee34 - 0x3fcf0000 D (354) memory_layout: Reserved memory range 0x40374000 - 0x40383298 0x40374000: _WindowOverflow4 at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/xtensa/xtensa_vectors.S:1736

D (360) memory_layout: Reserved memory range 0x600fe000 - 0x600fe000 D (367) memory_layout: Building list of available memory regions: V (373) memory_layout: Examining memory region 0x40374000 - 0x40378000 0x40374000: _WindowOverflow4 at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/xtensa/xtensa_vectors.S:1736

0x40378000: esp_flash_erase_region at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/esp_flash_api.c:540 (discriminator 2)

V (379) memory_layout: Region 0x40374000 - 0x40378000 inside of reserved 0x40374000 - 0x40383298 0x40374000: _WindowOverflow4 at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/xtensa/xtensa_vectors.S:1736

0x40378000: esp_flash_erase_region at C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash/esp_flash_api.c:540 (discriminator 2)

0x40374000: _WindowOverflow4 at C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos/port/xtensa/xtensa_vectors.S:1736

V (388) memory_layout: Examining memory region 0x3fc88000 - 0x3fc90000 V (395) memory_layout: Region 0x3fc88000 - 0x3fc90000 inside of reserved 0x3fc84000 - 0x3fc93298 V (404) memory_layout: Examining memory region 0x3fc90000 - 0x3fca0000 V (410) memory_layout: Start of region 0x3fc90000 - 0x3fca0000 overlaps reserved 0x3fc84000 - 0x3fc93298 V (420) memory_layout: Region 0x3fc93298 - 0x3fca0000 contains reserved 0x3fc932a0 - 0x3fc97868 V (429) memory_layout: Examining memory region 0x3fc97868 - 0x3fca0000 D (435) memory_layout: Available memory region 0x3fc97868 - 0x3fca0000 V (442) memory_layout: Examining memory region 0x3fca0000 - 0x3fcb0000 D (448) memory_layout: Available memory region 0x3fca0000 - 0x3fcb0000 V (455) memory_layout: Examining memory region 0x3fcb0000 - 0x3fcc0000 D (462) memory_layout: Available memory region 0x3fcb0000 - 0x3fcc0000 V (468) memory_layout: Examining memory region 0x3fcc0000 - 0x3fcd0000 D (475) memory_layout: Available memory region 0x3fcc0000 - 0x3fcd0000 V (481) memory_layout: Examining memory region 0x3fcd0000 - 0x3fce0000 D (488) memory_layout: Available memory region 0x3fcd0000 - 0x3fce0000 V (495) memory_layout: Examining memory region 0x3fce0000 - 0x3fcf0000 V (501) memory_layout: End of region 0x3fce0000 - 0x3fcf0000 overlaps reserved 0x3fceee34 - 0x3fcf0000 D (511) memory_layout: Available memory region 0x3fce0000 - 0x3fceee34 V (517) memory_layout: Examining memory region 0x3fcf0000 - 0x3fcf8000 D (524) memory_layout: Available memory region 0x3fcf0000 - 0x3fcf8000 V (530) memory_layout: Examining memory region 0x600fe000 - 0x60100000 D (537) memory_layout: Available memory region 0x600fe000 - 0x60100000 I (544) heap_init: Initializing. RAM available for dynamic allocation: D (551) heap_init: New heap initialised at 0x3fc97868 I (556) heap_init: At 3FC97868 len 00048798 (289 KiB): D/IRAM I (562) heap_init: At 3FCE0000 len 0000EE34 (59 KiB): STACK/DRAM D (569) heap_init: New heap initialised at 0x3fcf0000 I (574) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM D (580) heap_init: New heap initialised at 0x600fe000 I (585) heap_init: At 600FE000 len 00002000 (8 KiB): RTCRAM D (592) FLASH_HAL: extra_dummy: 0 V (595) memspi: raw_chip_id: 174020

V (599) memspi: chip_id: 204017

V (602) memspi: raw_chip_id: 174020

V (606) memspi: chip_id: 204017

D (609) spi_flash: trying chip: issi D (613) spi_flash: trying chip: gd D (617) spi_flash: trying chip: mxic D (620) spi_flash: trying chip: winbond D (624) spi_flash: trying chip: boya D (628) spi_flash: trying chip: th D (631) spi_flash: trying chip: mxic (opi) D (635) spi_flash: trying chip: generic I (639) spi_flash: detected chip: generic I (644) spi_flash: flash io: dio W (648) spi_flash: Detected size(8192k) larger than the size in the binary image header(2048k). Using the size in the binary image header. D (661) cpu_start: calling init function: 0x4206b85c 0x4206b85c: _GLOBALsubIcxa_get_globals_fast at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32s3-elf/src/gcc/libstdc++-v3/libsupc++/eh_globals.cc:145

D (666) cpu_start: calling init function: 0x4206b20c 0x4206b20c: _GLOBALsub_IZN9gnu_cxx9freeresEv at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32s3-elf/src/gcc/libstdc++-v3/libsupc++/eh_alloc.cc:348

D (671) cpu_start: calling init function: 0x4206a9c4 0x4206a9c4: esp_ds_conn_lock at C:/Espressif/frameworks/esp-idf-v4.4.1/components/mbedtls/port/esp_ds/esp_rsa_sign_alt.c:59

D (676) cpu_start: calling init function: 0x420274c8 0x420274c8: s_set_default_wifi_log_level at C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_wifi/src/wifi_init.c:63

D (681) cpu_start: calling init function: 0x4201ca6c 0x4201ca6c: esp_ipc_init at C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_ipc/src/esp_ipc.c:102

D (686) cpu_start: calling init function: 0x4200a098 0x4200a098: _GLOBAL__sub_I__ZN14ConsoleCommandC2EPKcS1_RKSt6vectorI11CommandArgsSaIS3_EESt8functionIFbPS_EE at c:\espressif\frameworks\esp-idf-v4.4.1\projects\esp-protocols\components\esp_modem\examples\modem_console\build/../main/console_helper.cpp:135

D (691) cpu_start: calling init function: 0x42002cf0 0x42002cf0: esp_ota_init_app_elf_sha256 at C:/Espressif/frameworks/esp-idf-v4.4.1/components/app_update/esp_app_desc.c:68

V (696) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args V (703) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xC02 D (711) intr_alloc: Connected src 59 to int 2 (cpu 0) I (716) sleep: Configure to isolate all GPIO pins in sleep state I (723) sleep: Enable automatic switching of GPIO sleep configuration V (730) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args V (736) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0x40E D (744) intr_alloc: Connected src 79 to int 3 (cpu 0) I (749) cpu_start: Starting scheduler on PRO CPU. V (755) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args V (755) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0x402 D (755) intr_alloc: Connected src 57 to int 9 (cpu 0) V (755) intr_alloc: esp_intr_alloc_intrstatus (cpu 1): checking args V (765) intr_alloc: esp_intr_alloc_intrstatus (cpu 1): Args okay. Resulting flags 0x40E D (765) intr_alloc: Connected src 80 to int 2 (cpu 1) I (775) cpu_start: Starting scheduler on APP CPU. V (775) intr_alloc: esp_intr_alloc_intrstatus (cpu 1): checking args V (785) intr_alloc: esp_intr_alloc_intrstatus (cpu 1): Args okay. Resulting flags 0x402 D (795) intr_alloc: Connected src 58 to int 3 (cpu 1) D (795) heap_init: New heap initialised at 0x3fce0000 V (805) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args V (805) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xE D (805) intr_alloc: Connected src 52 to int 12 (cpu 0) D (825) partition: Loading the partition table V (825) calculated md5: 0x3fcf3a68 f4 ad 4f 45 38 56 4b 5d 74 35 b6 2c 75 b6 95 24 |..OE8VK]t5.,u..$| V (835) stored md5: 0x3c0c8070 f4 ad 4f 45 38 56 4b 5d 74 35 b6 2c 75 b6 95 24 |..OE8VK]t5.,u..$| D (845) partition: Partition table MD5 verified D (855) esp_netif_lwip: LwIP stack has been initialized D (855) esp_netif_lwip: esp-netif has been successfully initialized D (865) event: running task for loop 0x3fce2388 D (865) event: created task for loop 0x3fce2388 D (875) event: created event loop 0x3fce2388 D (875) esp_netif_objects: esp_netif_add_to_list 0x3fce32b4 D (885) esp_netif_objects: esp_netif_add_to_list netif added successfully (total netifs: 1) D (895) esp-netif_lwip-ppp: esp_netif_new_ppp: PPP connection created: 0x3fce35e4 I (895) modem_console: Waiting for USB device connection... V (905) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args V (915) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0x802 D (915) intr_alloc: Connected src 38 to int 13 (cpu 0) D (955) usb_terminal: USB Host installed D (955) cdc_acm: Checking list of opened USB devices D (955) cdc_acm: Checking list of connected USB devices D (1005) cdc_acm: Checking list of connected USB devices D (1055) cdc_acm: Checking list of connected USB devices D (1105) cdc_acm: Checking list of connected USB devices D (1155) cdc_acm: Checking list of connected USB devices D (1205) cdc_acm: Checking list of connected USB devices D (1255) cdc_acm: Checking list of connected USB devices D (1265) HUB: Root port reset D (1265) HUB: Stage done: START D (1265) HUB: Stage done: GET_SHORT_DEV_DESC D (1265) HUB: Stage done: CHECK_SHORT_DEV_DESC D (1305) cdc_acm: Checking list of connected USB devices D (1325) HUB: Stage done: SECOND_RESET D (1325) HUB: Stage done: SET_ADDR D (1325) HUB: Stage done: CHECK_ADDR D (1325) HUB: Stage done: GET_FULL_DEV_DESC D (1325) HUB: Stage done: CHECK_FULL_DEV_DESC D (1325) HUB: Stage done: GET_SHORT_CONFIG_DESC D (1335) HUB: Stage done: CHECK_SHORT_CONFIG_DESC D (1335) HUB: Stage done: GET_FULL_CONFIG_DESC D (1345) HUB: Stage done: CHECK_FULL_CONFIG_DESC D (1345) HUB: Stage done: SET_CONFIG D (1355) HUB: Stage done: CHECK_CONFIG D (1355) HUB: Stage done: GET_SHORT_LANGID_TABLE D (1355) cdc_acm: Checking list of connected USB devices D (1395) HUB: Stage done: CLEANUP_FAILED D (1395) HUB: Recovering root port D (1395) HUB: Stage done: NONE D (1415) cdc_acm: Checking list of connected USB devices D (1465) cdc_acm: Checking list of connected USB devices D (1515) cdc_acm: Checking list of connected USB devices D (1565) cdc_acm: Checking list of connected USB devices D (1615) cdc_acm: Checking list of connected USB devices D (1665) cdc_acm: Checking list of connected USB devices D (1715) cdc_acm: Checking list of connected USB devices D (1765) cdc_acm: Checking list of connected USB devices D (1815) cdc_acm: Checking list of connected USB devices D (1865) cdc_acm: Checking list of connected USB devices D (1915) cdc_acm: Checking list of connected USB devices D (1965) cdc_acm: Checking list of connected USB devices D (2015) cdc_acm: Checking list of connected USB devices D (2065) cdc_acm: Checking list of connected USB devices D (2115) cdc_acm: Checking list of connected USB devices D (2165) cdc_acm: Checking list of connected USB devices D (2215) cdc_acm: Checking list of connected USB devices D (2265) cdc_acm: Checking list of connected USB devices D (2315) cdc_acm: Checking list of connected USB devices D (2365) cdc_acm: Checking list of connected USB devices D (2405) HUB: Root port reset D (2405) HUB: Stage done: START D (2405) HUB: Stage done: GET_SHORT_DEV_DESC D (2405) HUB: Stage done: CHECK_SHORT_DEV_DESC D (2415) cdc_acm: Checking list of connected USB devices D (2465) HUB: Stage done: SECOND_RESET D (2465) HUB: Stage done: SET_ADDR D (2465) HUB: Stage done: CHECK_ADDR D (2465) HUB: Stage done: GET_FULL_DEV_DESC D (2465) HUB: Stage done: CHECK_FULL_DEV_DESC D (2465) HUB: Stage done: GET_SHORT_CONFIG_DESC D (2475) HUB: Stage done: CHECK_SHORT_CONFIG_DESC D (2475) HUB: Stage done: GET_FULL_CONFIG_DESC D (2485) HUB: Stage done: CHECK_FULL_CONFIG_DESC D (2485) HUB: Stage done: SET_CONFIG D (2495) HUB: Stage done: CHECK_CONFIG D (2495) HUB: Stage done: GET_SHORT_LANGID_TABLE D (2495) HUB: Stage done: CHECK_SHORT_LANGID_TABLE D (2505) HUB: Stage done: GET_FULL_LANGID_TABLE D (2505) HUB: Stage done: CHECK_FULL_LANGID_TABLE D (2515) HUB: Stage done: GET_SHORT_MANU_STR_DESC D (2515) HUB: Stage done: CHECK_SHORT_MANU_STR_DESC D (2525) HUB: Stage done: GET_FULL_MANU_STR_DESC D (2525) HUB: Stage done: CHECK_FULL_MANU_STR_DESC D (2535) HUB: Stage done: GET_SHORT_PROD_STR_DESC D (2535) HUB: Stage done: CHECK_SHORT_PROD_STR_DESC D (2545) HUB: Stage done: GET_FULL_PROD_STR_DESC D (2545) HUB: Stage done: CHECK_FULL_PROD_STR_DESC D (2555) HUB: Stage done: GET_SHORT_SER_STR_DESC D (2555) HUB: Stage done: CHECK_SHORT_SER_STR_DESC D (2565) HUB: Stage done: GET_FULL_SER_STR_DESC D (2565) HUB: Stage done: CHECK_FULL_SER_STR_DESC D (2575) HUB: Stage done: CLEANUP D (2575) USBH: Processing actions 0x100 D (2575) USBH: New device 1 D (2585) cdc_acm: New device connected D (2585) cdc_acm: Checking list of connected USB devices D (2645) cdc_acm: Checking list of connected USB devices D (2695) cdc_acm: Checking list of connected USB devices D (2745) cdc_acm: Checking list of connected USB devices D (2795) cdc_acm: Checking list of connected USB devices D (2845) cdc_acm: Checking list of connected USB devices D (2895) cdc_acm: Checking list of connected USB devices D (2915) USBH: Processing actions 0x40 D (2915) USBH: Freeing device 1 D (2915) USBH: Device all free D (2915) HUB: Recovering root port D (2925) usb_terminal: All free: uninstall USB lib

D (2945) cdc_acm: Checking list of connected USB devices D (2995) cdc_acm: Checking list of connected USB devices D (3045) cdc_acm: Checking list of connected USB devices D (3095) cdc_acm: Checking list of connected USB devices D (3145) cdc_acm: Checking list of connected USB devices D (3195) cdc_acm: Checking list of connected USB devices D (3245) cdc_acm: Checking list of connected USB devices D (3295) cdc_acm: Checking list of connected USB devices D (3345) cdc_acm: Checking list of connected USB devices D (3395) cdc_acm: Checking list of connected USB devices D (3445) cdc_acm: Checking list of connected USB devices D (3495) cdc_acm: Checking list of connected USB devices D (3545) cdc_acm: Checking list of connected USB devices D (3595) cdc_acm: Checking list of connected USB devices D (3645) cdc_acm: Checking list of connected USB devices D (3695) cdc_acm: Checking list of connected USB devices D (3745) cdc_acm: Checking list of connected USB devices D (3795) cdc_acm: Checking list of connected USB devices D (3845) cdc_acm: Checking list of connected USB devices D (3895) cdc_acm: Checking list of connected USB devices D (3945) cdc_acm: Checking list of connected USB devices D (3995) cdc_acm: Checking list of connected USB devices D (4045) cdc_acm: Checking list of connected USB devices D (4095) cdc_acm: Checking list of connected USB devices D (4145) cdc_acm: Checking list of connected USB devices D (4195) cdc_acm: Checking list of connected USB devices D (4245) cdc_acm: Checking list of connected USB devices D (4295) cdc_acm: Checking list of connected USB devices D (4345) cdc_acm: Checking list of connected USB devices D (4395) cdc_acm: Checking list of connected USB devices D (4445) cdc_acm: Checking list of connected USB devices D (4495) cdc_acm: Checking list of connected USB devices D (4545) cdc_acm: Checking list of connected USB devices D (4595) cdc_acm: Checking list of connected USB devices D (4645) cdc_acm: Checking list of connected USB devices D (4695) cdc_acm: Checking list of connected USB devices D (4745) cdc_acm: Checking list of connected USB devices D (4795) cdc_acm: Checking list of connected USB devices D (4845) cdc_acm: Checking list of connected USB devices D (4895) cdc_acm: Checking list of connected USB devices D (4945) cdc_acm: Checking list of connected USB devices D (4995) cdc_acm: Checking list of connected USB devices D (5045) cdc_acm: Checking list of connected USB devices D (5095) cdc_acm: Checking list of connected USB devices D (5145) cdc_acm: Checking list of connected USB devices D (5195) cdc_acm: Checking list of connected USB devices D (5245) cdc_acm: Checking list of connected USB devices D (5295) cdc_acm: Checking list of connected USB devices D (5345) cdc_acm: Checking list of connected USB devices D (5395) cdc_acm: Checking list of connected USB devices D (5445) cdc_acm: Checking list of connected USB devices D (5495) cdc_acm: Checking list of connected USB devices D (5545) cdc_acm: Checking list of connected USB devices D (5595) cdc_acm: Checking list of connected USB devices D (5645) cdc_acm: Checking list of connected USB devices D (5695) cdc_acm: Checking list of connected USB devices D (5745) cdc_acm: Checking list of connected USB devices D (5795) cdc_acm: Checking list of connected USB devices D (5845) cdc_acm: Checking list of connected USB devices D (5895) cdc_acm: Checking list of connected USB devices D (5945) cdc_acm: Checking list of connected USB devices D (5995) cdc_acm: Checking list of connected USB devices D (6045) cdc_acm: Checking list of connected USB devices D (6095) cdc_acm: Checking list of connected USB devices D (6145) cdc_acm: Checking list of connected USB devices D (6195) cdc_acm: Checking list of connected USB devices D (6245) cdc_acm: Checking list of connected USB devices D (6295) cdc_acm: Checking list of connected USB devices D (6345) cdc_acm: Checking list of connected USB devices D (6395) cdc_acm: Checking list of connected USB devices D (6445) cdc_acm: Checking list of connected USB devices D (6495) cdc_acm: Checking list of connected USB devices D (6545) cdc_acm: Checking list of connected USB devices D (6595) cdc_acm: Checking list of connected USB devices D (6645) cdc_acm: Checking list of connected USB devices D (6695) cdc_acm: Checking list of connected USB devices D (6745) cdc_acm: Checking list of connected USB devices D (6795) cdc_acm: Checking list of connected USB devices D (6845) cdc_acm: Checking list of connected USB devices D (6895) cdc_acm: Checking list of connected USB devices D (6945) cdc_acm: Checking list of connected USB devices D (6995) cdc_acm: Checking list of connected USB devices D (7045) cdc_acm: Checking list of connected USB devices D (7095) cdc_acm: Checking list of connected USB devices D (7145) cdc_acm: Checking list of connected USB devices D (7195) cdc_acm: Checking list of connected USB devices D (7245) cdc_acm: Checking list of connected USB devices D (7295) cdc_acm: Checking list of connected USB devices`

abhi-ratnman commented 1 year ago

@tore-espressif @david-cermak any clue from the logs? Actually we are running late for the integration in our product. Hence I request if you can escalate the issue. Thanks :)

tore-espressif commented 1 year ago

Hi @abhi-ratnman , I just got mine SIMCom SIM7600E-H. It is a little different from the module that you have. My PID, VID is: 0x1E0E:0x9001. I'm using endpoints 0x86 (IN) and 0x04 (OUT), which belong to interface no 3.

Please note that we updated the USB-DTE a little in past weeks, the changes might affect your usecase. I'm working with:

Everything is working as expected with this initialization code:

struct esp_modem_usb_term_config usb_config = ESP_MODEM_DEFAULT_USB_CONFIG(0x1e0e, 0x09001, 3); // VID, PID and interface num of SIM7600E-H modem
const esp_modem_dte_config_t dte_config = ESP_MODEM_DTE_DEFAULT_USB_CONFIG(usb_config);  
ESP_LOGI(TAG, "Waiting for USB device connection...");
auto dte = create_usb_dte(&dte_config);
std::unique_ptr<DCE> dce = create_SIM7600_dce(&dce_config, dte, esp_netif);

Example output: image

any clue from the logs?

From the logs I can see two things:

  1. You aren't using the latest modem_console example. Try updating your local branch. Then configure the project for esp32s3, USB DTE and change only the configuration of USB-DTE
  2. The USB library detects connection of a new device. But fails to open it. Updating to the latest code should fix your problem
abhi-ratnman commented 1 year ago

@tore-espressif @david-cermak

I updated to the latest esp-protocols something strange is happening even if i set target to esp32s3 the target is set to esp32c3.

Do not know the reason for that. Earlier when i would set target to esp32s3 it would set but in the latest update

C:\Espressif\frameworks\esp-idf-v4.4.1\projects\esp-protocols\components\esp_modem\examples\modem_console>idf.py set-target esp32s3 Adding "set-target"'s dependency "fullclean" to list of commands with default set of options. Executing action: fullclean Build directory 'c:\espressif\frameworks\esp-idf-v4.4.1\projects\esp-protocols\components\esp_modem\examples\modem_console\build' not found. Nothing to clean. Executing action: set-target Set Target to: esp32s3, new sdkconfig created. Existing sdkconfig renamed to sdkconfig.old. Running cmake in directory c:\espressif\frameworks\esp-idf-v4.4.1\projects\esp-protocols\components\esp_modem\examples\modem_console\build Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DIDF_TARGET=esp32s3 -DIDF_TARGET=esp32c3 -DCCACHE_ENABLE=1 c:\espressif\frameworks\esp-idf-v4.4.1\projects\esp-protocols\components\esp_modem\examples\modem_console"... -- Found Git: C:/Espressif/frameworks/tools/Espressif/tools/idf-git/2.34.2/cmd/git.exe (found version "2.34.1.windows.1") -- ccache will be used for faster recompilation -- The C compiler identification is GNU 8.4.0 -- The CXX compiler identification is GNU 8.4.0 -- The ASM compiler identification is GNU -- Found assembler: C:/Espressif/frameworks/tools/Espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc.exe -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Espressif/frameworks/tools/Espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/Espressif/frameworks/tools/Espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-g++.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Building ESP-IDF components for target esp32c3 Skipping optional dependency: espressif/esp_modem_usb_dte Solving dependencies requirements Updating lock file at C:/Espressif/frameworks/esp-idf-v4.4.1/projects/esp-protocols/components/esp_modem/examples/modem_console\dependencies.lock Processing 2 dependencies: [1/2] espressif/esp_modem (0.1.23) [2/2] idf (4.4.1) Skipping optional dependency: espressif/esp_modem_usb_dte -- Project sdkconfig file C:/Espressif/frameworks/esp-idf-v4.4.1/projects/esp-protocols/components/esp_modem/examples/modem_console/sdkconfig Loading defaults file C:/Espressif/frameworks/esp-idf-v4.4.1/projects/esp-protocols/components/esp_modem/examples/modem_console/sdkconfig.defaults... -- Found Python3: C:/Espressif/frameworks/tools/Espressif/python_env/idf4.4_py3.8_env/Scripts/python.exe (found version "3.8.7") found components: Interpreter -- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS -- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success -- App "modem-console" version: 511ed54 -- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/projects/esp-protocols/components/esp_modem/examples/modem_console/build/esp-idf/esp_system/ld/memory.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_system/ld/esp32c3/sections.ld.in -- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_rom/esp32c3/ld/esp32c3.rom.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_rom/esp32c3/ld/esp32c3.rom.api.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_rom/esp32c3/ld/esp32c3.rom.libgcc.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_rom/esp32c3/ld/esp32c3.rom.newlib.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_rom/esp32c3/ld/esp32c3.rom.version.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_rom/esp32c3/ld/esp32c3.rom.newlib-time.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_rom/esp32c3/ld/esp32c3.rom.eco3.ld -- Adding linker script C:/Espressif/frameworks/esp-idf-v4.4.1/components/soc/esp32c3/ld/esp32c3.peripherals.ld -- Components: app_trace app_update asio bootloader bootloader_support bt cbor cmock coap console cxx driver efuse esp-tls esp32c3 esp_adc_cal esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_ipc esp_lcd esp_local_ctrl esp_modem esp_netif esp_phy esp_pm esp_ringbuf esp_rom esp_serial_slave_link esp_system esp_timer esp_websocket_client esp_wifi espcoredump esptool_py expat fatfs freemodbus freertos hal heap idf_test ieee802154 jsmn json libsodium log lwip main mbedtls mdns mqtt newlib nghttp nvs_flash openssl openthread partition_table protobuf-c protocomm pthread riscv sdmmc soc spi_flash spiffs tcp_transport tcpip_adapter tinyusb unity usb vfs wear_levelling wifi_provisioning wpa_supplicant -- Component paths: C:/Espressif/frameworks/esp-idf-v4.4.1/components/app_trace C:/Espressif/frameworks/esp-idf-v4.4.1/components/app_update C:/Espressif/frameworks/esp-idf-v4.4.1/components/asio C:/Espressif/frameworks/esp-idf-v4.4.1/components/bootloader C:/Espressif/frameworks/esp-idf-v4.4.1/components/bootloader_support C:/Espressif/frameworks/esp-idf-v4.4.1/components/bt C:/Espressif/frameworks/esp-idf-v4.4.1/components/cbor C:/Espressif/frameworks/esp-idf-v4.4.1/components/cmock C:/Espressif/frameworks/esp-idf-v4.4.1/components/coap C:/Espressif/frameworks/esp-idf-v4.4.1/components/console C:/Espressif/frameworks/esp-idf-v4.4.1/components/cxx C:/Espressif/frameworks/esp-idf-v4.4.1/components/driver C:/Espressif/frameworks/esp-idf-v4.4.1/components/efuse C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp-tls C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp32c3 C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_adc_cal C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_common C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_eth C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_event C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_gdbstub C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_hid C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_http_client C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_http_server C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_https_ota C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_https_server C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_hw_support C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_ipc C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_lcd C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_local_ctrl C:/Espressif/frameworks/esp-idf-v4.4.1/projects/esp-protocols/components/esp_modem C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_netif C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_phy C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_pm C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_ringbuf C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_rom C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_serial_slave_link C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_system C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_timer C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_websocket_client C:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_wifi C:/Espressif/frameworks/esp-idf-v4.4.1/components/espcoredump C:/Espressif/frameworks/esp-idf-v4.4.1/components/esptool_py C:/Espressif/frameworks/esp-idf-v4.4.1/components/expat C:/Espressif/frameworks/esp-idf-v4.4.1/components/fatfs C:/Espressif/frameworks/esp-idf-v4.4.1/components/freemodbus C:/Espressif/frameworks/esp-idf-v4.4.1/components/freertos C:/Espressif/frameworks/esp-idf-v4.4.1/components/hal C:/Espressif/frameworks/esp-idf-v4.4.1/components/heap C:/Espressif/frameworks/esp-idf-v4.4.1/components/idf_test C:/Espressif/frameworks/esp-idf-v4.4.1/components/ieee802154 C:/Espressif/frameworks/esp-idf-v4.4.1/components/jsmn C:/Espressif/frameworks/esp-idf-v4.4.1/components/json C:/Espressif/frameworks/esp-idf-v4.4.1/components/libsodium C:/Espressif/frameworks/esp-idf-v4.4.1/components/log C:/Espressif/frameworks/esp-idf-v4.4.1/components/lwip C:/Espressif/frameworks/esp-idf-v4.4.1/projects/esp-protocols/components/esp_modem/examples/modem_console/main C:/Espressif/frameworks/esp-idf-v4.4.1/components/mbedtls C:/Espressif/frameworks/esp-idf-v4.4.1/components/mdns C:/Espressif/frameworks/esp-idf-v4.4.1/components/mqtt C:/Espressif/frameworks/esp-idf-v4.4.1/components/newlib C:/Espressif/frameworks/esp-idf-v4.4.1/components/nghttp C:/Espressif/frameworks/esp-idf-v4.4.1/components/nvs_flash C:/Espressif/frameworks/esp-idf-v4.4.1/components/openssl C:/Espressif/frameworks/esp-idf-v4.4.1/components/openthread C:/Espressif/frameworks/esp-idf-v4.4.1/components/partition_table C:/Espressif/frameworks/esp-idf-v4.4.1/components/protobuf-c C:/Espressif/frameworks/esp-idf-v4.4.1/components/protocomm C:/Espressif/frameworks/esp-idf-v4.4.1/components/pthread C:/Espressif/frameworks/esp-idf-v4.4.1/components/riscv C:/Espressif/frameworks/esp-idf-v4.4.1/components/sdmmc C:/Espressif/frameworks/esp-idf-v4.4.1/components/soc C:/Espressif/frameworks/esp-idf-v4.4.1/components/spi_flash C:/Espressif/frameworks/esp-idf-v4.4.1/components/spiffs C:/Espressif/frameworks/esp-idf-v4.4.1/components/tcp_transport C:/Espressif/frameworks/esp-idf-v4.4.1/components/tcpip_adapter C:/Espressif/frameworks/esp-idf-v4.4.1/components/tinyusb C:/Espressif/frameworks/esp-idf-v4.4.1/components/unity C:/Espressif/frameworks/esp-idf-v4.4.1/components/usb C:/Espressif/frameworks/esp-idf-v4.4.1/components/vfs C:/Espressif/frameworks/esp-idf-v4.4.1/components/wear_levelling C:/Espressif/frameworks/esp-idf-v4.4.1/components/wifi_provisioning C:/Espressif/frameworks/esp-idf-v4.4.1/components/wpa_supplicant -- Configuring done -- Generating done -- Build files have been written to: C:/Espressif/frameworks/esp-idf-v4.4.1/projects/esp-protocols/components/esp_modem/examples/modem_console/build

tore-espressif commented 1 year ago

Ah, I'm sorry about that, that;s a regression from https://github.com/espressif/esp-protocols/pull/155. Please remove this line https://github.com/espressif/esp-protocols/blob/master/components/esp_modem/examples/modem_console/sdkconfig.defaults#L4 and rebuild from clean state (idf.py fullclean)

abhi-ratnman commented 1 year ago

@tore-espressif thanks for a prompt reply

Yes now it is solved but the earlier issue still remains in the latest code. As soon as USB is connected the SIM module gets powered off and it gets restart again and again.

While the same connection works fine with https://github.com/espressif/esp-iot-solution/tree/usb/add_usb_solutions/examples/usb/host/usb_cdc_4g_module this code. But the issue in this code is that I want to access CMUX but that is not implemented in the above example.

tore-espressif commented 1 year ago

@abhi-ratnman the unexpected resets might come from incorrect/insufficient power supply. Please check that your power supply has enough power for powering the SIM7672.

From the setup in the photo, I can see the USB VBUS signal is invalid too. ESP32-S3 devkit does NOT output +5V on the USB cable, so your VBUS line is not powered. Try connecting +5v on the VBUS line on SIM7672 USB connector.

abhi-ratnman commented 1 year ago

@tore-espressif

For power supply a separate 5v 2A SMPS is used to power the SIM module which provides sufficient power to the module.

@abhi-ratnman the unexpected resets might come from incorrect/insufficient power supply. Please check that your power supply has enough power for powering the SIM7672.

From the setup in the photo, I can see the USB VBUS signal is invalid too. ESP32-S3 devkit does NOT output +5V on the USB cable, so your VBUS line is not powered. Try connecting +5v on the VBUS line on SIM7672 USB connector.

The same hardware connection work with the esp-iot-solution code as per the link provided. So if that would have been the issue it should occur there too?

Screenshot (53) the above image is a modified version of that code which only provides IP address

abhi-ratnman commented 1 year ago

@tore-espressif @david-cermak any update on this?

tore-espressif commented 1 year ago

Hi @abhi-ratnman , our support options are running short :( I have a little different modem than you have (although, the USB interface should be the same), with different firmware version. Unfortunately, I can't reproduce the issue.

Now, all we can do is (1)suggest a fix and (2)you have to try it and repeat until the issue is solved.

Have you tried connecting +5V on the modem's USB connector?

The same hardware connection work with the esp-iot-solution code as per the link provided. So if that would have been the issue it should occur there too?

I guess that the modem is not properly enumerated by the ESP32-S3 because it fails to reconnect after USB 2nd reset. USB 2nd reset is a standard thing in enumeration process; every USB Host (Windows, Linux PCs) does it. But, the USB host implementation in the code that you're linking does not do it, simply because it is a pre-release version of Espressif's USB host.

abhi-ratnman commented 1 year ago

Hi @tore-espressif have tried with 5v usb supply still issue is the same

guianmon99 commented 1 year ago

HI @tore-espressif , I have a similar issue I am using the usb cdc_acm_host library to connect to a hl8548 from sierra wl. I am trying to use the cdc_acm_host_open() function to connect to it and send AT commands. The function works and i am able to connect to the endpoints but when i send some AT commands the module doesn't respond back. I am using the esp_idfV4.4.2. we have been testing with the BG96 module and all works perfectly. could there be an issue with the fact that this module uses interface association ? I think the function I am suing supports it but I am not sure.

guianmon99 commented 1 year ago

@tore-espressif this are the deescriptors from the module I am using. I have tried to connect to all interfaces Bus 001 Device 032: ID 1519:0020 Comneon HSIC Device Couldn't open device, some information will be missing Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x1519 Comneon idProduct 0x0020 HSIC Device bcdDevice 17.29 iManufacturer 1 Comneon iProduct 2 7 CDC-ACM iSerial 3 014869005829421 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x01e7 bNumInterfaces 15 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 100mA Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 0 bInterfaceCount 2 bFunctionClass 2 Communications bFunctionSubClass 2 Abstract (modem) bFunctionProtocol 1 AT-commands (v.25ter) iFunction 4 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 1 AT-commands (v.25ter) iInterface 5 CDC Header: bcdCDC 1.20 CDC Union: bMasterInterface 0 bSlaveInterface 1 CDC Call Management: bmCapabilities 0x00 bDataInterface 1 CDC ACM: bmCapabilities 0x07 sends break line coding and serial state get/set/clear comm features Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 4 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 6 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 2 bInterfaceCount 2 bFunctionClass 2 Communications bFunctionSubClass 2 Abstract (modem) bFunctionProtocol 1 AT-commands (v.25ter) iFunction 7 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 1 AT-commands (v.25ter) iInterface 8 CDC Header: bcdCDC 1.20 CDC Union: bMasterInterface 2 bSlaveInterface 3 CDC Call Management: bmCapabilities 0x00 bDataInterface 3 CDC ACM: bmCapabilities 0x07 sends break line coding and serial state get/set/clear comm features Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 4 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 9 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x84 EP 4 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x04 EP 4 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 4 bInterfaceCount 2 bFunctionClass 2 Communications bFunctionSubClass 2 Abstract (modem) bFunctionProtocol 1 AT-commands (v.25ter) iFunction 10 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 4 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 1 AT-commands (v.25ter) iInterface 11 CDC Header: bcdCDC 1.20 CDC Union: bMasterInterface 4 bSlaveInterface 5 CDC Call Management: bmCapabilities 0x00 bDataInterface 5 CDC ACM: bmCapabilities 0x07 sends break line coding and serial state get/set/clear comm features Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x85 EP 5 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 4 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 5 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 12 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x86 EP 6 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x06 EP 6 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 6 bInterfaceCount 2 bFunctionClass 2 Communications bFunctionSubClass 2 Abstract (modem) bFunctionProtocol 1 AT-commands (v.25ter) iFunction 13 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 6 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 1 AT-commands (v.25ter) iInterface 14 CDC Header: bcdCDC 1.20 CDC Union: bMasterInterface 6 bSlaveInterface 7 CDC Call Management: bmCapabilities 0x00 bDataInterface 7 CDC ACM: bmCapabilities 0x07 sends break line coding and serial state get/set/clear comm features Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x87 EP 7 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 4 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 7 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 15 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x88 EP 8 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x08 EP 8 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 8 bInterfaceCount 2 bFunctionClass 2 Communications bFunctionSubClass 2 Abstract (modem) bFunctionProtocol 1 AT-commands (v.25ter) iFunction 16 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 8 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 1 AT-commands (v.25ter) iInterface 17 CDC Header: bcdCDC 1.20 CDC Union: bMasterInterface 8 bSlaveInterface 9 CDC Call Management: bmCapabilities 0x00 bDataInterface 9 CDC ACM: bmCapabilities 0x07 sends break line coding and serial state get/set/clear comm features Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x89 EP 9 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 4 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 9 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 18 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x8a EP 10 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x0a EP 10 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 10 bInterfaceCount 2 bFunctionClass 2 Communications bFunctionSubClass 2 Abstract (modem) bFunctionProtocol 1 AT-commands (v.25ter) iFunction 19 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 10 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 1 AT-commands (v.25ter) iInterface 20 CDC Header: bcdCDC 1.20 CDC Union: bMasterInterface 10 bSlaveInterface 11 CDC Call Management: bmCapabilities 0x00 bDataInterface 11 CDC ACM: bmCapabilities 0x07 sends break line coding and serial state get/set/clear comm features Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x8b EP 11 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 4 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 11 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 21 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x8c EP 12 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x0c EP 12 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 12 bInterfaceCount 2 bFunctionClass 2 Communications bFunctionSubClass 2 Abstract (modem) bFunctionProtocol 1 AT-commands (v.25ter) iFunction 22 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 12 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 1 AT-commands (v.25ter) iInterface 23 CDC Header: bcdCDC 1.20 CDC Union: bMasterInterface 12 bSlaveInterface 13 CDC Call Management: bmCapabilities 0x00 bDataInterface 13 CDC ACM: bmCapabilities 0x07 sends break line coding and serial state get/set/clear comm features Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x8d EP 13 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 4 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 13 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 24 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x8e EP 14 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x0e EP 14 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 14 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 1 bInterfaceProtocol 0 iInterface 25 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x8f EP 15 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0004 1x 4 bytes bInterval 1

tore-espressif commented 1 year ago

Hello, We have recently fixed several enumeration issues in esp-idf master. There are also few bugfixes in esp_modem_usb_dte v1.1.0. All the fixes are already implemented in esp_modem examples. Could you please update your esp-idf and esp_modem and try again?