Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions firmware/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,6 @@ obj/

sdkconfig
sdkconfig.old
sdkconfig.defaults.local

xiaozhi-esp32/
8 changes: 7 additions & 1 deletion firmware/main/hal/hal_ble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,13 @@ class WifiConfigServer {
const char* ssid = data["ssid"];
const char* password = data["password"];

mclog::tagInfo(_tag, "get wifi config: {} / {}", ssid, password);
if (ssid == nullptr || password == nullptr) {
mclog::tagWarn(_tag, "setWifi is missing ssid or password");
notify_state(2, "wifiConnectFailed");
return;
}

mclog::tagInfo(_tag, "get wifi config for ssid: {}", ssid);

// Notify state: connecting
notify_state(0, "wifiConnecting");
Expand Down