Closed SteamedCharger closed 1 year ago
换了几个版本的idf,发现5.0.3也有相同的问题;5.1.1可以正常启动,但无法配网(可以获取到SSID和PASSWD但无法连接,没有错误信息)
问题解决了。5.1.1在esp_wifi_restore();后默认为softAP模式,需要切换到STA才能连网。
是个线程调度的问题,可以临时把此处更改为:
#define CONFIG_UNBROKEN_RECORD_TASK_DEFAULT_PRIOTY (ESP_TASK_MAIN_PRIO - 1)
对于无法配网,请提供详细的 log
十分感谢。
配网问题已解决:
// app_main.c
static esp_err_t get_wifi_config(wifi_config_t *wifi_cfg, uint32_t wait_ms)
{
/* 省略 */
/**< Reset wifi and restart wifi */
esp_wifi_restore();
esp_wifi_set_mode(WIFI_MODE_STA); //加入这一行
esp_wifi_start();
/* 省略 */
}
ESP-IDF版本:v4.4.5 模块:ESP-WROOM-32
将示例工程led_light中的"Run FreeRTOS only on first core"设置为false之后,系统无法正常启动(运行到"Starting scheduler on APP CPU"后卡死)。除了这一项设置外没有改变任何其他设置。 ESP-IDF中自带的示例没有这个问题。
完整log:
然后串口不再输出任何数据。