-
Notifications
You must be signed in to change notification settings - Fork 792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
usb cdc 4g module connection (AEGHB-244) #276
Comments
@mayankbytebeam Which development board do you use? Please make sure the device is powered |
@leeebo I used ESP32S3 DevKitC1 and SIM7600 module in this setup. |
@mayankbytebeam ESP32S3 DevKitC1 USB Port can not output 5V power. |
@leeebo ok now I've powered the modem board exrternally but still some error is coming
I've selected the modem baord as |
@mayankbytebeam 4G modules generally have multiple interfaces, of which only one is the Modem interface, it seems |
@mayankbytebeam If you don't know how to find the endpoint address of the interface, please attach your full log here, i will help |
@leeebo sorry for the delay, we have changed the design a bit. Now we are using the N706 modem instead of SIM7600. Serial logs,
|
@leeebo Can you help to find out the correct cdc endpoint addresses, Here are are serial logs,
|
Hi, I m facing the same issue. @leeebo which interface class's endpoints should i use from below - sudo lsusb -v -d 2949:7401 Bus 001 Device 008: ID 2949:7401 NEOWAY NEOWAY-N58 -------------------------------------------------------* Above data is from linux using lsusb command with Modem attached to laptop. -----------------------------------------------------*-**- BELOW ESP32 LOG WITH MODEM -----------------------------------------------------*-**- I (10806) modem_board: reconnect after 5s... -----------------------------------------------------*-**- @mayankbytebeam - Any Solution You Found ? |
@leeebo Thanks for your input. 0x85 and 0x04 worked for me. |
Hi @mayankbytebeam , I guess you are using NEOWAY module. I have tried all the EPs
|
@lovepreethitech Hi please link |
Hi @leeebo Could you please share the AT commands list that ESP send to 4G modem. Because my module is unresponsive to some commands. If i get the list i could check if that is working or not. And Yes i have connected the modem reset pin to ESP. |
@lovepreethitech Hi, please set the ESP_LOG level to verbose to find the detailed Interaction process |
@lovepreethitech Can you try commenting the command that is stucking? Edit : I faced the same issue and after commenting the stuck command it went ahead and connected to my application server. |
@mayankbytebeam In which file you comment that ? |
@mayankbytebeam I am using SIM7600 4G HAT,i got it form waveshare ,i can connect it to esp32s3,but i found something is wrong. Here are are serial logs: I (10811) modem_board: reconnect after 5s... Core 0 register dump: A2 : 0x3fcb9904 A3 : 0x0000001d A4 : 0x0000000c A5 : 0x00000000 0x400556e5: strlen in ROM Backtrace: 0x4200c1e6:0x3fcba830 0x4200ceb1:0x3fcba870 0x4200cfc1:0x3fcba8a0 0x4200ceb1: esp_dte_handle_line at D:/esp-iot-solution/components/usb/iot_usbh_modem/src/esp_modem_usb_dte.c:79 0x4200cfc1: esp_handle_usb_data at D:/esp-iot-solution/components/usb/iot_usbh_modem/src/esp_modem_usb_dte.c:119 ELF file SHA256: 4830ec08a754ae29 how can i fix it ? |
esp32s3 (合宙 luatos.com) and air780e 4G |
Maybe some of the environment dependencies weren't introduced correctly, I've solved my problem and it looks similar to yours
…---Original---
From: ***@***.***>
Date: Tue, Sep 19, 2023 17:58 PM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [espressif/esp-iot-solution] usb cdc 4g module connection(AEGHB-244) (Issue #276)
Hello, I used Lexin's esp32s3 DevKitC1 development board and Heju's AIR780E for USB host communication, but there were errors and timeout issues related to the ESP32-S3 modem module. What is the reason for this? I cannot find a solution。Here is my output log
I (43) boot: ESP-IDF v4.4.4-dirty 2nd stage bootloader
I (43) boot: compile time 12:18:19
I (43) boot: chip revision: v0.1
I (45) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (52) qio_mode: Enabling default flash chip QIO
I (58) boot.esp32s3: Boot SPI Speed : 80MHz
I (63) boot.esp32s3: SPI Mode : QIO
I (67) boot.esp32s3: SPI Flash Size : 8MB
I (72) boot: Enabling RNG early entropy source...
I (77) boot: Partition Table:
I (81) boot: ## Label Usage Type ST Offset Length
I (88) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (96) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (103) boot: 2 factory factory app 00 00 00010000 00100000
I (111) boot: 3 storage Unknown data 01 82 00110000 00100000
I (118) boot: End of partition table
I (123) boot_comm: chip revision: 1, min. application chip revision: 0
I (130) esp_image: segment 0: paddr=00010020 vaddr=3c080020 size=1b664h (112228) map
I (155) esp_image: segment 1: paddr=0002b68c vaddr=3fc99d10 size=0443ch ( 17468) load
I (159) esp_image: segment 2: paddr=0002fad0 vaddr=40374000 size=00548h ( 1352) load
I (161) esp_image: segment 3: paddr=00030020 vaddr=42000020 size=7fbb4h (523188) map
I (249) esp_image: segment 4: paddr=000afbdc vaddr=40374548 size=157bch ( 87996) load
I (274) boot: Loaded app from partition at offset 0x10000
I (275) boot: Disabling RNG early entropy source...
I (286) cpu_start: Pro cpu up.
I (286) cpu_start: Starting app cpu, entry point is 0x403756b0
0x403756b0: call_start_cpu1 at C:/Users/huang/esp/esp-idf/components/esp_system/port/cpu_start.c:148
I (0) cpu_start: App cpu up.
I (300) cpu_start: Pro cpu start user code
I (300) cpu_start: cpu freq: 240000000
I (300) cpu_start: Application information:
I (303) cpu_start: Project name: usb_cdc_4g_module
I (309) cpu_start: App version: 1
I (313) cpu_start: Compile time: Sep 19 2023 17:51:12
I (319) cpu_start: ELF file SHA256: d01d46f315f7c67d...
I (325) cpu_start: ESP-IDF: v4.4.4-dirty
I (331) heap_init: Initializing. RAM available for dynamic allocation:
I (338) heap_init: At 3FCA15A8 len 00048168 (288 KiB): D/IRAM
I (344) heap_init: At 3FCE9710 len 00005724 (21 KiB): STACK/DRAM
I (351) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (357) heap_init: At 600FE000 len 00002000 (8 KiB): RTCRAM
I (364) spi_flash: detected chip: generic
I (368) spi_flash: flash io: qio
I (372) sleep: Configure to isolate all GPIO pins in sleep state
I (379) sleep: Enable automatic switching of GPIO sleep configuration
I (386) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (401) led_indicator: LED Indicator Version: 0.3.0
I (407) gpio: GPIO[15]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (416) led_indicator: blink_lists is null, use default blink list
W (423) led_indicator: ./managed_components/espressif__led_indicator/src/led_indicator.c:280 (_led_indicator_create_com):LED indicator does not have the hal_indicator_set_brightness function
I (440) led_indicator: Indicator create successfully. type:GPIO mode, hardware_data:0xf, is_active_level_high:1, blink_lists:default
I (453) led_indicator: LED Indicator Version: 0.3.0
I (459) gpio: GPIO[17]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (468) led_indicator: blink_lists is null, use default blink list
W (475) led_indicator: ./managed_components/espressif__led_indicator/src/led_indicator.c:280 (_led_indicator_create_com):LED indicator does not have the hal_indicator_set_brightness function
I (492) led_indicator: Indicator create successfully. type:GPIO mode, hardware_data:0x11, is_active_level_high:1, blink_lists:default
I (505) led_indicator: LED Indicator Version: 0.3.0
I (511) gpio: GPIO[16]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (520) led_indicator: blink_lists is null, use default blink list
W (527) led_indicator: ./managed_components/espressif__led_indicator/src/led_indicator.c:280 (_led_indicator_create_com):LED indicator does not have the hal_indicator_set_brightness function
I (544) led_indicator: Indicator create successfully. type:GPIO mode, hardware_data:0x10, is_active_level_high:1, blink_lists:default
I (3576) 4g_main: ====================================
I (3576) 4g_main: ESP 4G Cat.1 Wi-Fi Router
I (3576) 4g_main: ====================================
I (3582) modem_board: iot_usbh_modem, version: 0.1.6
I (3587) modem_board: Force reset modem board....
I (3593) gpio: GPIO[13]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (3602) modem_board: Resetting modem using io=13, level=0
I (3808) modem_board: Waiting for modem initialize ready
I (8808) USB_HCDC: iot_usbh_cdc, version: 0.1.3
I (8808) IOT_USBH: iot_usbh, version: 0.1.2
I (8838) IOT_USBH: USB Port=1 init succeed, fifo strategy=0
I (8838) USB_HCDC: CDC task start
I (8838) IOT_USBH: usb port start succeed
I (8842) USB_HCDC: usbh cdc driver install succeed
I (8847) USB_HCDC: Waiting CDC Device Connection
I (8852) IOT_USBH: USB Processing Start
I (8857) IOT_USBH: Waiting USB Connection
I (8861) IOT_USBH: Port power: ON Succeed
I (9116) IOT_USBH: line 131 PORT_EVENT_CONNECTION
I (9216) IOT_USBH: Resetting Port
I (9276) IOT_USBH: Port reset succeed
I (9276) IOT_USBH: Getting Port Speed
I (9276) IOT_USBH: USB Speed: full-speed
I (9278) IOT_USBH: Pipe init succeed, addr: 00
I (9283) IOT_USBH: Set Device Addr = 1
I (9288) IOT_USBH: Set Device Addr Done
I (9292) IOT_USBH: get device desc
I (9297) IOT_USBH: get device desc, actual_num_bytes:26
*** Device descriptor ***
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0xef
bDeviceSubClass 0x2
bDeviceProtocol 0x1
bMaxPacketSize0 64
idVendor 0x19d1
idProduct 0x1
bcdDevice 2.00
iManufacturer 1
iProduct 2
iSerialNumber 3
bNumConfigurations 1
I (9326) IOT_USBH: get short config desc
I (9331) IOT_USBH: get config desc, actual_num_bytes:16
I (9336) IOT_USBH: get full config desc
I (9341) IOT_USBH: get full config desc, actual_num_bytes:281
*** Configuration descriptor ***
bLength 9
bDescriptorType 2
wTotalLength 273
bNumInterfaces 8
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
bMaxPower 200mA
*** Interface descriptor ***
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 0xe0
bInterfaceSubClass 0x1
bInterfaceProtocol 0x3
iInterface 0
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 0x3 INT
wMaxPacketSize 8
bInterval 4
*** Interface descriptor ***
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 0xa
bInterfaceSubClass 0x0
bInterfaceProtocol 0x0
iInterface 0
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x1 EP 1 OUT
bmAttributes 0x2 BULK
wMaxPacketSize 64
bInterval 0
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 0x2 BULK
wMaxPacketSize 64
bInterval 0
*** Interface descriptor ***
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 0x2
bInterfaceSubClass 0x2
bInterfaceProtocol 0x1
iInterface 7
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 0x3 INT
wMaxPacketSize 16
bInterval 255
*** Interface descriptor ***
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 0xa
bInterfaceSubClass 0x0
bInterfaceProtocol 0x0
iInterface 0
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x2 EP 2 OUT
bmAttributes 0x2 BULK
wMaxPacketSize 64
bInterval 0
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 0x2 BULK
wMaxPacketSize 64
bInterval 0
*** Interface descriptor ***
bLength 9
bDescriptorType 4
bInterfaceNumber 4
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 0x2
bInterfaceSubClass 0x2
bInterfaceProtocol 0x1
iInterface 8
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x85 EP 5 IN
bmAttributes 0x3 INT
wMaxPacketSize 16
bInterval 255
*** Interface descriptor ***
bLength 9
bDescriptorType 4
bInterfaceNumber 5
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 0xa
bInterfaceSubClass 0x0
bInterfaceProtocol 0x0
iInterface 0
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x3 EP 3 OUT
bmAttributes 0x2 BULK
wMaxPacketSize 64
bInterval 0
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x86 EP 6 IN
bmAttributes 0x2 BULK
wMaxPacketSize 64
bInterval 0
*** Interface descriptor ***
bLength 9
bDescriptorType 4
bInterfaceNumber 6
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 0x2
bInterfaceSubClass 0x2
bInterfaceProtocol 0x1
iInterface 9
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x87 EP 7 IN
bmAttributes 0x3 INT
wMaxPacketSize 16
bInterval 255
*** Interface descriptor ***
bLength 9
bDescriptorType 4
bInterfaceNumber 7
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 0xa
bInterfaceSubClass 0x0
bInterfaceProtocol 0x0
iInterface 0
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x4 EP 4 OUT
bmAttributes 0x2 BULK
wMaxPacketSize 64
bInterval 0
*** Endpoint descriptor ***
bLength 7
bDescriptorType 5
bEndpointAddress 0x88 EP 8 IN
bmAttributes 0x2 BULK
wMaxPacketSize 64
bInterval 0
I (9675) IOT_USBH: Set Device Configuration = 1
I (9680) IOT_USBH: Set Device Configuration Done
I (9685) IOT_USBH: Pipe init succeed, addr: 87
I (9690) IOT_USBH: Pipe init succeed, addr: 02
I (9695) USB_HCDC: CDC Device Connected
I (9700) esp-modem: --------- Modem PreDefined Info ------------------
I (9707) esp-modem: Model: User Defined
I (9712) esp-modem: Modem itf: IN Addr:0x87, OUT Addr:0x02
I (9718) esp-modem: ----------------------------------------------------
I (9725) gpio: GPIO[12]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (9735) gpio: GPIO[13]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (9745) USB_HCDC: rx0 flush -0 = 0
I (9748) 4g_main: Modem Board Event: USB connected
I (9748) modem_board: DTE reconnect, reconnecting ...
I (10759) modem_board: reconnect after 5s...
I (11759) modem_board: reconnect after 4s...
I (12759) modem_board: reconnect after 3s...
I (13759) modem_board: reconnect after 2s...
I (14759) modem_board: reconnect after 1s...
I (14759) modem_board: Modem state STAGE_SYNC, Start
E (16769) esp-modem-dte: esp_modem_dte_send_cmd(266): process command timeout
response timeoutem_dce: esp_modem_dce_generic_command(22): Command:AT
I (16784) modem_board: Current timeouts: 1 and errors: 0
E (46784) esp-modem-dte: esp_modem_dte_send_cmd(266): process command timeout
W (46784) esp_modem_dce: esp_modem_dce_generic_command(22): Command:+++ response timeout
E (48789) esp-modem-dte: esp_modem_dte_send_cmd(266): process command timeout
response timeoutem_dce: esp_modem_dce_generic_command(22): Command:AT
E (50794) esp-modem-dte: esp_modem_dte_send_cmd(266): process command timeout
response timeoutem_dce: esp_modem_dce_generic_command(22): Command:AT
I (50809) modem_board: Current timeouts: 2 and errors: 0
W (50809) modem_board: Reset modem through reset pin........
W (50811) 4g_main: Modem Board Event: Hardware restart
I (50812) modem_board: modem_board_reset!
I (56022) 4g_main: Modem Board Event: Hardware restart done
E (58022) esp-modem-dte: esp_modem_dte_send_cmd(266): process command timeout
response timeoutem_dce: esp_modem_dce_generic_command(22): Command:AT
I (58037) modem_board: Current timeouts: 3 and errors: 0
I (58037) modem_board: modem_board_power_down!
E (68538) esp-modem-dte: esp_modem_dte_send_cmd(266): process command timeout
response timeoutem_dce: esp_modem_dce_generic_command(22): Command:AT
E (70543) esp-modem-dte: esp_modem_dte_send_cmd(266): process command timeout
response timeoutem_dce: esp_modem_dce_generic_command(22): Command:AT
I (70558) modem_board: Current timeouts: 4 and errors: 0
I (70558) modem_board: modem_board_power_down!
E (81059) esp-modem-dte: esp_modem_dte_send_cmd(266): process command timeout
response timeoutem_dce: esp_modem_dce_generic_command(22): Command:AT
E (83064) esp-modem-dte: esp_modem_dte_send_cmd(266): process command timeout
response timeoutem_dce: esp_modem_dce_generic_command(22): Command:AT
I (83079) modem_board: Current timeouts: 5 and errors: 0
I (83079) modem_board: modem_board_power_down!
E (93580) esp-modem-dte: esp_modem_dte_send_cmd(266): process command timeout
response timeoutem_dce: esp_modem_dce_generic_command(22): Command:AT
E (95585) esp-modem-dte: esp_modem_dte_send_cmd(266): process command timeout
response timeoutem_dce: esp_modem_dce_generic_command(22): Command:AT
E (95590) modem_board: modem_board_start_up(225): sending sync failed
I (95597) modem_board: Modem state STAGE_SYNC, Start
E (97613) esp-modem-dte: esp_modem_dte_send_cmd(266): process command timeout
response timeoutem_dce: esp_modem_dce_generic_command(22): Command:AT
I (97628) modem_board: Current timeouts: 1 and errors: 0
E (127628) esp-modem-dte: esp_modem_dte_send_cmd(266): process command timeout
W (127628) esp_modem_dce: esp_modem_dce_generic_command(22): Command:+++ response timeout
E (129633) esp-modem-dte: esp_modem_dte_send_cmd(266): process command timeout
response timeoutdem_dce: esp_modem_dce_generic_command(22): Command:AT
E (131638) esp-modem-dte: esp_modem_dte_send_cmd(266): process command timeout
response timeoutdem_dce: esp_modem_dce_generic_command(22): Command:AT
I (131653) modem_board: Current timeouts: 2 and errors: 0
W (131653) modem_board: Reset modem through reset pin........
W (131656) 4g_main: Modem Board Event: Hardware restart
I (131656) modem_board: modem_board_reset!
I (136866) 4g_main: Modem Board Event: Hardware restart done
E (138866) esp-modem-dte: esp_modem_dte_send_cmd(266): process command timeout
response timeoutdem_dce: esp_modem_dce_generic_command(22): Command:AT
I (138881) modem_board: Current timeouts: 3 and errors: 0
I (138881) modem_board: modem_board_power_down!
E (149383) esp-modem-dte: esp_modem_dte_send_cmd(266): process command timeout
response timeoutdem_dce: esp_modem_dce_generic_command(22): Command:AT
E (151388) esp-modem-dte: esp_modem_dte_send_cmd(266): process command timeout
response timeoutdem_dce: esp_modem_dce_generic_command(22): Command:AT
I (151403) modem_board: Current timeouts: 4 and errors: 0
I (151403) modem_board: modem_board_power_down!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
@Y1hsiaochunnn I can use the code from the Gitee library normally and have added the AIR780E option, which is convenient for me to apply to projects。https://gitee.com/dog_who_loves_cat_mint/esp32_-cdc_4-g |
It's a known bug, log in #295. will fix soon |
How to set up SIM7600 modem via ESP32S3 USB Port.
IDF Version: 5.0.0
ESP IoT Solution Version: Master Branch
Just selected
user defined
modem board in the component config -> usb host modm.Serial Logs:
Ya that sit, it is hanged there. I guess it is wating for usb device.
Any help will be appreciated :)
The text was updated successfully, but these errors were encountered: