Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
uPython-mirror
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TASTE
uPython-mirror
Commits
27fa9881
Commit
27fa9881
authored
Feb 19, 2018
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
esp32/modnetwork: Implement dhcp_hostname for WLAN.config().
parent
4e469085
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
ports/esp32/modnetwork.c
ports/esp32/modnetwork.c
+11
-0
No files found.
ports/esp32/modnetwork.c
View file @
27fa9881
...
...
@@ -445,6 +445,11 @@ STATIC mp_obj_t esp_config(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs
cfg
.
ap
.
channel
=
mp_obj_get_int
(
kwargs
->
table
[
i
].
value
);
break
;
}
case
QS
(
MP_QSTR_dhcp_hostname
):
{
const
char
*
s
=
mp_obj_str_get_str
(
kwargs
->
table
[
i
].
value
);
ESP_EXCEPTIONS
(
tcpip_adapter_set_hostname
(
self
->
if_id
,
s
));
break
;
}
default:
goto
unknown
;
}
...
...
@@ -494,6 +499,12 @@ STATIC mp_obj_t esp_config(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs
req_if
=
WIFI_IF_AP
;
val
=
MP_OBJ_NEW_SMALL_INT
(
cfg
.
ap
.
channel
);
break
;
case
QS
(
MP_QSTR_dhcp_hostname
):
{
const
char
*
s
;
ESP_EXCEPTIONS
(
tcpip_adapter_get_hostname
(
self
->
if_id
,
&
s
));
val
=
mp_obj_new_str
(
s
,
strlen
(
s
));
break
;
}
default:
goto
unknown
;
}
...
...
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