Hi! I've got a Lilygo T-ETH-Lite ESP32S3, and I'm using Arduino IDE 2.3.3. I'm writing here because I've got a problem. I would like to put a static IP on my Lilygo through Ethernet, but I only find tutorials about how to do it through WiFi.
Could I get some help?
Thanks!
Lilygo T-ETH-Lite ESP32-S3
-
- Posts: 1
- Joined: Sat Oct 12, 2024 12:24 pm
Re: Lilygo T-ETH-Lite ESP32-S3
IPAddress staticIP(169, 254, 1, 2);
IPAddress gateway(169, 254, 1, 1);
IPAddress subnet(255, 255, 0, 0);
IPAddress dns(169, 254, 1, 1);
set this data and then configure your ethernet params during setup as follows
ETH.begin();
if (ETH.config(staticIP, gateway, subnet, dns, dns) == false) {
Serial.println("Static IP Configuration failed.");
}
IPAddress gateway(169, 254, 1, 1);
IPAddress subnet(255, 255, 0, 0);
IPAddress dns(169, 254, 1, 1);
set this data and then configure your ethernet params during setup as follows
ETH.begin();
if (ETH.config(staticIP, gateway, subnet, dns, dns) == false) {
Serial.println("Static IP Configuration failed.");
}
Who is online
Users browsing this forum: No registered users and 23 guests