I would like to set a fixed IP for the HCPBridge but I was not able to find an input field for this.
//setup wifi
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
WiFi.setAutoReconnect(true);
while (WiFi.status() != WL_CONNECTED) {
delay(100);
}
// Set your Static IP address
IPAddress local_IP(192, 168, 1, 184);
// Set your Gateway IP address
IPAddress gateway(192, 168, 1, 1);
IPAddress subnet(255, 255, 0, 0);
IPAddress primaryDNS(8, 8, 8, 8); // optional
IPAddress secondaryDNS(8, 8, 4, 4); // optional
// Configures static IP address
if (!WiFi.config(local_IP, gateway, subnet, primaryDNS, secondaryDNS)) {
Serial.println("STA Failed to configure");
}
I would like to set a fixed IP for the HCPBridge but I was not able to find an input field for this.
After I looked into the main.cpp i found the following code:
Accoring to this Website: https://randomnerdtutorials.com/esp32-static-fixed-ip-address-arduino-ide/
Something like this would be needed: