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
059a5eeb
Commit
059a5eeb
authored
Feb 12, 2015
by
HuangRui
Browse files
wifi.ap.setip() can set ip address now, fixed #199.
parent
960032dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/modules/wifi.c
View file @
059a5eeb
...
@@ -256,8 +256,19 @@ static int wifi_setip( lua_State* L, uint8_t mode )
...
@@ -256,8 +256,19 @@ static int wifi_setip( lua_State* L, uint8_t mode )
ip
=
parse_key
(
L
,
"gateway"
);
ip
=
parse_key
(
L
,
"gateway"
);
if
(
ip
!=
0
)
if
(
ip
!=
0
)
pTempIp
.
gw
.
addr
=
ip
;
pTempIp
.
gw
.
addr
=
ip
;
wifi_station_dhcpc_stop
();
lua_pushboolean
(
L
,
wifi_set_ip_info
(
mode
,
&
pTempIp
));
if
(
STATION_IF
==
mode
)
{
wifi_station_dhcpc_stop
();
lua_pushboolean
(
L
,
wifi_set_ip_info
(
mode
,
&
pTempIp
));
}
else
{
wifi_softap_dhcps_stop
();
lua_pushboolean
(
L
,
wifi_set_ip_info
(
mode
,
&
pTempIp
));
wifi_softap_dhcps_start
();
}
return
1
;
return
1
;
}
}
...
...
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