Answers for "ip unset esp8266"

C
0

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

#include <ESP8266WiFi.h>
#include <WiFiUdp.h>

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

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

void loop() {
	delay(1000);
	udp.beginPacket(IPAddress(192, 168, 1, 255), 2424);
	udp.print("TEST TEST");
	udp.endPacket();
}
Posted by: Guest on November-19-2020
0

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");
}
Posted by: Guest on November-19-2020

Code answers related to "C"

Browse Popular Code Answers by Language