Skip to content
Merged
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
2 changes: 1 addition & 1 deletion app/modules/wifi.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ static int wifi_station_config( lua_State* L )
}
else
{
save_to_flash=false;
save_to_flash=true;
}
lua_pop(L, 1);

Expand Down
4 changes: 2 additions & 2 deletions docs/en/modules/wifi.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,8 @@ Sets the WiFi station configuration.
- "AC-1D-1C-B1-0B-22"
- "DE AD BE EF 7A C0"
- `save` Save station configuration to flash.
- `true` configuration **will** be retained through power cycle.
- `false` configuration **will not** be retained through power cycle. (Default).
- `true` configuration **will** be retained through power cycle. (Default).
- `false` configuration **will not** be retained through power cycle.
- Event callbacks will only be available if `WIFI_SDK_EVENT_MONITOR_ENABLE` is uncommented in `user_config.h`
- Please note: To ensure all station events are handled at boot time, all relevant callbacks must be registered as early as possible in `init.lua` with either `wifi.sta.config()` or `wifi.eventmon.register()`.
- `connected_cb`: Callback to execute when station is connected to an access point. (Optional)
Expand Down
2 changes: 1 addition & 1 deletion docs/en/upload.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ wifi.eventmon.register(wifi.eventmon.STA_DISCONNECTED, wifi_disconnect_event)

print("Connecting to WiFi access point...")
wifi.setmode(wifi.STATION)
wifi.sta.config({ssid=SSID, pwd=PASSWORD, save=true})
wifi.sta.config({ssid=SSID, pwd=PASSWORD})
-- wifi.sta.connect() not necessary because config() uses auto-connect=true by default

```
Expand Down