Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
604bca01
Unverified
Commit
604bca01
authored
Feb 05, 2024
by
Sébastien Roy
Committed by
GitHub
Feb 05, 2024
Browse files
Add support for open networks to enduser_setup (#3392)
parent
76936d7e
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/modules/enduser_setup.c
View file @
604bca01
...
...
@@ -832,11 +832,19 @@ static int enduser_setup_http_handle_credentials(char *data, unsigned short data
state
->
success
=
0
;
state
->
lastStationStatus
=
0
;
char
*
name_str
=
strstr
(
data
,
"wifi_ssid="
);
char
*
pwd_str
=
strstr
(
data
,
"wifi_password="
);
if
(
name_str
==
NULL
||
pwd_str
==
NULL
)
// in case we dont get a passwd (for open networks)
if
(
pwd_str
==
NULL
)
{
pwd_str
=
"wifi_password="
;
ENDUSER_SETUP_DEBUG
(
"No passord provided. Assuming open network"
);
}
if
(
name_str
==
NULL
)
{
ENDUSER_SETUP_DEBUG
(
"
Password or
SSID string not found"
);
ENDUSER_SETUP_DEBUG
(
"SSID string not found"
);
return
1
;
}
...
...
docs/modules/enduser-setup.md
View file @
604bca01
...
...
@@ -54,6 +54,7 @@ Then the `eus_params.lua` file will contain the following:
```
lua
-- those wifi_* are the base parameters that are saved anyway
-- if network is open, then there is no wifi_password
local
p
=
{}
p
.
wifi_ssid
=
"ssid"
p
.
wifi_password
=
"password"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment