DESKTOP-B25GA9E\W35
1 year ago
4 changed files with 118 additions and 65 deletions
@ -0,0 +1,30 @@ |
|||||||
|
--tips to user link-AP |
||||||
|
function PageAPNet() |
||||||
|
Disp:clearBuffer() |
||||||
|
--Disp:setFont(u8g2.font_unifont_t_symbols); |
||||||
|
Disp:setFont(u8g2.font_unifont_t_symbols); |
||||||
|
Disp:drawStr(0,10,"AP-LinkMode"); |
||||||
|
Disp:setFont(u8g2.font_6x10_tf); |
||||||
|
Disp:drawStr(0,26,"Please use your"); |
||||||
|
Disp:drawStr(0,36,"mobile phone search"); |
||||||
|
Disp:drawStr(0,46,"and link ap-point"); |
||||||
|
Disp:drawStr(0,56,"DY-Light-Controller"); |
||||||
|
Disp:updateDisplay(); |
||||||
|
end |
||||||
|
--mobile setting ap and passwd |
||||||
|
function AutoLinkByMobile() |
||||||
|
wifi.sta.clearconfig(); |
||||||
|
wifi.setmode(wifi.STATIONAP); |
||||||
|
wifi.ap.config({ssid="DY-Light-Controller", auth=wifi.OPEN}); |
||||||
|
enduser_setup.manual(true); |
||||||
|
enduser_setup.start( |
||||||
|
"DY-Light-Controller", |
||||||
|
function() |
||||||
|
print("Connected to WiFi!") |
||||||
|
end, |
||||||
|
function(err, str) |
||||||
|
print("enduser_setup: Err #" .. err .. ": " .. str) |
||||||
|
end |
||||||
|
) |
||||||
|
print("init endUserServer") |
||||||
|
end |
@ -1,3 +1,6 @@ |
|||||||
Config_Table = { |
Config_Table = { |
||||||
["Version"]="V0.1" |
["IpAddress"]="192.168.1.210", |
||||||
} |
["Gateway"]="192.168.1.1", |
||||||
|
["Version"]="V0.1", |
||||||
|
["Netmask"]="255.255.255.0" |
||||||
|
} |
Loading…
Reference in new issue