|  |  | @ -24,10 +24,9 @@ function ManualLink(ssid,passwd) | 
			
		
	
		
		
			
				
					
					|  |  |  |     wifi.sta.config(StationCfg) |  |  |  |     wifi.sta.config(StationCfg) | 
			
		
	
		
		
			
				
					
					|  |  |  |     wifi.sta.connect() |  |  |  |     wifi.sta.connect() | 
			
		
	
		
		
			
				
					
					|  |  |  |     if wifi.sta.getip() == nil then |  |  |  |     if wifi.sta.getip() == nil then | 
			
		
	
		
		
			
				
					
					|  |  |  |         SetIP("192.168.1.115","255.255.255.0","192.168.1.1") |  |  |  |         SetIPFromFile(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         print("No Ip get,default to 192.168.1.115!"); |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     end |  |  |  |     end | 
			
		
	
		
		
			
				
					
					|  |  |  |     PageMainScene(ssid,wifi.sta.getip(),"V1.0"); |  |  |  |     PageMainScene(ssid,wifi.sta.getip(),Config_Table["Version"]); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     local lightArr = {[1]=false,[2]=false,[3]=false,[4]=false} |  |  |  |     local lightArr = {[1]=false,[2]=false,[3]=false,[4]=false} | 
			
		
	
		
		
			
				
					
					|  |  |  |     PageLight(lightArr) |  |  |  |     PageLight(lightArr) | 
			
		
	
		
		
			
				
					
					|  |  |  |     --Service Open |  |  |  |     --Service Open | 
			
		
	
	
		
		
			
				
					|  |  | @ -70,3 +69,27 @@ function SetIP(ipAddress,netmask,gateway) | 
			
		
	
		
		
			
				
					
					|  |  |  |     wifi.sta.setip(IpCfg) |  |  |  |     wifi.sta.setip(IpCfg) | 
			
		
	
		
		
			
				
					
					|  |  |  | end |  |  |  | end | 
			
		
	
		
		
			
				
					
					|  |  |  | --SetIP("192.168.1.115","255.255.255.0","192.168.1.1") |  |  |  | --SetIP("192.168.1.115","255.255.255.0","192.168.1.1") | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | function SaveIP(ipAddress,netmask,gateway) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     SaveData("IpAddress",ipAddress); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     SaveData("Netmask",netmask); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     SaveData("Gateway",gateway); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | end | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | function SetSoftVersion(version) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     SaveData("Version",version); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | end | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | function SetIPFromFile() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     if Config_Table["IpAddress"]~=nil and Config_Table["Netmask"]~=nil and Config_Table["Gateway"]~=nil then | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         IpCfg = { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             ip = Config_Table["IpAddress"], | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             netmask = Config_Table["Netmask"], | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             gateway = Config_Table["Gateway"] | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         wifi.sta.setip(IpCfg); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     else | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         SetIP("192.168.1.210","255.255.255.0","192.168.1.1") | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         print("No Ip get,default to 192.168.1.210!"); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     end | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | end | 
			
		
	
	
		
		
			
				
					|  |  | 
 |