-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Compilation error when using PlatformIO and Ethernet.h #10760
Comments
You are using a library designed for Arduino/AVR. Use the native esp32 library |
@lbernstone this is the TinyGSM library's HttpClient example compilation error. what is your advice for that?
|
@JAndrassy The TinyGSM library needs to be adopted. Native SIM PPP support is integrated in espressif32 Arduino core. |
libs need to be updated for 3.1 |
but as @Jason2866 said. we now have native ppp support |
so now the esp32 Arduino team defines the Arduino API and all libraries should reflect the changes? |
we define additions as required. New gcc versions that come with IDF drive some of those changes. We also provide a way to detect the version and extend the classes only when necessary. We have extended many Arduino classes so far. Libs do not need to update, but they will be incompatible with newer versions of our core. Using old version is always an option |
Not enhancing the API would mean not fully supporting the new available features from new MCUs (like the C6 and P4). Not doing this would mean, people using Arduino couldn't use this new great features of this chips. Not the way development works. So yes espressif is doing enhancements when needed. Arduino enhancement is not a one way train. |
This statement that the arduino-libraries/Ethernet library is not compatible with ESP32 is very WRONG. Below is the proof that the arduino-libraries/Ethernet library IS compatible with ESP32:
With all this irrefutable evidence, I hope you (@lbernstone and @Jason2866 [reply]) stop claiming that the arduino-libraries/Ethernet library is not compatible with the ESP32, when in fact it IS COMPATIBLE with the ESP32. And about the ETH.h library, I already used this library a few days ago with ESP32 and W5500 and there were always random disconnections (triggering the |
I don't know what happened with the Client.h file (from the esp32 core), but according to @per1234 (arduino-libraries/Ethernet#277 (comment)) there seems to have been some mishap that causes the problem I'm facing. |
On my local machine I made the changes as per the pull request #3191 and it temporarily resolved the issue that I was facing. Changes made: arduino-libraries/Ethernet#277 (comment) |
@MicSG-dev Platformio docu is correct, since there last supported espressif32 Arduino core is v2.0.17. |
@MicSG-dev
It uses Arduino Core 2.0.17 the last supported version from Platformio. Don't know the reason why it does not work with this old core, it just shows the library never worked well with Arduino espressif32 |
Oh yes, thanks for the information. I just saw at https://github.com/platformio/platform-espressif32/releases/tag/v6.9.0 that
In my opinion this is not the fault of the Ethernet.h library. Where were the changes that broke Ethernet.h? I think it was in Client.h. This problem is caused by the ESP32 platform deviating from the standardized Arduino Client class API. |
@MicSG-dev Finally we agree the library is not compatible as we told. Since core 2.0.17 is outdated and out of support there will be no fix. For Arduino core 3.1.0 the currently only solution is to use the provided included as initially suggested. |
I understand that ETH.h is working. But I have already said that I will not use it for the reasons mentioned above. I prefer to use Ethernet.h. Thanks again for the suggestion. For now, to use Ethernet.h, I will continue to modify the package locally in the Client.h file (removing line 29 and line 31 ), I will continue to wait for the problem to be fixed in version 3.1.0 (or another future version) of Arduino Core ESP32. |
@Jason2866 I know the reason why it doesn't work in version 2.0.17. Read below: As I wrote above in #10760 (comment), the explanation is in the link arduino-libraries/Ethernet#277 (comment). See:
|
I also see as a solution to simply apply the fix as per pull request #3191 . |
what is the benefit for esp32 core adding virtual functions to Arduino's Client class? |
@JAndrassy try removing them and you will find out. I gave you a hint already (gcc) |
I don't get an error (with the BasicHttpClient.ino example). |
Board
ESP Dev Module
Device Description
Module on breadboard.
Hardware Configuration
Software problem.
There is no hardware as the problem is in the software.
Version
v3.1.0
IDE Name
VSCode PlatformIO
Operating System
Windows 11 Pro 23H2 - Compilation 22631.4037
Flash frequency
80MHz
PSRAM enabled
no
Upload speed
921600
Description
When using PlatformIO with the following platformio.ini file:
And running the WebServer example, several compilation errors occur.
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: