Update CaptivePortal.ino (#4080)
* Update CaptivePortal.ino Illegal SSID used for SoftAP * Fixed ordering problem. Now actually works
This commit is contained in:
		
							parent
							
								
									b7c5e502e7
								
							
						
					
					
						commit
						f30edd040e
					
				| @ -2,7 +2,7 @@ | ||||
| #include <DNSServer.h> | ||||
| 
 | ||||
| const byte DNS_PORT = 53; | ||||
| IPAddress apIP(192, 168, 1, 1); | ||||
| IPAddress apIP(8,8,4,4); // The default android DNS
 | ||||
| DNSServer dnsServer; | ||||
| WiFiServer server(80); | ||||
| 
 | ||||
| @ -12,11 +12,9 @@ String responseHTML = "" | ||||
|   "be redirected here.</p></body></html>"; | ||||
| 
 | ||||
| void setup() {  | ||||
|   WiFi.disconnect();   //added to start with the wifi off, avoid crashing
 | ||||
|   WiFi.mode(WIFI_OFF); //added to start with the wifi off, avoid crashing
 | ||||
|   WiFi.mode(WIFI_AP); | ||||
|   WiFi.softAP("ESP32-DNSServer"); | ||||
|   WiFi.softAPConfig(apIP, apIP, IPAddress(255, 255, 255, 0)); | ||||
|   WiFi.softAP("DNSServer CaptivePortal example"); | ||||
| 
 | ||||
|   // if DNSServer is started with "*" for domain name, it will reply with
 | ||||
|   // provided IP to all DNS request
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user