espressif / esp-hosted

Hosted Solution (Linux/MCU) with ESP32 (Wi-Fi + BT + BLE)
Other
706 stars 169 forks source link

esp_hosted_fg :the module crashed in ap mode #338

Open wky19971002 opened 9 months ago

wky19971002 commented 9 months ago

hi,It has been some time since our last question ,we refer to your opinion to modify the program,and now esp32 can work! But now we have a new problem,esp32 works properly without connecting to the Internet,once we connect to the Internet, esp32 crashed quickly,it seems crashed in SPI,and cannot be restarted.

After some time the esp32 printed the following log: [14:13:05.560] W (433760) wifi:pp q full: 7-3fcd5490 [14:13:05.560] E (433760) wifi:fail to post timer, type=12 [14:13:07.544] W (435760) wifi:pp q full: 7-3fcd5490 [14:13:07.544] E (435760) wifi:fail to post timer, type=12 [14:13:09.542] W (437760) wifi:pp q full: 7-3fcd5490 [14:13:09.542] E (437760) wifi:fail to post timer, type=12 [14:13:11.542] W (439760) wifi:pp q full: 7-3fcd5490 [14:13:11.542] E (439760) wifi:fail to post timer, type=12 [14:13:13.542] W (441760) wifi:pp q full: 7-3fcd5490 [14:13:13.542] E (441760) wifi:fail to post timer, type=12 [14:13:15.541] W (443760) wifi:pp q full: 7-3fcd5490 [14:13:15.541] E (443760) wifi:fail to post timer, type=12 [14:13:17.541] W (445760) wifi:pp q full: 7-3fcd5490 [14:13:17.557] E (445760) wifi:fail to post timer, type=12

This is the full log: [14:05:51.612] ESP-ROM:esp8684-api2-20220127 [14:05:51.612] Build:Ja [14:05:51.628] n 27 2022ESP-ROM:esp8684-api2-20220127 [14:05:51.787] Build:Jan 27 2022 [14:05:51.977] rst:0x1 (POWERON),boot:0xd (SPI_FAST_FLASH_BOOT) [14:05:51.977] SPIWP:0xee [14:05:51.977] mode:DIO, clock div:1 [14:05:51.977] load:0x3fcd5c80,len:0x16c4 [14:05:51.977] load:0x403acb70,len:0x974 [14:05:51.977] load:0x403aeb70,len:0x297c [14:05:51.977] entry 0x403acb70 [14:05:51.977] I (32) boot: ESP-IDF v5.1.2-dirty 2nd stage bootloader [14:05:51.977] I (32) boot: compile time Feb 19 2024 14:03:16 [14:05:51.977] I (32) boot: chip revision: v1.0 [14:05:51.977] I (38) boot.esp32c2: MMU Page Size : 32K [14:05:51.977] I (45) boot.esp32c2: SPI Speed : 60MHz [14:05:51.977] I (52) boot.esp32c2: SPI Mode : DIO [14:05:51.977] I (59) boot.esp32c2: SPI Flash Size : 2MB [14:05:51.977] I (67) boot: Enabling RNG early entropy source... [14:05:51.977] I (75) boot: Partition Table: [14:05:51.977] I (81) boot: ## Label Usage Type ST Offset Length [14:05:51.977] I (92) boot: 0 nvs WiFi data 01 02 00009000 00004000 [14:05:51.977] I (103) boot: 1 otadata OTA data 01 00 0000d000 00002000 [14:05:51.977] I (115) boot: 2 phy_init RF data 01 01 0000f000 00001000 [14:05:51.977] I (126) boot: 3 ota_0 OTA app 00 10 00010000 000f0000 [14:05:51.977] I (138) boot: 4 ota_1 OTA app 00 11 00100000 000f0000 [14:05:51.977] I (150) boot: End of partition table [14:05:51.977] I (156) esp_image: segment 0: paddr=00010020 vaddr=3c060020 size=282d8h (164568) map [14:05:51.977] I (206) esp_image: segment 1: paddr=00038300 vaddr=3fcae330 size=024c0h ( 9408) load [14:05:52.042] I (209) esp_image: segment 2: paddr=0003a7c8 vaddr=40380000 size=05850h ( 22608) load [14:05:52.042] I (221) esp_image: segment 3: paddr=00040020 vaddr=42000020 size=5f2dch (389852) map [14:05:52.042] [14:05:52.551] I (617) gpio: GPIO[4]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0  [14:05:52.551] I (631) gpio: GPIO[5]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0  [14:05:52.551] I (645) SPI_DRIVER: SPI Ctrl:1 mode: 3, Freq:ConfigAtHost [14:05:52.551] GPIOs: MOSI: 7, MISO: 2, CS: 10, CLK: 6 HS: 4 DR: 5 [14:05:52.551]  [14:05:52.551] I (662) SPI_DRIVER: Hosted SPI queue size: Tx:10 Rx:10 [14:05:52.551] I (673) NETWORK_ADAPTER: Initial set up done [14:05:52.551] I (678) slave_rpc: event ESPInit [14:05:52.551] I (685) slave_sleep: gpio wakeup source [GPIO 10] with wakeup level [low] is ready [14:05:52.551] I (697) pm: Frequency switching config: CPU_MAX: 120, APB_MAX: 80, APB_MIN: 13, Light sleep: ENABLED [14:05:52.551] I (712) slave_sleep: PM configured with Min_Freq 13MHz Max_Freq 120MHz [14:05:52.551]  [14:05:52.551] I (723) slave_sleep: FreeRTOS tickless idle [14:05:52.551]  [14:05:52.551] I (731) main_task: Returned from app_main() [14:05:52.551] [14:05:54.997] I (3213) slave_rpc: Resp_MSGId for req[0x116] is [0x216] [14:05:55.186] I (3213) slave_rpc: Received Req [0x116] [14:05:55.186] I (3214) pp: pp rom version: de8c800 [14:05:55.186] I (3219) net80211: net80211 rom version: de8c800 [14:05:55.186] I (3229) wifi:wifi driver task: 3fcbfb54, prio:23, stack:3584, core=0 [14:05:55.186] I (3239) wifi:wifi firmware version: 91b9630 [14:05:55.186] I (3243) wifi:wifi certification version: v7.0 [14:05:55.186] I (3249) wifi:config NVS flash: enabled [14:05:55.186] I (3255) wifi:config nano formating: disabled [14:05:55.186] I (3261) wifi:Init data frame dynamic rx buffer num: 32 [14:05:55.186] I (3269) wifi:Init static rx mgmt buffer num: 5 [14:05:55.186] I (3275) wifi:Init management short buffer num: 32 [14:05:55.186] I (3282) wifi:Init dynamic tx buffer num: 32 [14:05:55.186] I (3288) wifi:Init static tx FG buffer num: 2 [14:05:55.186] I (3294) wifi:Init static rx buffer size: 1600 [14:05:55.186] I (3301) wifi:Init static rx buffer num: 10 [14:05:55.186] I (3307) wifi:Init dynamic rx buffer num: 32 [14:05:55.186] I (3314) wifi_init: rx ba win: 6 [14:05:55.186] I (3319) wifi_init: tcpip mbox: 32 [14:05:55.186] I (3325) wifi_init: udp mbox: 6 [14:05:55.186] I (3331) wifi_init: tcp mbox: 6 [14:05:55.186] I (3337) wifi_init: tcp tx win: 5744 [14:05:55.186] I (3344) wifi_init: tcp rx win: 5744 [14:05:55.186] I (3350) wifi_init: tcp mss: 1440 [14:05:55.186] I (3356) wifi_init: WiFi IRAM OP enabled [14:05:55.186] I (3363) wifi_init: WiFi RX IRAM OP enabled [14:05:55.186] I (3371) wifi_init: WiFi SLP IRAM OP enabled [14:05:55.186] I (3417) slave_rpc: Resp_MSGId for req[0x104] is [0x204] [14:05:55.266] I (3417) slave_rpc: Received Req [0x104] [14:05:55.266] I (3418) slave_rpc: Set wifi mode 2  [14:05:55.266] I (3447) slave_rpc: Resp_MSGId for req[0x118] is [0x218] [14:05:55.266] I (3447) slave_rpc: Received Req [0x118] [14:05:55.266] I (3447) phy_init: phy_version 270,39d177a,Oct 13 2023,16:18:10 [14:05:55.266] I (3484) wifi:mode : softAP (08:3a:8d:45:2a:2d) [14:05:55.323] I (3484) wifi:Total power save buffer number: 16 [14:05:55.323] I (3485) wifi:Init max length of beacon: 752/752 [14:05:55.323] I (3487) wifi:Init max length of beacon: 752/752 [14:05:55.323] I (3494) wifi:Set ps type: 1, coexist: 0 [14:05:55.323] I (3500) slave_rpc: softap started [14:05:55.323] I (3506) slave_rpc: Sending Wi-Fi event [12] [14:05:55.323] I (3541) slave_rpc: Resp_MSGId for req[0x101] is [0x201] [14:05:55.413] I (3541) slave_rpc: Received Req [0x101] [14:05:55.413] I (3541) slave_rpc: Get softap mac address [14:05:55.413] I (3548) slave_rpc: mac [08:3a:8d:45:2a:2d]  [14:05:55.413] 8 3a 8d 45 2a 2d [14:05:55.413] I (3582) slave_rpc: Resp_MSGId for req[0x101] is [0x201] [14:05:55.413] I (3582) slave_rpc: Received Req [0x101] [14:05:55.413] I (3582) slave_rpc: Get softap mac address [14:05:55.413] I (3589) slave_rpc: mac [08:3a:8d:45:2a:2d]  [14:05:55.413] 8 3a 8d 45 2a 2d [14:06:17.567] I (25752) wifi:station: b0:dc:ef:11:6b:bf join, AID=1, bgn, 20 [14:06:17.567] I (25753) slave_rpc: station b0:dc:ef:11:6b:bf join, AID=1 [14:06:17.567] rpc_evt_ap_staconn_conn_disconn event:14 [14:06:17.567] W (25798) wifi:idx:2 (ifx:1, b0:dc:ef:11:6b:bf), tid:0, ssn:10, winSize:64

We hope to get your help!

wky19971002 commented 9 months ago

Can anyone please answer my question

mantriyogesh commented 8 months ago

Sure. Apology for the delay.. I am trying to better understand the issue, first.

once we connect to the Internet

  1. Are you trying to give internet to softap? Not understood clearly.
  2. Can you please share the all the steps you have used at Linux along with their output?
  3. While testing, can you please enable extra ESP logging:
    • A. ESP logging to 'Debug' Screenshot 2024-02-20 at 3 35 25 PM
    • B. Enable 'Print debug messages from WPA Supplicant' Screenshot 2024-02-20 at 3 36 13 PM

Basically, can you please attach the full textual logs in (2) commands, outputs to lead/reproduce the problem (3) ESP full log and dmesg full log from boot on Linux

wky19971002 commented 8 months ago

1.yes, I'm trying to give internet to softap.

  1. ESP logging to 'Debug' : While testing, if ESP logging to 'Debug', It has some effect on the performance of esp32, So I had to lower the log level,that gets network traffic into esp32.
mantriyogesh commented 8 months ago
  1. How?
  2. Still waiting for logs all logs. I am trying to get to know what state it fails, yet
wky19971002 commented 8 months ago

1.We used the 4-g module as the host,with esp32-c2 chip , with spi connections.After connecting to ap we can get the correct ip address,spi works properly.But after the 4g module connect to the Internet, the network traffic enters esp32 through spi,this is when esp32 will crash. 2. [09:27:38.361] ESP-ROM:esp8684-api2-20220127 [09:27:38.378] Build:Jan 27 2022 [09:27:38.378] rst:0x1 (POWEESP-ROM:esp8684-api2-20220127 [09:27:38.735] Build:Jan 27 2022 [09:27:38.735] rst:0x1 (POWERON),boot:0xd (SPI_FAST_FLASH_BOOT) [09:27:38.735] SPIWP:0xee [09:27:38.735] mode:DIO, clock div:1 [09:27:38.735] load:0x3fcd5c80,len:0x16c4 [09:27:38.735] load:0x403acb70,len:0x974 [09:27:38.735] load:0x403aeb70,len:0x297c [09:27:38.735] entry 0x403acb70 [09:27:38.735] I (32) boot: ESP-IDF v5.1.2-dirty 2nd stage bootloader [09:27:38.735] I (32) boot: compile time Feb 20 2024 17:03:27 [09:27:38.735] I (32) boot: chip revision: v1.0 [09:27:38.735] I (38) boot.esp32c2: MMU Page Size : 32K [09:27:38.735] I (45) boot.esp32c2: SPI Speed : 60MHz [09:27:38.735] I (52) boot.esp32c2: SPI Mode : DIO [09:27:38.735] I (59) boot.esp32c2: SPI Flash Size : 2MB [09:27:38.735] I (67) boot: Enabling RNG early entropy source... [09:27:38.735] I (75) boot: Partition Table: [09:27:38.735] I (81) boot: ## Label Usage Type ST Offset Length [09:27:38.735] I (92) boot: 0 nvs WiFi data 01 02 00009000 00004000 [09:27:38.735] I (103) boot: 1 otadata OTA data 01 00 0000d000 00002000 [09:27:38.735] I (115) boot: 2 phy_init RF data 01 01 0000f000 00001000 [09:27:38.735] I (126) boot: 3 ota_0 OTA app 00 10 00010000 000f0000 [09:27:38.735] I (138) boot: 4 ota_1 OTA app 00 11 00100000 000f0000 [09:27:38.735] I (150) boot: End of partition table [09:27:38.735] I (156) esp_image: segment 0: paddr=00010020 vaddr=3c068020 size=32b38h (207672) map [09:27:38.735] I (216) esp_image: segment 1: paddr=00042b60 vaddr=3fcae3c0 size=02524h ( 9508) load [09:27:38.802] I (219) esp_image: segment 2: paddr=0004508c vaddr=40380000 size=02f8ch ( 12172) load [09:27:38.802] I (228) esp_image: segment 3: paddr=00048020 vaddr=42000020 size=669f0h (420336) map [09:27:38.802] I (332) esp_image: segment 4: paddr=000aea18 vaddr=40382f8c size=0b42ch ( 46124) load [09:27:39.403] I (348) boot: Loaded app from partition at offset 0x10000 [09:27:39.403] I (348) boot: Disabling RNG early entropy source... [09:27:39.403] I (366) cpu_start: Unicore app [09:27:39.403] I (366) cpu_start: Pro cpu up. [09:27:39.403] D (375) clk: RTC_SLOW_CLK calibration value: 4239518 [09:27:39.403] I (385) cpu_start: Pro cpu start user code [09:27:39.403] I (385) cpu_start: cpu freq: 120000000 Hz [09:27:39.403] I (386) cpu_start: Application information: [09:27:39.403] I (390) cpu_start: Project name: network_adapter [09:27:39.403] I (399) cpu_start: App version: 001-dirty [09:27:39.403] I (407) cpu_start: Compile time: Feb 20 2024 17:03:17 [09:27:39.403] I (416) cpu_start: ELF file SHA256: 0915f9d600372764... [09:27:39.403] I (425) cpu_start: ESP-IDF: v5.1.2-dirty [09:27:39.403] I (433) cpu_start: Min chip rev: v1.0 [09:27:39.403] I (441) cpu_start: Max chip rev: v1.99  [09:27:39.403] I (448) cpu_start: Chip rev: v1.0 [09:27:39.403] D (455) memory_layout: Checking 3 reserved memory ranges: [09:27:39.403] D (464) memory_layout: Reserved memory range 0x3fca0000 - 0x3fcae3c0 [09:27:39.403] D (474) memory_layout: Reserved memory range 0x3fcae3c0 - 0x3fcb4f80 [09:27:39.403] D (484) memory_layout: Reserved memory range 0x3fcdf4bc - 0x3fce0000 [09:27:39.403] D (493) memory_layout: Building list of available memory regions: [09:27:39.403] D (503) memory_layout: Available memory region 0x3fcb4f80 - 0x3fcc0000 [09:27:39.403] D (513) memory_layout: Available memory region 0x3fcc0000 - 0x3fcdcb70 [09:27:39.403] D (523) memory_layout: Available memory region 0x3fcdcb70 - 0x3fcdf4bc [09:27:39.403] I (533) heap_init: Initializing. RAM available for dynamic allocation: [09:27:39.403] D (544) heap_init: New heap initialised at 0x3fcb4f80 [09:27:39.403] I (552) heap_init: At 3FCB4F80 len 00027BF0 (158 KiB): D/IRAM [09:27:39.403] I (562) heap_init: At 3FCDCB70 len 0000294C (10 KiB): STACK/DRAM [09:27:39.403] D (573) intr_alloc: Connected src 21 to int 2 (cpu 0) [09:27:39.403] D (581) spi_flash: trying chip: issi [09:27:39.403] D (586) spi_flash: trying chip: gd [09:27:39.403] D (591) spi_flash: trying chip: mxic [09:27:39.403] D (597) spi_flash: trying chip: winbond [09:27:39.403] D (603) spi_flash: trying chip: boya [09:27:39.403] D (609) spi_flash: trying chip: th [09:27:39.403] D (614) spi_flash: trying chip: generic [09:27:39.403] I (620) spi_flash: detected chip: generic [09:27:39.403] I (627) spi_flash: flash io: dio [09:27:39.403] D (633) cpu_start: calling init function: 0x4205ee48 [09:27:39.403] D (641) cpu_start: calling init function: 0x4205eda0 [09:27:39.403] D (649) cpu_start: calling init function: 0x4205ebb0 [09:27:39.403] D (656) cpu_start: calling init function: 0x4205e6ee [09:27:39.411] D (664) cpu_start: calling init function: 0x42066018 [09:27:39.411] D (672) cpu_start: calling init function: 0x4038605c [09:27:39.411] D (680) cpu_start: calling init function: 0x4200002a [09:27:39.411] D (687) cpu_start: calling init function: 0x4200ed48 on core: 0 [09:27:39.411] D (697) intr_alloc: Connected src 28 to int 3 (cpu 0) [09:27:39.411] D (704) cpu_start: calling init function: 0x4200259a on core: 0 [09:27:39.411] I (714) sleep: Configure to isolate all GPIO pins in sleep state [09:27:39.411] I (724) sleep: Enable automatic switching of GPIO sleep configuration [09:27:39.421] D (735) cpu_start: calling init function: 0x42000f52 on core: 0 [09:27:39.421] D (762) intr_alloc: Connected src 36 to int 4 (cpu 0) [09:27:39.421] I (762) app_start: Starting scheduler on CPU0 [09:27:39.421] D (762) intr_alloc: Connected src 26 to int 7 (cpu 0) [09:27:39.421] I (762) main_task: Started on CPU0 [09:27:39.421] D (768) heap_init: New heap initialised at 0x3fcdcb70 [09:27:39.421] I (776) main_task: Calling app_main() [09:27:39.421] I (782) NETWORK_ADAPTER: ***** [09:27:39.421] I (797) NETWORK_ADAPTER: NBXY CS pin re-use for wakeup 21Jul23  [09:27:39.421] I (810) NETWORK_ADAPTER: ESP-Hosted-FG Slave Firmware version :: 0.0.5  [09:27:39.421] I (827) NETWORK_ADAPTER: Transport used :: SPI only  [09:27:39.421] I (j%B妭事Jj叆箎褏铜扷嬚晒晳山祦 [09:27:39.675] 亮}祬ス诖j5RD (3191) SPI_DRIVER: Tx New [09:27:42.269] D (3191) SPI_DRIVER: 0x3fcbcf64 03 00 14 00 0c 00 a5 03 01 00 00 00 01 06 00 52 |...............R| [09:27:42.269] D (3193) SPI_DRIVER: 0x3fcbcf74 50 43 45 76 74 02 08 00 08 03 10 81 06 8a 30 00 |PCEvt.........0.| [09:27:42.269] D (3214) SPI_DRIVER: Tx New [09:27:42.269] D (3216) NETWORK_ADAPTER: Rx New [09:27:42.269] D (3217) NETWORK_ADAPTER: 0x3fcb6d60 03 00 37 00 0c 00 00 00 00 00 00 00 01 06 00 52 |..7............R| [09:27:42.269] D (3232) NETWORK_ADAPTER: 0x3fcb6d70 50 43 52 73 70 02 2b 00 10 96 02 b2 11 25 0a 23 |PCRsp.+......%.#| [09:27:42.269] D (3247) NETWORK_ADAPTER: 0x3fcb6d80 08 0a 10 20 18 01 28 20 40 01 48 01 58 01 68 06 |... ..( @.H.X.h.| [09:27:42.269] D (3262) NETWORK_ADAPTER: 0x3fcb6d90 78 f0 05 80 01 20 90 01 01 98 01 07 a0 01 cf fe |x.... ..........| [09:27:42.269] D (3277) NETWORK_ADAPTER: 0x3fcb6da0 bc f9 01 |...| [09:27:42.269] I (3291) slave_rpc: Resp_MSGId for req[0x116] is [0x216] [09:27:42.269] I (3299) slave_rpc: Received Req [0x116] [09:27:42.269] I (3307) pp: pp rom version: de8c800 [09:27:42.269] I (3313) net80211: net80211 rom version: de8c800 [09:27:42.269] D (3322) nvs: nvs_open_from_partition misc 1 [09:27:42.269] I (3329) wifi:wifi driver task: 3fcbfcd4, prio:23, stack:3584, core=0 [09:27:42.269] D (3338) efuse: In EFUSE_BLK2DATA1_REG is used 8 bits starting with 8 bit [09:27:42.269] D (3348) efuse: In EFUSE_BLK2DATA1_REG is used 8 bits starting with 0 bit [09:27:42.269] D (3359) efuse: In EFUSE_BLK2DATA0_REG is used 8 bits starting with 24 bit [09:27:42.269] D (3370) efuse: In EFUSE_BLK2DATA0_REG is used 8 bits starting with 16 bit [09:27:42.269] D (3381) efuse: In EFUSE_BLK2DATA0_REG is used 8 bits starting with 8 bit [09:27:42.269] D (3392) efuse: In EFUSE_BLK2DATA0_REG is used 8 bits starting with 0 bit [09:27:42.269] D (3403) nvs: nvs_open_from_partition nvs.net80211 1 [09:27:42.269] D (3410) nvs: nvs_get opmode 1 [09:27:42.269] D (3415) nvs: nvs_get_str_or_blob sta.ssid [09:27:42.269] D (3422) nvs: nvs_get sta.authmode 1 [09:27:42.269] D (3427) nvs: nvs_get_str_or_blob sta.pswd [09:27:42.269] D (3434) nvs: nvs_get_str_or_blob sta.pmk [09:27:42.269] D (3440) nvs: nvs_get sta.chan 1 [09:27:42.269] D (3445) nvs: nvs_get auto.conn 1 [09:27:42.269] D (3450) nvs: nvs_get bssid.set 1 [09:27:42.269] D (3455) nvs: nvs_get_str_or_blob sta.bssid [09:27:42.269] D (3462) nvs: nvs_get sta.lis_intval 2 [09:27:42.269] D (3468) nvs: nvs_get sta.phym 1 [09:27:42.269] D (3473) nvs: nvs_get sta.phybw 1 [09:27:42.269] D (3478) nvs: nvs_get_str_or_blob sta.apsw [09:27:42.269] D (3484) nvs: nvs_get_str_or_blob sta.apinfo [09:27:42.269] D (3491) nvs: nvs_get sta.scan_method 1 [09:27:42.269] D (3497) nvs: nvs_get sta.sort_method 1 [09:27:42.269] D (3503) nvs: nvs_get sta.minrssi 1 [09:27:42.269] D (3509) nvs: nvs_get sta.minauth 1 [09:27:42.269] D (3514) nvs: nvs_get sta.pmf_e 1 [09:27:42.269] D (3519) nvs: nvs_get sta.pmf_r 1 [09:27:42.269] D (3525) nvs: nvs_get sta.btm_e 1 [09:27:42.269] D (3530) nvs: nvs_get sta.rrm_e 1 [09:27:42.269] D (3535) nvs: nvs_get sta.mbo_e 1 [09:27:42.269] D (3540) nvs: nvs_get_str_or_blob ap.ssid [09:27:42.269] D (3546) nvs: nvs_get_str_or_blob ap.passwd [09:27:42.269] D (3553) nvs: nvs_get_str_or_blob ap.pmk [09:27:42.269] D (3559) nvs: nvs_get ap.chan 1 [09:27:42.269] D (3564) nvs: nvs_get ap.authmode 1 [09:27:42.269] D (3570) nvs: nvs_get ap.hidden 1 [09:27:42.269] D (3575) nvs: nvs_get ap.max.conn 1 [09:27:42.269] D (3580) nvs: nvs_get bcn.interval 2 [09:27:42.269] D (3586) nvs: nvs_get ap.phym 1 [09:27:42.269] D (3591) nvs: nvs_get ap.phybw 1 [09:27:42.269] D (3596) nvs: nvs_get ap.sndchan 1 [09:27:42.269] D (3601) nvs: nvs_get ap.pmf_e 1 [09:27:42.269] D (3606) nvs: nvs_get ap.pmf_r 1 [09:27:42.269] D (3611) nvs: nvs_get ap.p_cipher 1 [09:27:42.269] D (3617) nvs: nvs_get lorate 1 [09:27:42.269] D (3622) nvs: nvs_get_str_or_blob country [09:27:42.269] D (3628) nvs: nvs_get ap.ftm_r 1 [09:27:42.269] D (3633) nvs: nvs_get sta.ft 1 [09:27:42.269] D (3638) nvs: nvs_get sta.owe 1 [09:27:42.269] D (3643) nvs: nvs_get sta.trans_d 1 [09:27:42.269] D (3648) nvs: nvs_get sta.sae_h2e 1 [09:27:42.269] D (3654) nvs: nvs_get sta.sae_pk_mode 1 [09:27:42.269] D (3660) nvs: nvs_get sta.bss_retry 1 [09:27:42.269] D (3665) nvs: nvs_get_str_or_blob sta.owe_data [09:27:42.269] D (3672) nvs: nvs_get sta.he_dcm 1 [09:27:42.269] D (3678) nvs: nvs_get sta.he_dcm_c_tx 1 [09:27:42.269] D (3684) nvs: nvs_get sta.he_dcm_c_rx 1 [09:27:42.269] D (3690) nvs: nvs_get sta.he_mcs9_d 1 [09:27:42.269] D (3695) nvs: nvs_get sta.he_su_b_d 1 [09:27:42.269] D (3701) nvs: nvs_get sta.he_su_b_f_d 1 [09:27:42.269] D (3707) nvs: nvs_get sta.he_mu_b_f_d 1 [09:27:42.798] D (3713) nvs: nvs_get sta.he_cqi_f_d 1 [09:27:42.798] D (3719) nvs: nvs_get_str_or_blob sta.sae_h2e_id [09:27:42.798] D (3726) nvs: nvs_get ap.sae_h2e 1 [09:27:42.798] D (3732) nvs: nvs_get_str_or_blob ap.pmk_info [09:27:42.798] D (3738) nvs: nvs_get nan.phym 1 [09:27:42.798] D (3744) nvs: nvs_set ap.sndchan 1 0 [09:27:42.798] I (3749) wifi:wifi firmware version: 91b9630 [09:27:42.798] I (3755) wifi:wifi certification version: v7.0 [09:27:42.798] I (3762) wifi:config NVS flash: enabled [09:27:42.798] I (3767) wifi:config nano formating: disabled [09:27:42.798] I (3773) wifi:Init data frame dynamic rx buffer num: 32 [09:27:42.798] I (3781) wifi:Init static rx mgmt buffer num: 5 [09:27:42.798] I (3788) wifi:Init management short buffer num: 32 [09:27:42.798] I (3795) wifi:Init dynamic tx buffer num: 32 [09:27:42.798] I (3801) wifi:Init static tx FG buffer num: 2 [09:27:42.798] I (3807) wifi:Init static rx buffer size: 1600 [09:27:42.798] I (3813) wifi:Init static rx buffer num: 10 [09:27:42.798] I (3819) wifi:Init dynamic rx buffer num: 32 [09:27:42.798] I (3826) wifi_init: rx ba win: 6 [09:27:42.798] I (3831) wifi_init: tcpip mbox: 32 [09:27:42.798] I (3838) wifi_init: udp mbox: 6 [09:27:42.798] I (3844) wifi_init: tcp mbox: 6 [09:27:42.798] I (3850) wifi_init: tcp tx win: 5744 [09:27:42.798] I (3856) wifi_init: tcp rx win: 5744 [09:27:42.798] I (3863) wifi_init: tcp mss: 1440 [09:27:42.798] I (3869) wifi_init: WiFi IRAM OP enabled [09:27:42.798] I (3876) wifi_init: WiFi RX IRAM OP enabled [09:27:42.798] I (3883) wifi_init: WiFi SLP IRAM OP enabled [09:27:42.798] D (3892) protocomm: No encrypt ret 0 [09:27:42.798] D (3904) SPI_DRIVER: Tx New [09:27:42.798] D (3904) SPI_DRIVER: 0x3fcb6d60 03 00 14 00 0c 00 d7 03 02 00 00 00 01 06 00 52 |...............R| [09:27:42.798] D (3916) SPI_DRIVER: 0x3fcb6d70 50 43 52 73 70 02 08 00 08 02 10 96 04 b2 21 00 |PCRsp.........!.| [09:27:42.798] D (3937) SPI_DRIVER: Tx New [09:27:42.798] D (3950) SPI_DRIVER: Tx New [09:27:42.798] D (3952) NETWORK_ADAPTER: Rx New [09:27:42.798] D (3952) NETWORK_ADAPTER: 0x3fcbc91c 03 00 14 00 0c 00 00 00 00 00 00 00 01 06 00 52 |...............R| [09:27:42.798] D (3959) NETWORK_ADAPTER: 0x3fcbc92c 50 43 52 73 70 02 08 00 10 84 02 a2 10 02 08 02 |PCRsp...........| [09:27:42.798] I (3974) slave_rpc: Resp_MSGId for req[0x104] is [0x204] [09:27:42.798] I (3983) slave_rpc: Received Req [0x104] [09:27:42.798] D (3990) nvs: nvs_get opmode 1 [09:27:42.798] I (3995) slave_rpc: Set wifi mode 2  [09:27:42.798] D (4002) protocomm: No encrypt ret 0 [09:27:42.798] D (4015) SPI_DRIVER: Tx New [09:27:42.798] D (4015) SPI_DRIVER: 0x3fcbc91c 03 00 14 00 0c 00 b5 03 03 00 00 00 01 06 00 52 |...............R| [09:27:42.798] D (4026) SPI_DRIVER: 0x3fcbc92c 50 43 52 73 70 02 08 00 08 02 10 84 04 a2 20 00 |PCRsp......... .| [09:27:42.798] D (4048) SPI_DRIVER: Tx New [09:27:42.798] D (4056) SPI_DRIVER: Tx New [09:27:42.798] D (4057) NETWORK_ADAPTER: Rx New [09:27:42.798] D (4057) NETWORK_ADAPTER: 0x3fcbcf64 03 00 0f 00 0c 00 00 00 00 00 00 00 01 06 00 52 |...............R| [09:27:42.798] D (4069) NETWORK_ADAPTER: 0x3fcbcf74 50 43 52 73 70 02 03 00 10 98 02 |PCRsp......| [09:27:42.798] I (4084) slave_rpc: Resp_MSGId for req[0x118] is [0x218] [09:27:42.798] I (4093) slave_rpc: Received Req [0x118] [09:27:42.798] I (4100) phy_init: phy_version 270,39d177a,Oct 13 2023,16:18:10 [09:27:42.798] D (4110) phy_init: loading PHY init data from application binary [09:27:42.798] D (4120) nvs: nvs_open_from_partition phy 0 [09:27:42.798] D (4126) nvs: nvs_get cal_version 4 [09:27:42.798] D (4132) nvs: nvs_get_str_or_blob cal_mac [09:27:42.798] D (4138) efuse: In EFUSE_BLK2DATA1_REG is used 8 bits starting with 8 bit [09:27:42.798] D (4149) efuse: In EFUSE_BLK2DATA1_REG is used 8 bits starting with 0 bit [09:27:42.798] D (4159) efuse: In EFUSE_BLK2DATA0_REG is used 8 bits starting with 24 bit [09:27:42.798] D (4170) efuse: In EFUSE_BLK2DATA0_REG is used 8 bits starting with 16 bit [09:27:42.798] D (4181) efuse: In EFUSE_BLK2DATA0_REG is used 8 bits starting with 8 bit [09:27:42.798] D (4192) efuse: In EFUSE_BLK2DATA0_REG is used 8 bits starting with 0 bit [09:27:42.798] D (4203) nvs: nvs_get_str_or_blob cal_data [09:27:42.798] D (4212) nvs: nvs_close 3 [09:27:42.798] D (4214) efuse: In EFUSE_BLK2DATA1_REG is used 8 bits starting with 8 bit [09:27:42.798] D (4224) efuse: In EFUSE_BLK2DATA1_REG is used 8 bits starting with 0 bit [09:27:42.798] D (4235) efuse: In EFUSE_BLK2DATA0_REG is used 8 bits starting with 24 bit [09:27:43.335] D (4246) efuse: In EFUSE_BLK2DATA0_REG is used 8 bits starting with 16 bit [09:27:43.335] D (4257) efuse: In EFUSE_BLK2DATA0_REG is used 8 bits starting with 8 bit [09:27:43.335] D (4268) efuse: In EFUSE_BLK2DATA0_REG is used 8 bits starting with 0 bit [09:27:43.335] D (4302) temperature_sensor: range changed, change to index 2 [09:27:43.335] D (4304) wifi:filter: set rx policy=0 [09:27:43.335] I (4305) wifi:mode : softAP (08:3a:8d:45:2a:2d) [09:27:43.335] D (4306) wifi:filter: set rx policy=9 [09:27:43.335] I (4312) wifi:Total power save buffer number: 16 [09:27:43.335] I (4318) wifi:Init max length of beacon: 752/752 [09:27:43.335] I (4325) wifi:Init max length of beacon: 752/752 [09:27:43.335] I (4332) wifi:Set ps type: 1, coexist: 0 [09:27:43.335] [09:27:43.335] D (4338) protocomm: No encrypt ret 0 [09:27:43.335] D (4343) event: running post WIFI_EVENT:12 with handler 0x4200a80c and context 0x3fcc5ed8 on loop 0x3fcdf47c [09:27:43.335] I (4358) slave_rpc: softap started [09:27:43.335] D (4350) SPI_DRIVER: Tx New [09:27:43.335] D (4369) SPI_DRIVER: 0x3fcbcf64 03 00 14 00 0c 00 eb 03 04 00 00 00 01 06 00 52 |...............R| [09:27:43.335] D (4383) SPI_DRIVER: 0x3fcbcf74 50 43 52 73 70 02 08 00 08 02 10 98 04 c2 21 00 |PCRsp.........!.| [09:27:43.335] I (4366) slave_rpc: Sending Wi-Fi event [12] [09:27:43.335] D (4406) SPI_DRIVER: Tx New [09:27:43.335] D (4405) protocomm: No encrypt ret 0 [09:27:43.335] D (4423) SPI_DRIVER: Tx New [09:27:43.335] D (4423) SPI_DRIVER: 0x3fcb6d60 03 00 16 00 0c 00 f8 03 05 00 00 00 01 06 00 52 |...............R| [09:27:43.335] D (4434) SPI_DRIVER: 0x3fcb6d70 50 43 45 76 74 02 0a 00 08 03 10 86 06 b2 30 02 |PCEvt.........0.| [09:27:43.335] D (4448) SPI_DRIVER: 0x3fcb6d80 10 0c 00 00 |....| [09:27:43.335] D (4469) SPI_DRIVER: Tx New [09:27:43.335] D (4477) SPI_DRIVER: Tx New [09:27:43.335] D (4478) NETWORK_ADAPTER: Rx New [09:27:43.335] D (4478) NETWORK_ADAPTER: 0x3fcbc91c 02 00 2a 00 0c 00 00 00 00 00 00 00 ff ff ff ff |...............| [09:27:43.335] D (4490) NETWORK_ADAPTER: 0x3fcbc92c ff ff 00 00 00 00 00 00 08 06 00 01 08 00 06 04 |................| [09:27:43.335] D (4505) NETWORK_ADAPTER: 0x3fcbc93c 00 01 00 00 00 00 00 00 c0 a8 64 01 00 00 00 00 |..........d.....| [09:27:43.335] D (4520) NETWORK_ADAPTER: 0x3fcbc94c 00 00 c0 a8 64 01 |....d.| [09:27:43.335] D (4486) SPI_DRIVER: Tx New [09:27:43.335] D (4540) NETWORK_ADAPTER: Rx New [09:27:43.335] D (4544) NETWORK_ADAPTER: 0x3fcb6d60 03 00 14 00 0c 00 00 00 00 00 00 00 01 06 00 52 |...............R| [09:27:43.335] D (4559) NETWORK_ADAPTER: 0x3fcb6d70 50 43 52 73 70 02 08 00 10 81 02 8a 10 02 08 01 |PCRsp...........| [09:27:43.335] I (4574) slave_rpc: Resp_MSGId for req[0x101] is [0x201] [09:27:43.335] I (4583) slave_rpc: Received Req [0x101] [09:27:43.335] I (4590) slave_rpc: Get softap mac address [09:27:43.335] I (4598) slave_rpc: mac [08:3a:8d:45:2a:2d]  [09:27:43.335] 8 3a 8d 45 2a 2d [09:27:43.335] D (4608) protocomm: No encrypt ret 0 [09:27:43.335] D (4621) SPI_DRIVER: Tx New [09:27:43.335] D (4621) SPI_DRIVER: 0x3fcb6d60 03 00 1c 00 0c 00 30 05 06 00 00 00 01 06 00 52 |......0........R| [09:27:43.335] D (4632) SPI_DRIVER: 0x3fcb6d70 50 43 52 73 70 02 10 00 08 02 10 81 04 8a 20 08 |PCRsp......... .| [09:27:43.335] D (4646) SPI_DRIVER: 0x3fcb6d80 0a 06 08 3a 8d 45 2a 2d |...:.E-| [09:27:43.335] D (4667) SPI_DRIVER: Tx New [09:27:43.335] D (4675) SPI_DRIVER: Tx New [09:27:43.335] D (4676) NETWORK_ADAPTER: Rx New [09:27:43.335] D (4676) NETWORK_ADAPTER: 0x3fcbc2b8 03 00 14 00 0c 00 00 00 00 00 00 00 01 06 00 52 |...............R| [09:27:43.335] D (4689) NETWORK_ADAPTER: 0x3fcbc2c8 50 43 52 73 70 02 08 00 10 81 02 8a 10 02 08 01 |PCRsp...........| [09:27:43.335] I (4704) slave_rpc: Resp_MSGId for req[0x101] is [0x201] [09:27:43.335] I (4713) slave_rpc: Received Req [0x101] [09:27:43.335] I (4720) slave_rpc: Get softap mac address [09:27:43.335] I (4727) slave_rpc: mac [08:3a:8d:45:2a:2d]  [09:27:43.335] 8 3a 8d 45 2a 2d [09:27:43.335] D (4738) protocomm: No encrypt ret 0 [09:27:43.335] D (4750) SPI_DRIVER: Tx New [09:27:43.335] D (4751) SPI_DRIVER: 0x3fcbc2b8 03 00 1c 00 0c 00 31 05 07 00 00 00 01 06 00 52 |......1........R| [09:27:43.335] D (4762) SPI_DRIVER: 0x3fcbc2c8 50 43 52 73 70 02 10 00 08 02 10 81 04 8a 20 08 |PCRsp......... .| [09:27:43.367] D (4776) SPI_DRIVER: 0x3fcbc2d8 0a 06 08 3a 8d 45 2a 2d |...:.E*-| [09:27:43.367] D (4797) SPI_DRIVER: Tx New [09:27:43.367]

It's weird that can't print any logs after the esp32 crash.The following logs will be printed in seven or eight minutes: [14:13:05.560] W (433760) wifi:pp q full: 7-3fcd5490 [14:13:05.560] E (433760) wifi:fail to post timer, type=12 [14:13:07.544] W (435760) wifi:pp q full: 7-3fcd5490 [14:13:07.544] E (435760) wifi:fail to post timer, type=12 [14:13:09.542] W (437760) wifi:pp q full: 7-3fcd5490 [14:13:09.542] E (437760) wifi:fail to post timer, type=12 [14:13:11.542] W (439760) wifi:pp q full: 7-3fcd5490 [14:13:11.542] E (439760) wifi:fail to post timer, type=12 [14:13:13.542] W (441760) wifi:pp q full: 7-3fcd5490 [14:13:13.542] E (441760) wifi:fail to post timer, type=12 [14:13:15.541] W (443760) wifi:pp q full: 7-3fcd5490 [14:13:15.541] E (443760) wifi:fail to post timer, type=12 [14:13:17.541] W (445760) wifi:pp q full: 7-3fcd5490 [14:13:17.557] E (445760) wifi:fail to post timer, type=12

mantriyogesh commented 8 months ago

With exact your test, it would be hard to replicate at our place.

Anyway, If you assign static IP addresses to self (softap) and station connecting softap and just send some ping packets etc, does it work first?

Also please make sure your code looks similar here: https://github.com/espressif/esp-hosted/blob/61c9415c1eb619787cc151dadc708780a172a413/esp_hosted_fg/esp/esp_driver/network_adapter/main/app_main.c#L212-L233

wky19971002 commented 8 months ago

I have already modified this part of the code,it works,and I can send ping packets successful,But soon the esp32 will crash.

mantriyogesh commented 8 months ago

Can you please send the commands and output? Assumption: 'esp32' here I refer to 'esp32c2'. crashes 'soon': means? Do you have a backtrace?

You can enable gdb_stub to stop after crash. Screenshot 2024-02-21 at 5 15 38 PM Screenshot 2024-02-21 at 5 16 04 PM

wky19971002 commented 8 months ago

I don't think I integrated the gdbstub part. Let me try. When I say crash, I mean the hot spot disappears and the esp32 has to be powered back on to work.