Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

cannot reach esp8266 via udp while he is running with a static ip

#include <ESP8266WiFi.h>
#include <ESPAsyncUDP.h>

IPAddress ip_ap(192, 168, 1, 123);
IPAddress gw_ap(192, 168, 1, 1);
IPAddress sn_ap(255, 255, 255, 0);
AsyncUDP udp;

void setup() {
	Serial1.begin(921600);
	WiFi.softAPConfig(ip_ap, gw_ap, sn_ap);
	WiFi.softAP("testtest", "testtest");
}

void loop() {
	delay(1000);
	udp.broadcastTo("Anyone here?", 2424);
	Serial1.println("LOOP");
}
Source by github.com #
 
PREVIOUS NEXT
Tagged: #reach #udp #running #static #ip
ADD COMMENT
Topic
Name
2+8 =