-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Compile error for ESP32 C3- based boards #1164
Comments
I got the same error that relates to ESP32-C3 only. /Users/user/Documents/Arduino/libraries/ESPAsyncWebServer/src/AsyncWebSocket.cpp: In member function 'IPAddress AsyncWebSocketClient::remoteIP()': Using library AsyncTCP at version 1.1.1 in folder: /Users/user/Documents/Arduino/libraries/AsyncTCP |
At last, I found the following work around: edit libraries\ESPAsyncWebServer-master\src\AsyncWebSocket.cpp to replace “return IPAddress(0U)” by “return IPAddress(0ul)” or “return IPAddress((uin32_t) 0u)” |
@jnule1a You rock! I am not using WebSockets and changed the line as you said to return IPAddress ((uint32_t) OU), and the compiler took it. :) |
Typo in jnule1a's very helpful answer: return IPAddress((uin32_t) 0u) should be return IPAddress((uint32_t) 0u) Notice the little t added Thanks jnule1a! |
it looks like this library is not maintained anymore ;-( I have the same error but thanks to you guys I solved it ;-) |
i was working on Esp32-c3 module from speed studio. with esp_dash getting same error. after editing #include <WiFi.h> Adafruit_AHTX0 aht; Ticker periodicTicker; Card card1(&dashboard, TEMPERATURE_CARD, "Temperature", "°C"); void updateCards() { void setup() { |
pump |
I had to use return IPAddress((uint32_t) 0K) |
This fixed it for me. |
Great! The Answer from jnule1a was also the solution for me! |
Since that line (832) is meant to return a 0.0.0.0 IP Address if no client is present (I think) besides @jnule1a solution, a IPAddress(0,0,0,0) also works. |
@jnule1a, your solution worked like a charm! Thanks a lot! =) |
Good afternoon . |
You might try the suggestion from tahunus - just use
IP Address(0,0,0,0)
…On Fri, Dec 29, 2023, 9:22 AM Ramon ***@***.***> wrote:
Good afternoon .
I have modified the AsyncWebSocket.ccp library by replacing return IP
Address((uin t 32_t) 0u); and continues with the error in any program that
refers to <ESPAsyncWebServer.h>
any more ideas??
Thank you so much
—
Reply to this email directly, view it on GitHub
<#1164 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A6RMKBESC66WWDWWHL3OEELYL3U57AVCNFSM5XJX5HFKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBXGIZDAMBUG43Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Good morning. //return IPAddress(0U); original |
During compilation for ESP32 C3-based boards (ESP32C3, Adafruit QT Py ESP32-C3, M5Stack Stamp C3) , the following error is displayed:
C:\Users\toto\Documents\Arduino\libraries\ESPAsyncWebServer-master\src\AsyncWebSocket.cpp: In member function 'IPAddress AsyncWebSocketClient::remoteIP()':
C:\Users\toto\Documents\Arduino\libraries\ESPAsyncWebServer-master\src\AsyncWebSocket.cpp:832:28: error: call of overloaded 'IPAddress(unsigned int)' is ambiguous
return IPAddress(0U);
^
In file included from C:\Users\toto\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\cores\esp32/Arduino.h:163,
from C:\Users\toto\Documents\Arduino\libraries\ESPAsyncWebServer-master\src\AsyncWebSocket.cpp:21:
C:\Users\toto\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\cores\esp32/IPAddress.h:51:5: note: candidate: 'IPAddress::IPAddress(const uint8_t*)'
IPAddress(const uint8_t *address);
^~~~~~~~~
C:\Users\toto\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\cores\esp32/IPAddress.h:50:5: note: candidate: 'IPAddress::IPAddress(uint32_t)'
IPAddress(uint32_t address);
^~~~~~~~~
C:\Users\toto\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\cores\esp32/IPAddress.h:29:7: note: candidate: 'constexpr IPAddress::IPAddress(const IPAddress&)'
class IPAddress: public Printable
^~~~~~~~~
Multiple libraries were found for "WiFi.h"
Used: C:\Users\toto\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\libraries\WiFi
Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
Test conditions:
#include <Arduino.h>
#include <WiFi.h>
#include <AsyncTCP.h>
#include <ESPAsyncWebServer.h>
const char* ssid = "nhatoi";
const char* password = "wifi-1nhatoi";
AsyncWebServer server(80);
void setup(void) {
}
void loop(void) {
}
The text was updated successfully, but these errors were encountered: