Skip to content

Commit 28fbb6e

Browse files
Godzilmarcoskirsch
authored andcommitted
now user proper table based parameter for wifi.ap.setip instead of a string (#106)
1 parent 0f85266 commit 28fbb6e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

httpserver-conf.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ if (conf.wifi.mode == wifi.SOFTAP) or (conf.wifi.mode == wifi.STATIONAP) then
2020
conf.wifi.accessPoint.config = {}
2121
conf.wifi.accessPoint.config.ssid = "ESP-"..node.chipid() -- Name of the WiFi network to create.
2222
conf.wifi.accessPoint.config.pwd = "ESP-"..node.chipid() -- WiFi password for joining - at least 8 characters
23-
conf.wifi.accessPoint.ip = "192.168.111.1"
24-
-- conf.wifi.accessPoint.netmask = "255.255.255.0"
25-
-- conf.wifi.accessPoint.gateway = "192.168.111.1"
23+
conf.wifi.accessPoint.net.ip = "192.168.111.1"
24+
conf.wifi.accessPoint.net.netmask="255.255.255.0"
25+
conf.wifi.accessPoint.net.gateway="192.168.111.1" }
2626
end
2727
-- These apply only when connecting to a router as a client
2828
if (conf.wifi.mode == wifi.STATION) or (conf.wifi.mode == wifi.STATIONAP) then

httpserver-wifi.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ wifi.setmode(conf.wifi.mode)
1414
if (conf.wifi.mode == wifi.SOFTAP) or (conf.wifi.mode == wifi.STATIONAP) then
1515
print('AP MAC: ',wifi.ap.getmac())
1616
wifi.ap.config(conf.wifi.accessPoint.config)
17-
wifi.ap.setip(conf.wifi.accessPoint.ip)
17+
wifi.ap.setip(conf.wifi.accessPoint.net)
1818
end
1919

2020
if (conf.wifi.mode == wifi.STATION) or (conf.wifi.mode == wifi.STATIONAP) then

0 commit comments

Comments
 (0)