feat(provisioning): add mini-program BLE Wi-Fi setup

This commit is contained in:
chenjintao
2026-08-13 15:44:18 +08:00
parent 5711c26a9a
commit 841fe32c49
21 changed files with 1776 additions and 41 deletions
@@ -47,7 +47,17 @@ esp_err_t wifi_portal_start_config_ap(const char *ssid_prefix);
* for the connection to succeed within the provided timeout (milliseconds).
*/
esp_err_t wifi_portal_connect_sta(int timeout_ms);
/**
* @brief Trial-connect with credentials without persisting them first.
*
* On success, the trial credentials atomically replace the saved credential
* list. On failure, the previous in-memory and NVS credentials remain intact.
*/
esp_err_t wifi_portal_connect_sta_with_credentials(const char *ssid,
const char *password,
int timeout_ms);
esp_err_t wifi_portal_reconnect_sta(int timeout_ms);
esp_err_t wifi_portal_stop_sta(void);
/**
* @brief Save Wi-Fi credentials into NVS.