-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwlancfg.lua
47 lines (42 loc) · 1.27 KB
/
wlancfg.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---------------------------------------
--- Set Variables ---
---------------------------------------
--- Set AP Configuration Variables ---
AP_CFG={}
--- SSID: 1-32 chars
AP_CFG.ssid="frama-ampel"
--- Password: 8-64 chars. Minimum 8 Chars
AP_CFG.pwd="frama2222"
--- Authentication: AUTH_OPEN, AUTH_WPA_PSK, AUTH_WPA2_PSK, AUTH_WPA_WPA2_PSK
AP_CFG.auth=AUTH_OPEN
--- Channel: Range 1-14
AP_CFG.channel = 6
--- Hidden Network? True: 1, False: 0
AP_CFG.hidden = 0
--- Max Connections: Range 1-4
AP_CFG.max=4
--- WiFi Beacon: Range 100-60000
AP_CFG.beacon=100
--- Set AP IP Configuration Variables ---
AP_IP_CFG={}
AP_IP_CFG.ip="192.168.10.1"
AP_IP_CFG.netmask="255.255.255.0"
AP_IP_CFG.gateway="192.168.10.1"
--- Set AP DHCP Configuration Variables ---
--- There is no support for defining last DHCP IP ---
AP_DHCP_CFG ={}
AP_DHCP_CFG.start = "192.168.10.2"
---------------------------------------
--- Configure ESP8266 into AP Mode ---
wifi.setmode(wifi.SOFTAP)
--- Configure 802.11n Standard ---
wifi.setphymode(wifi.PHYMODE_N)
--- Configure WiFi Network Settings ---
wifi.ap.config(AP_CFG)
--- Configure AP IP Address ---
wifi.ap.setip(AP_IP_CFG)
--- Configure DHCP Service ---
wifi.ap.dhcp.config(AP_DHCP_CFG)
--- Start DHCP Service ---
wifi.ap.dhcp.start()
---------------------------------------