-
Notifications
You must be signed in to change notification settings - Fork 7.6k
DHCP client failed on 2.0.4 #7068
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
If you run the included code without the WiFi.config() do you also get 255.255.255.255? |
I tried the Client Code and it works fine... I can't reproduce this issue with Arduino Core 2.0.4 |
Output with Static IP when accessing "google.com/index.html"const char* ssid = "WiFiTestSSID"; IPAddress local_IP(192, 168, 15, 3);
Output using Dynamic DHCP IP when accessing "google.com/index.html"void setup()
{
Serial.begin(115200);
// if (!WiFi.config(local_IP, gateway, subnet, primaryDNS, secondaryDNS)) {
// Serial.println("STA Failed to configure");
// }
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
// ...
|
@tsctrl -
DNS doesn't assign IP Address. The Log Output of this issue doesn't seem to be from Arduino. |
@tsctrl - I think that you are using Arduino as Component and your IDF isn't updated |
I had the same issue on ESP32-C3 (M5Stamp). I also use arduino-esp32 as a component.
An incorrect IP address is returned from DHCP.
I believe I am using esp-idf v4.4.1 correctly. Incidentally, I upgraded esp-idf to v4.4.2(1b16ef6c) as a trial and the problem was resolved. |
For Arduino as Component:It seems that IDF v4.4.2-1-gce1fde4b3b has the update I mentitoned before. |
@SuGlider I can confirm that the combination of esp-idf 4.4.2 and
|
I also can confirm that esp-idf ver 4.4.2 solves problem when compiling project with arduino as component. |
We just merged IDF 4.4.2 into ESP32 Arduino Github - Master branch. Closing this issue at this time. |
Board
ESP32 Dev Module
Device Description
DevKitC
Hardware Configuration
None
Version
v2.0.4
IDE Name
IDF Component, Arduino IDE
Operating System
Windows 10
Flash frequency
40MHz
PSRAM enabled
no
Upload speed
9600
Description
dhcp client failed on 2.0.4
after update to 2.0.4 my dhcp client is not working anymore and i have to do below configuration to call to the internet:
IPAddress STAip(192, 168, 0, 100);
IPAddress STAgateway(192, 168, 0, 1);
IPAddress STAsubnet(255, 255, 255, 0);
IPAddress STAdns(192, 168, 0, 1);
IPAddress primaryDNS(8, 8, 8, 8); // optional
IPAddress secondaryDNS(8, 8, 4, 4); // optional
WiFi.config(STAip, STAgateway, STAsubnet, primaryDNS, secondaryDNS);
else my DNS was not able to automatically assign ip and call to the internet was failed. no error was displayed but i notice that the dns was always set to 255, 255, 255, 255 which i think the cause since it was different that the one in my local network. previously i did not have to do WiFi.config and STA mode automatically configure the connection to my router with proper ip.
Symptom:
Connected to station (Router) but unable to call internet without the static config. seems like the ip assignment was wrong
Thanks
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: