- 新增 wifi-connect 组件(AP 配网、DNS 劫持、Captive Portal) - 支持长按按键进入配网,网页配置路由器 SSID/密码 - 增加清除已保存 Wi-Fi 参数能力(API + 页面按钮) - 增加中文状态日志与中文注释,优化配网交互 - 补充组件文档:README、USER_GUIDE、QUICK_POSTER、BLOG
15 lines
385 B
C
Executable File
15 lines
385 B
C
Executable File
#include <stdio.h>
|
|
#include "freertos/FreeRTOS.h"
|
|
#include "freertos/task.h"
|
|
#include "esp_check.h"
|
|
|
|
#include "wifi-connect.h"
|
|
|
|
|
|
void app_main(void)
|
|
{
|
|
// 初始化 Wi-Fi 配网组件,支持长按按键进入配网
|
|
ESP_ERROR_CHECK(wifi_connect_init());
|
|
printf("设备启动完成:长按按键进入配网模式,手机连接 ESP32-* 后访问 http://192.168.4.1\n");
|
|
}
|