Page 1 of 1

用ESP32-S3开发的产品,经常遇到WIFI连接路由器失败的情况,SYSTEM_EVENT_STA_DISCONNECTED返回的是225

Posted: Tue Dec 27, 2022 3:50 am
by jiafulu
环境是:ESP-IDF v4.4.3
使用ESP32-S3开发的产品,设备开机连接路由器正常,然后断电关机,重新开机连接,这样反复测试,经常会遇到连不到路由器的情况(将设备贴近路由器也是一样的效果,不是信号问题)。连接异常时,将SYSTEM_EVENT_STA_DISCONNECTED的异常打印出来
  1. case SYSTEM_EVENT_STA_DISCONNECTED:
  2.             ESP_LOGI(WIFINET, "\r\n--------SYSTEM_EVENT_STA_DISCONNECTED ---------");
  3.             wifi_event_sta_disconnected_t *sta_disconnect_evt = (wifi_event_sta_disconnected_t*)event;
  4.              ESP_LOGI(WIFINET, "wifi disconnect reason:%d", sta_disconnect_evt->reason);
打印的是:WIFINET: wifi disconnect reason:225

产品处于等待量产的阶段,麻烦厂家技术人员指导一下是什么问题

完整的日志如下:
ESPESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xf (BROWNOUT_RST),boot:ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xf (BROWNOUT_RST),boot:0x1f (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x17c0
load:0x403c9700,len:0xe64
load:0x403cc700,len:0x2fe4
entry 0x403c9980
[0;32mI (25) boot: ESP-IDF v4.4.3-dirty 2nd stage bootloader[0m
[0;32mI (25) boot: compile time 16:57:51[0m
[0;32mI (25) boot: chip revision: 0[0m
[0;32mI (27) qio_mode: Enabling default flash chip QIO[0m
[0;32mI (33) boot.esp32s3: Boot SPI Speed : 80MHz[0m
[0;32mI (37) boot.esp32s3: SPI Mode : QIO[0m
[0;32mI (42) boot.esp32s3: SPI Flash Size : 4MB[0m
[0;32mI (47) boot: Enabling RNG early entropy source...[0m
[0;32mI (52) boot: Partition Table:[0m
[0;32mI (56) boot: ## Label Usage Type ST Offset Length[0m
[0;32mI (63) boot: 0 nvs WiFi data 01 02 00009000 00004000[0m
[0;32mI (71) boot: 1 otadata OTA data 01 00 0000d000 00002000[0m
[0;32mI (78) boot: 2 phy_init RF data 01 01 0000f000 00001000[0m
[0;32mI (86) boot: 3 ota_0 OTA app 00 10 00010000 001f0000[0m
[0;32mI (93) boot: 4 ota_1 OTA app 00 11 00200000 001f0000[0m
[0;32mI (100) boot: End of partition table[0m
[0;32mI (105) esp_image: segment 0: paddr=00010020 vaddr=3c0c0020 size=5d728h (382760) map[0m
[0;32mI (171) esp_image: segment 1: paddr=0006d750 vaddr=3fc99680 size=028c8h ( 10440) load[0m
[0;32mI (173) esp_image: segment 2: paddr=00070020 vaddr=42000020 size=bcfe8h (774120) map[0m
[0;32mI (294) esp_image: segment 3: paddr=0012d010 vaddr=3fc9bf48 size=02060h ( 8288) load[0m
[0;32mI (296) esp_image: segment 4: paddr=0012f078 vaddr=40374000 size=15678h ( 87672) load[0m
[0;32mI (317) esp_image: segment 5: paddr=001446f8 vaddr=50000000 size=00010h ( 16) load[0m
[0;32mI (326) boot: Loaded app from partition at offset 0x10000[0m
[0;32mI (326) boot: Disabling RNG early entropy source...[0m
[0;32mI (337) cpu_start: Pro cpu up.[0m
[0;32mI (338) cpu_start: Starting app cpu, entry point is 0x40375460[0m
[0;32mI (0) cpu_start: App cpu up.[0m
[0;32mI (351) cpu_start: Pro cpu start user code[0m
[0;32mI (352) cpu_start: cpu freq: 240000000[0m
[0;32mI (352) cpu_start: Application information:[0m
[0;32mI (354) cpu_start: Project name: esp32s3wyb[0m
[0;32mI (360) cpu_start: App version: 1[0m
[0;32mI (364) cpu_start: Compile time: Dec 17 2022 17:00:06[0m
[0;32mI (370) cpu_start: ELF file SHA256: 4262afd5beedd0b6...[0m
[0;32mI (376) cpu_start: ESP-IDF: v4.4.3-dirty[0m
[0;32mI (381) heap_init: Initializing. RAM available for dynamic allocation:[0m
[0;32mI (389) heap_init: At 3FCB0220 len 000394F0 (229 KiB): D/IRAM[0m
[0;32mI (395) heap_init: At 3FCE9710 len 00005724 (21 KiB): STACK/DRAM[0m
[0;32mI (402) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM[0m
[0;32mI (408) heap_init: At 600FE000 len 00002000 (8 KiB): RTCRAM[0m
[0;32mI (415) spi_flash: detected chip: generic[0m
[0;32mI (419) spi_flash: flash io: qio[0m
[0;32mI (423) sleep: Configure to isolate all GPIO pins in sleep state[0m
[0;32mI (430) sleep: Enable automatic switching of GPIO sleep configuration[0m[0;31mE (485) MAIN: u8ConfigVal:34
[0m
[0;32mI (485) MAIN: ----Get parameter OK----[0m
[0;32mI (495) MAIN: device_ID = W2A09T0003[0m
[0;32mI (495) gpio: GPIO[15]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 1| Intr:3 [0m
[0;32mI (495) SWITCH_FUN: I2C ERROR =-1[0m
[0;32mI (495) gpio: GPIO[11]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 [0m
[0;31mE (535) vfs_fat_sdmmc: sdmmc_card_init failed (0x107).[0m
[0;32mI (535) gpio: GPIO[11]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 [0m
[0;33mW (645) ledc: LEDC FADE TOO FAST[0m

[11:31:28.126]收←◆[0;32mI (1495) pp: pp rom version: e7ae62f[0m
[0;32mI (1495) net80211: net80211 rom version: e7ae62f[0m
I (1505) wifi:wifi driver task: 3fcbc06c, prio:23, stack:6656, core=1
[0;32mI (1505) system_api: Base MAC address is not set[0m
[0;32mI (1505) system_api: read default base MAC address from EFUSE[0m
I (1505) wifi:wifi firmware version: 8cb87ff
I (1515) wifi:wifi certification version: v7.0
I (1515) wifi:config NVS flash: enabled
I (1515) wifi:config nano formating: disabled
I (1525) wifi:Init data frame dynamic rx buffer num: 32
I (1525) wifi:Init management frame dynamic rx buffer num: 32
I (1535) wifi:Init management short buffer num: 32
I (1535) wifi:Init dynamic tx buffer num: 32
I (1545) wifi:Init static tx FG buffer num: 2
I (1545) wifi:Init static rx buffer size: 1600
I (1555) wifi:Init static rx buffer num: 10
I (1555) wifi:Init dynamic rx buffer num: 32
[0;32mI (1555) wifi_init: tcpip mbox: 32[0m
[0;32mI (1565) wifi_init: udp mbox: 6[0m
[0;32mI (1565) wifi_init: tcp mbox: 6[0m
[0;32mI (1575) wifi_init: tcp tx win: 5744[0m
[0;32mI (1575) wifi_init: tcp rx win: 5744[0m
[0;32mI (1575) wifi_init: tcp mss: 1440[0m
[0;32mI (1585) wifi_init: WiFi IRAM OP enabled[0m
[0;32mI (1585) wifi_init: WiFi RX IRAM OP enabled[0m
[0;32mI (1595) wifi_init: WiFi SLP IRAM OP enabled[0m
[0;32mI (1595) WIFINET: Setting WiFi configuration SSID new...[0m
[0;32mI (1605) WIFINET: Setting WiFi configuration PASS 18609802589...[0m
[0;32mI (1615) phy_init: phy_version 503,13653eb,Jun 1 2022,17:47:08[0m
[0;33mW (1635) ledc: LEDC FADE TOO FAST[0m
I (1645) wifi:mode : sta (f4:12:fa:59:f9:8c)
I (1645) wifi:enable tsf
[0;32mI (1645) WIFINET:
--------SYSTEM_EVENT_STA_START ---------[0m
I (1785) wifi:new:<2,0>, old:<1,0>, ap:<255,255>, sta:<2,0>, prof:1

[11:31:29.081]收←◆I (2445) wifi:state: init -> auth (b0)
I (2455) wifi:state: auth -> assoc (0)
[0;32mI (2535) SD_TASK: 23 1f 0b 14 04 0c 16 [0m
[0;31mE (2535) SD_TASK: VL_value=0[0m
[0;32mI (2705) KEY: LONG KEY[0m

[11:31:30.090]收←◆I (3455) wifi:state: assoc -> init (400)
I (3455) wifi:new:<2,0>, old:<2,0>, ap:<255,255>, sta:<2,0>, prof:1
[0;32mI (3455) WIFINET:
--------SYSTEM_EVENT_STA_DISCONNECTED ---------[0m
[0;32mI (3465) WIFINET: wifi disconnect reason:225[0m

[11:31:32.125]收←◆Version=1.12
------------------esp_get_free_heap_size : 160612
data=160612
dram=160612
iram=0
max=151552
stackmark=2140

[11:31:32.506]收←◆[0;32mI (5875) WIFINET:
--------SYSTEM_EVENT_STA_DISCONNECTED ---------[0m
[0;32mI (5875) WIFINET: wifi disconnect reason:0[0m
I (5885) wifi:new:<2,0>, old:<2,0>, ap:<255,255>, sta:<2,0>, prof:1
I (5885) wifi:state: init -> auth (b0)
I (5905) wifi:state: auth -> assoc (0)

[11:31:33.538]收←◆I (6905) wifi:state: assoc -> init (400)
I (6905) wifi:new:<2,0>, old:<2,0>, ap:<255,255>, sta:<2,0>, prof:1
[0;32mI (6905) WIFINET:
--------SYSTEM_EVENT_STA_DISCONNECTED ---------[0m
[0;32mI (6905) WIFINET: wifi disconnect reason:225[0m