Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
54b89665
Commit
54b89665
authored
Apr 12, 2016
by
Paul Sokolovsky
Browse files
esp8266/modnetwork: .config(): Add "password" param (W/O).
parent
7acc252e
Changes
2
Hide whitespace changes
Inline
Side-by-side
esp8266/modnetwork.c
View file @
54b89665
...
...
@@ -264,6 +264,15 @@ STATIC mp_obj_t esp_config(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs
cfg
.
ap
.
authmode
=
mp_obj_get_int
(
kwargs
->
table
[
i
].
value
);
break
;
}
case
QS
(
MP_QSTR_password
):
{
req_if
=
SOFTAP_IF
;
mp_uint_t
len
;
const
char
*
s
=
mp_obj_str_get_data
(
kwargs
->
table
[
i
].
value
,
&
len
);
len
=
MIN
(
len
,
sizeof
(
cfg
.
ap
.
password
)
-
1
);
memcpy
(
cfg
.
ap
.
password
,
s
,
len
);
cfg
.
ap
.
password
[
len
]
=
0
;
break
;
}
default:
goto
unknown
;
}
...
...
esp8266/qstrdefsport.h
View file @
54b89665
...
...
@@ -126,6 +126,7 @@ Q(AUTH_WPA_WPA2_PSK)
// config keys
Q
(
essid
)
Q
(
authmode
)
Q
(
password
)
// Pin class
Q
(
Pin
)
...
...
Write
Preview
Supports
Markdown
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