-
Notifications
You must be signed in to change notification settings - Fork 7.6k
INADDR_NONE leads to compilation error in Arduino #6610
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
The main issue is that <lwip/inet.h> declares |
probably related issue #5220 ? |
This is another test case used to verify/test this issue and PR Fix: #include <Arduino.h>
#include <WiFi.h>
void setup() {
WiFi.begin("Your_SSID", "Your_wifi_password");
String nodeName = "NODE-" + WiFi.macAddress();
nodeName.replace(":", "");
char _nodeName[20]; nodeName.toCharArray(_nodeName, 20);
WiFi.setHostname(_nodeName);
WiFi.config(INADDR_NONE, INADDR_NONE, INADDR_NONE);
WiFi.mode(WIFI_STA);
log_i("Connected to: ");
log_i( "%s", WiFi.SSID() );
log_i( "%s", WiFi.localIP().toString().c_str() );
log_i( "%s", WiFi.getHostname());
}
void loop() {
} |
Description of Change Fixes IPAddress INADDR_NONE declaration when using Arduino WiFi or ETH. This symbol was defined as 0xffffffff by lwip /inet.h, making it impossible to use INADDR_NONE correctly. This PR only works when <wifi-provisioning/wifi_config.h> has a modification to include <lwip/ip4_addr.h> instead of <lwip/inet.h>. This will be done directly to the sdk folder in the github structure and it has been fixed in IDF by a separated Merge Request. This will be reflected in the future, for good. Tests scenarios This PR was tested with all Arduino WiFi examples, including AsyncUDP. Also with ETH examples. It was also tested for #6610 test cases. Testing done for ESP32, ESP32-S2, ESP32-C3 and ESP32-S3. Related links fixes #6610 fixes #6247 fixes #4732
Description of Change Fixes IPAddress INADDR_NONE declaration when using Arduino WiFi or ETH. This symbol was defined as 0xffffffff by lwip /inet.h, making it impossible to use INADDR_NONE correctly. This PR only works when <wifi-provisioning/wifi_config.h> has a modification to include <lwip/ip4_addr.h> instead of <lwip/inet.h>. This will be done directly to the sdk folder in the github structure and it has been fixed in IDF by a separated Merge Request. This will be reflected in the future, for good. Tests scenarios This PR was tested with all Arduino WiFi examples, including AsyncUDP. Also with ETH examples. It was also tested for espressif#6610 test cases. Testing done for ESP32, ESP32-S2, ESP32-C3 and ESP32-S3. Related links fixes espressif#6610 fixes espressif#6247 fixes espressif#4732 Co-authored-by: Rodrigo Garcia <[email protected]>
* Tasmota changes * Fixes INADDR_NONE (espressif#6659) (#136) Description of Change Fixes IPAddress INADDR_NONE declaration when using Arduino WiFi or ETH. This symbol was defined as 0xffffffff by lwip /inet.h, making it impossible to use INADDR_NONE correctly. This PR only works when <wifi-provisioning/wifi_config.h> has a modification to include <lwip/ip4_addr.h> instead of <lwip/inet.h>. This will be done directly to the sdk folder in the github structure and it has been fixed in IDF by a separated Merge Request. This will be reflected in the future, for good. Tests scenarios This PR was tested with all Arduino WiFi examples, including AsyncUDP. Also with ETH examples. It was also tested for espressif#6610 test cases. Testing done for ESP32, ESP32-S2, ESP32-C3 and ESP32-S3. Related links fixes espressif#6610 fixes espressif#6247 fixes espressif#4732 Co-authored-by: Rodrigo Garcia <[email protected]> * Update README.md Co-authored-by: Rodrigo Garcia <[email protected]>
Board
Any (ESP32, ESP32S2, ESP32S3, ESP32C3)
Device Description
Any - it doesn't matter for the issue
Hardware Configuration
Any - it doesn't matter for the issue
Version
latest master (checkout manually)
IDE Name
Any - it doesn't matter for the issue
Operating System
Any - it doesn't matter for the issue
Flash frequency
80MHz
PSRAM enabled
no
Upload speed
115200
Description
It just need to be compiled and the error will be displayed.
Basically IPAddress INADDR_NONE declared in <IPAddress.h> is replaced by an integer due to any network usage in any Arduino sketch. This issue causes a compilation error.
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: