求助为什么开启wifi后会出现校验失败

DNF557
Posts: 8
Joined: Tue Apr 25, 2023 12:16 am

求助为什么开启wifi后会出现校验失败

Postby DNF557 » Thu May 18, 2023 2:02 am

I (630) wifi_init: udp mbox: 6
I (630) wifi_init: tcp mbox: 6
I (630) wifi_init: tcp tx win: 5744
I (640) wifi_init: tcp rx win: 5744
I (640) wifi_init: tcp mss: 1440
I (650) wifi_init: WiFi IRAM OP enabled
I (650) wifi_init: WiFi RX IRAM OP enabled
I (660) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07
W (660) phy_init: failed to load RF calibration data (0xffffffff), falling back to full calibration

使用的是官网自带的WIFI-AP模板,编译后烧写,出发错误,提示是校验失败。
根据网上的提示是供电不稳定,我使用了充电器的头供电,还是出发校验问题.
求牛人帮忙.

yake827
Posts: 43
Joined: Mon Aug 09, 2021 7:51 am

Re: 求助为什么开启wifi后会出现校验失败

Postby yake827 » Fri May 19, 2023 9:13 am

跟供电没关系,因为模块第一次上电时,flash 里面没有 RF 校验数据,所以需要走全校准,并将校准数据写入flash。

如果你启动后WiFi连接正常,这个打印可以忽略

DNF557
Posts: 8
Joined: Tue Apr 25, 2023 12:16 am

Re: 求助为什么开启wifi后会出现校验失败

Postby DNF557 » Mon May 22, 2023 1:15 am

就是说,使用官方的模板烧写进去后,就无限打印这个失败的效验。然后就是,重启->校验失败->重启。。。你这能否给一个你测试后可以的文件,我烧写进去看一下呢。

ESP_Yake
Posts: 109
Joined: Mon Mar 06, 2017 12:23 pm

Re: 求助为什么开启wifi后会出现校验失败

Postby ESP_Yake » Tue May 23, 2023 8:17 am

你当前用的IDF哪个版本呢?完整的LOG能否给我看看,不太理解你说的无限打印是什么

DNF557
Posts: 8
Joined: Tue Apr 25, 2023 12:16 am

Re: 求助为什么开启wifi后会出现校验失败

Postby DNF557 » Tue May 30, 2023 7:14 am

根据我多次的测试已经另外购买了一个模块。已经成功启动了WIFI的AP模式。。。接下来我发现另一个问题。。我使用WIFI的工程模版就可以成功启动WIFI,但是我要使用GPIO的工程文档,初始化了WIFI模式后,烧写程序就会出现问题。
就会无限的打印一下内容,重启模块


ELF file SHA256: cf5a4f25fc8f1148

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:6664
load:0x40078000,len:14944
load:0x40080400,len:3816
0x40080400: _init at ??:?

entry 0x40080698
I (27) boot: ESP-IDF v4.4.4 2nd stage bootloader
I (27) boot: compile time 10:38:10
I (27) boot: chip revision: v3.0
I (30) boot_comm: chip revision: 3, min. bootloader chip revision: 0
I (37) boot.esp32: SPI Speed : 40MHz
I (42) boot.esp32: SPI Mode : DIO
I (46) boot.esp32: SPI Flash Size : 4MB
I (51) boot: Enabling RNG early entropy source...
I (56) boot: Partition Table:
I (60) boot: ## Label Usage Type ST Offset Length
I (67) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (75) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (82) boot: 2 factory factory app 00 00 00010000 00100000
I (90) boot: End of partition table
I (94) boot_comm: chip revision: 3, min. application chip revision: 0
I (101) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=13b9ch ( 80796) map
I (139) esp_image: segment 1: paddr=00023bc4 vaddr=3ffb0000 size=038e4h ( 14564) load
I (145) esp_image: segment 2: paddr=000274b0 vaddr=40080000 size=08b68h ( 35688) load
I (160) esp_image: segment 3: paddr=00030020 vaddr=400d0020 size=70738h (460600) map
I (327) esp_image: segment 4: paddr=000a0760 vaddr=40088b68 size=0c220h ( 49696) load
I (357) boot: Loaded app from partition at offset 0x10000
I (358) boot: Disabling RNG early entropy source...
I (369) cpu_start: Pro cpu up.
I (369) cpu_start: Starting app cpu, entry point is 0x400811cc
0x400811cc: call_start_cpu1 at D:/A_Work/ESP_IDF/esp_idf/esp-idf/components/esp_system/port/cpu_start.c:148

I (356) cpu_start: App cpu up.
I (384) cpu_start: Pro cpu start user code
I (384) cpu_start: cpu freq: 160000000
I (384) cpu_start: Application information:
I (388) cpu_start: Project name: generic_gpio
I (394) cpu_start: App version: 1
I (398) cpu_start: Compile time: May 30 2023 10:47:59
I (404) cpu_start: ELF file SHA256: cf5a4f25fc8f1148...
I (410) cpu_start: ESP-IDF: v4.4.4
I (415) heap_init: Initializing. RAM available for dynamic allocation:
I (422) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (428) heap_init: At 3FFB72D8 len 00028D28 (163 KiB): DRAM
I (434) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (441) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (447) heap_init: At 40094D88 len 0000B278 (44 KiB): IRAM
I (455) spi_flash: detected chip: generic
I (458) spi_flash: flash io: dio
I (463) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (473) gpio: GPIO[2]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (483) gpio: GPIO[0]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:1
I (533) wifi:wifi driver task: 3ffc0284, prio:23, stack:6656, core=0
I (533) system_api: Base MAC address is not set
I (533) system_api: read default base MAC address from EFUSE
I (543) wifi:wifi firmware version: 6567a16
I (543) wifi:wifi certification version: v7.0
I (543) wifi:config NVS flash: enabled
I (543) wifi:config nano formating: disabled
I (553) wifi:Init data frame dynamic rx buffer num: 32
I (553) wifi:Init management frame dynamic rx buffer num: 32
I (563) wifi:Init management short buffer num: 32
I (563) wifi:Init dynamic tx buffer num: 32
I (573) wifi:Init static rx buffer size: 1600
I (573) wifi:Init static rx buffer num: 10
I (573) wifi:Init dynamic rx buffer num: 32
I (583) wifi_init: rx ba win: 6
I (583) wifi_init: tcpip mbox: 32
I (593) wifi_init: udp mbox: 6
I (593) wifi_init: tcp mbox: 6
I (593) wifi_init: tcp tx win: 5744
I (603) wifi_init: tcp rx win: 5744
I (603) wifi_init: tcp mss: 1440
I (613) wifi_init: WiFi IRAM OP enabled
I (613) wifi_init: WiFi RX IRAM OP enabled
W (623) wifi:password less than 8

ESP_ERROR_CHECK failed: esp_err_t 0x300b (ESP_ERR_WIFI_PASSWORD) at 0x40088778
0x40088778: _esp_error_check_failed at D:/A_Work/ESP_IDF/esp_idf/esp-idf/components/esp_system/esp_err.c:42

file: "./main/BSP/bsp_wifi.c" line 60
func: bsp_WifiInit_ap
expression: esp_wifi_set_config(WIFI_IF_AP, &wifi_config)

abort() was called at PC 0x4008877b on core 0
0x4008877b: _esp_error_check_failed at D:/A_Work/ESP_IDF/esp_idf/esp-idf/components/esp_system/esp_err.c:43



Backtrace: 0x40081aa2:0x3ffb9610 0x40088785:0x3ffb9630 0x4008f682:0x3ffb9650 0x4008877b:0x3ffb96c0 0x400d60c4:0x3ffb96e0 0x400d5db1:0x3ffb9870 0x4013ef28:0x3ffb98a0 0x4008ba71:0x3ffb98c0
0x40081aa2: panic_abort at D:/A_Work/ESP_IDF/esp_idf/esp-idf/components/esp_system/panic.c:408

0x40088785: esp_system_abort at D:/A_Work/ESP_IDF/esp_idf/esp-idf/components/esp_system/esp_system.c:137

0x4008f682: abort at D:/A_Work/ESP_IDF/esp_idf/esp-idf/components/newlib/abort.c:46

0x4008877b: _esp_error_check_failed at D:/A_Work/ESP_IDF/esp_idf/esp-idf/components/esp_system/esp_err.c:43

0x400d60c4: bsp_WifiInit_ap at C:/Users/Administrator/Desktop/Esp_project/generic_gpio/main/BSP/bsp_wifi.c:60 (discriminator 1)

0x400d5db1: app_main at C:/Users/Administrator/Desktop/Esp_project/generic_gpio/main/gpio_example_main.c:60

0x4013ef28: main_task at D:/A_Work/ESP_IDF/esp_idf/esp-idf/components/freertos/port/port_common.c:141 (discriminator 2)

0x4008ba71: vPortTaskWrapper at D:/A_Work/ESP_IDF/esp_idf/esp-idf/components/freertos/port/xtensa/port.c:142





ELF file SHA256: cf5a4f25fc8f1148

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:6664
load:0x40078000,len:14944
load:0x40080400,len:3816
0x40080400: _init at ??:?

entry 0x40080698...........................

DNF557
Posts: 8
Joined: Tue Apr 25, 2023 12:16 am

Re: 求助为什么开启wifi后会出现校验失败

Postby DNF557 » Tue May 30, 2023 7:25 am

然后我试着修改了一下wifi工程的define的参数.之后,就会出现无限重启模块。
然后,我跳转CONFIG_ESP_WIFI_SSID 定义,在sdkconfig.h的文件里面。。。
那么我要是转过头来。在GPIO的工程里面除了要初始化WIFI的句柄代码外,还要在sdkconfig.h上添加下面的定义。但是,根据提示,此文件是IDE自动生成。。我也试着手动添加,但是失败了 :(


下面是粘贴的部分官方代码。(由于不会上传图片)

#define EXAMPLE_ESP_WIFI_SSID CONFIG_ESP_WIFI_SSID --------------------- (此处改成 -> "mywifi")
#define EXAMPLE_ESP_WIFI_PASS CONFIG_ESP_WIFI_PASSWORD
#define EXAMPLE_ESP_WIFI_CHANNEL CONFIG_ESP_WIFI_CHANNEL
#define EXAMPLE_MAX_STA_CONN CONFIG_ESP_MAX_STA_CONN

static const char *TAG = "wifi softAP";

static void wifi_event_handler(void* arg, esp_event_base_t event_base,
int32_t event_id, void* event_data)
{
if (event_id == WIFI_EVENT_AP_STACONNECTED) {
wifi_event_ap_staconnected_t* event = (wifi_event_ap_staconnected_t*) event_data;
ESP_LOGI(TAG, "station "MACSTR" join, AID=%d",
MAC2STR(event->mac), event->aid);
} else if (event_id == WIFI_EVENT_AP_STADISCONNECTED) {
wifi_event_ap_stadisconnected_t* event = (wifi_event_ap_stadisconnected_t*) event_data;
ESP_LOGI(TAG, "station "MACSTR" leave, AID=%d",
MAC2STR(event->mac), event->aid);
}
}

ESP_Yake
Posts: 109
Joined: Mon Mar 06, 2017 12:23 pm

Re: 求助为什么开启wifi后会出现校验失败

Postby ESP_Yake » Tue Jun 06, 2023 9:02 am

提示很明显,ESP_ERR_WIFI_PASSWORD 说明你的 password 是非法的,可以试着把密码去掉先看看是否可行,然后排查密码中是不是不小心加了特殊字符

DNF557
Posts: 8
Joined: Tue Apr 25, 2023 12:16 am

Re: 求助为什么开启wifi后会出现校验失败

Postby DNF557 » Thu Jun 08, 2023 2:38 am

ESP_Yake wrote:
Tue Jun 06, 2023 9:02 am
提示很明显,ESP_ERR_WIFI_PASSWORD 说明你的 password 是非法的,可以试着把密码去掉先看看是否可行,然后排查密码中是不是不小心加了特殊字符
你好。。感谢你的回信

我也试过去掉密码,烧写后还是出现问题,起始无论是SSID还是PASSWORD的修改,只要不是在 “CONFIG_ESP_WIFI_SSID ”转跳后的地方修改就会出现无限重启报错。
在转跳后的地方修改,没有一点问题。可以任意修改都能正常启动以及手机连接。

#define EXAMPLE_ESP_WIFI_SSID CONFIG_ESP_WIFI_SSID --------------------- (此处改成 -> "mywifi")
#define EXAMPLE_ESP_WIFI_PASS CONFIG_ESP_WIFI_PASSWORD
#define EXAMPLE_ESP_WIFI_CHANNEL CONFIG_ESP_WIFI_CHANNEL
#define EXAMPLE_MAX_STA_CONN CONFIG_ESP_MAX_STA_CONN

然后,我试着在一份新的空白模版工程进行添加WIFI,复制所有的内容(初始化,链接后的事件全部复制);编译修改错误后,烧写后,问题跟我直接修改“EXAMPLE_ESP_WIFI_SSID”的问题一致,然后我发现2个工程的唯一区别就是“config文件夹”里的“sdkconfig.h”里面有定义“CONFIG_ESP_WIFI_SSID ”的值,然后我直接复制给空白模版的工程后,问题依旧,这我就搞不懂了。。 :shock: :shock:

ESP_Yake
Posts: 109
Joined: Mon Mar 06, 2017 12:23 pm

Re: 求助为什么开启wifi后会出现校验失败

Postby ESP_Yake » Mon Jun 12, 2023 7:57 am

有没有想过,也许你 SSID 的那个引号是中文,你可以在传进去之前先16进制打印一下

Who is online

Users browsing this forum: No registered users and 64 guests