Comments on: ESP32 Static/Fixed IP Address https://randomnerdtutorials.com/esp32-static-fixed-ip-address-arduino-ide/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Sun, 02 Feb 2025 11:27:34 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: namor https://randomnerdtutorials.com/esp32-static-fixed-ip-address-arduino-ide/#comment-1004736 Sun, 02 Feb 2025 11:27:34 +0000 https://randomnerdtutorials.com/?p=74402#comment-1004736 dear all. after following the tutorial unfortunately i get a dns error: “DNS Failed for ‘https://myserver/esp-post-data.php’ with error ‘-54’ ”

when using curl i don’t get the error: ” curl –data “api_key=….” https://myserver/esp-post-data.php

what might be the problem (i tried with http and the https version)?

thanks for any hint!

]]>
By: Simon https://randomnerdtutorials.com/esp32-static-fixed-ip-address-arduino-ide/#comment-894585 Sun, 25 Feb 2024 09:55:56 +0000 https://randomnerdtutorials.com/?p=74402#comment-894585 Hello,
I have tried to reserve an IP in the router settings for my esp32 camera modul based on it’s MAC address but for some reason the esp won’t accept that address and gets anothe IP. This method worked for my esp8266 boards, though.
What can cause that?

Thank you in advance!

]]>
By: Chip F. https://randomnerdtutorials.com/esp32-static-fixed-ip-address-arduino-ide/#comment-838857 Mon, 05 Jun 2023 15:20:38 +0000 https://randomnerdtutorials.com/?p=74402#comment-838857 My experience with the ESP32, like that of Robert FOLKES above, is that setting the primary and secondary DNS in the call to WiFiConfig() is maybe not so optional. Not setting those parameters seems to have broken NTP for me as well. But this code does not break the time functions:

Serial.println(“Initializing Wi-Fi IP config…”);
if (!WiFi.config(local_IP, gateway, subnet, primarydns, secondarydns)) {
Serial.println(“STA Failed to configure”);
}

]]>
By: SteveHolland https://randomnerdtutorials.com/esp32-static-fixed-ip-address-arduino-ide/#comment-774963 Fri, 12 Aug 2022 02:08:58 +0000 https://randomnerdtutorials.com/?p=74402#comment-774963 In reply to Zehnen.

Yes it works on the camera webserver also.

I had to change the subnet from 255.255.0.0. to 255.255.255.0

]]>
By: Jop https://randomnerdtutorials.com/esp32-static-fixed-ip-address-arduino-ide/#comment-718018 Mon, 10 Jan 2022 08:37:56 +0000 https://randomnerdtutorials.com/?p=74402#comment-718018 Hi Sara,

For some reason it seems not possible to combine Static/Fixed IP-address with getting the time from a NTP-server.

Kind regards,

Jop

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-static-fixed-ip-address-arduino-ide/#comment-717950 Sun, 09 Jan 2022 16:24:55 +0000 https://randomnerdtutorials.com/?p=74402#comment-717950 In reply to Zzo.

Hi.
You can learn how to use preferences here: https://randomnerdtutorials.com/esp32-save-data-permanently-preferences/
Regards,
Sara

]]>
By: Zzo https://randomnerdtutorials.com/esp32-static-fixed-ip-address-arduino-ide/#comment-717939 Sun, 09 Jan 2022 14:12:22 +0000 https://randomnerdtutorials.com/?p=74402#comment-717939 Hello,

Is there a way to assign an IP address read from the ESP32 Preferences instead of hardcoded?

Regards

]]>
By: janvier ott https://randomnerdtutorials.com/esp32-static-fixed-ip-address-arduino-ide/#comment-707427 Tue, 07 Dec 2021 19:57:47 +0000 https://randomnerdtutorials.com/?p=74402#comment-707427 As to the units loosing the ssid and pw or dropping of the WIFI network, I may try to figure out how to time x mins to not allow too long of time without seeing a request from the Rasp Pi. Say the Rasp Pi is asking for data ever 5 mins then if not “see” arequested in say 15 mins force a reboot??

]]>
By: janvier ott https://randomnerdtutorials.com/esp32-static-fixed-ip-address-arduino-ide/#comment-707425 Tue, 07 Dec 2021 19:53:04 +0000 https://randomnerdtutorials.com/?p=74402#comment-707425 In reply to Chris Bartley.

I have noted that if power goes off from my main power company, that the esp32’s start asking the AP to Router to get back on the system (SSID) before the router is up and running again. In this case with the sign in library esp software I am using the esp’s go back to the factory IP (192.168.4.1) and I have to sign into each and give them my ssid and pw. I put a random number generator to force a wait of 30 to 60 sec before asking to get on the network. This creates a delay when wanting to check a unit with the com port and 60sec (60000) isn’t long enough. I have bought a Time delay after energization (TDAE) relay to supply 115vac to “wall warts” that feed each esp32. Will set it for a long time (5min?) to allow the network to get up running before the esp32’s start asking to be on line. Still will leave the random delay in the esp32’s so all are not asking for and IP at the same time??.
There is a “new” esp32 that claims to be more stable (CH9102X). Got 10 and load my sketch using the same arduino interface as the older units. They appear to work OK at the initial SW install. One thing that is quirky is each of the 10 set a new port number 13 through 22 instead of remaining port 10 (the older esp32’s). They “forced” the new port and you don’t know it till you load the sketch and it won’t finish. Unless you note it as to the eps32, if you load several units and go back to a unit, which port do you pick in the list of ports??. They also loaded a new port in order they were plugged in and was depending on the MAC addresses and the next day on a PC startup they appeared to keep the some port. Not sure why the manufacture is doing it. May several units via the usb com ports will allow them to be hook up to each other or as a network of some kind?

]]>
By: Chris Bartley https://randomnerdtutorials.com/esp32-static-fixed-ip-address-arduino-ide/#comment-707227 Tue, 07 Dec 2021 10:33:07 +0000 https://randomnerdtutorials.com/?p=74402#comment-707227 In reply to janvier ott.

The ESP32 is pretty notorious for dropping of the WiFi and being unable to reconnect unless physically rebooted
I had similar problems with my project which initially used DHCP, later recommended to switch to Fixed IP to fix it – better(?) but still does/did it
So now included in my Wi-FI connect process, I do an ESP.restart() after a number of failed connection attempts.
For interest I log that in EEprom, and send myself an email on reboot, just so I have a knowledge of that happening
I get that email at least once every 2/3 days – and this is just a single unit let alone 42 of them !

]]>