Skip to content
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

ESP32 with W5500 and platform 3 compille error #45

Open
proasnet opened this issue Jul 4, 2024 · 7 comments
Open

ESP32 with W5500 and platform 3 compille error #45

proasnet opened this issue Jul 4, 2024 · 7 comments

Comments

@proasnet
Copy link

proasnet commented Jul 4, 2024

ESP32 with connected W5500 ethernet adapter, esp platform 3 compille error

C:\Users\j.jirutka\Documents\Arduino\libraries\WireGuard-ESP32\src\wireguardif.c:51:10: fatal error: tcpip_adapter.h: No such file or directory
   51 | #include "tcpip_adapter.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
@alfersi
Copy link

alfersi commented Jul 20, 2024

I had the exact same issue, the only way to get it to compile is switching to a platform version <3.0.0, the reason being that version 3.0.0 and higher doesn't include the TCP/IP Adapter library anymore, having been deprecated in favour of ESP NETIF. I understand that for this library to work with ESP NETIF it would require a complete review a rewrite following the migration guide, however I don't know if there's a fork that already includes these changes or if anyone is willing to do it. My suggestion would be to use platformIO where you can specifify the platform version, and hence the ESP-IDF version, in this case Arduino ESP32 version 2.0.17 uses ESP-IDF v4.4.7, in platformIO you can specify:

[env:my-esp32] platform = espressif32 @ 5.4.0

which uses ESP-IDF v4.4.3 and should compile nicely, I've tested it and it does work, whilst I was unable to compile in Arduino IDE unless I downgraded ESP32 platform to 2.0.17. Then I went on and tested with platform 6.7.0, which is the latest, and it does indeed work. It's known that Arduino IDE and Arduino framework inside platwormIO diverge substantially, so this must be one of those cases. At any rate I've always found PIO better for developing.

@nmingotti
Copy link

nmingotti commented Aug 10, 2024

a pity, if anybody is willing to fork/adapt the software to make it compile and work again in the Arduino IDE (Linux) for Heltec Wifi Kit 32(V3) (which i use most recently) will be ready to give and hand financially say 100€.

@martinusGH
Copy link

I had the same issue when migrating from Arduino 2.x to 3.0.7. I managed to patch the source code myself and it worked again until I upgraded to Arduino 3.1.0. Broken again, again several hours of debugging, but managed to fix it again. Needs a lot of Mutexes wrapped around many calls to net_if.
Unfortunately this library seems to be abandoned as it has not seen any updates for three years.

@alpintrekker
Copy link

@martinusGH would you mind to share your results, maybe in a forked repository?

@martinusGH
Copy link

I've trashed my github development setup a few years ago, and not really planning to restart that. I can try to add the two patched files in here, hope you are able to use those into a working solution. My skills seemed sufficient to make this library work again, but really someone with deep knowledge on ESP32-IDF based networking should try to take over the maintenance of this library.
WireGuard.zip

@alpintrekker
Copy link

alpintrekker commented Jan 10, 2025

Thank you very much @martinusGH for sharing your work!

However, the supplied archive seems to miss an updated version of WireGuard-ESP32.h, if am I not getting wrong the following error messages:

/home/bandi/Arduino/libraries/WireGuard-ESP32/src/WireGuard.cpp:44:6: error: no declaration matches 'bool WireGuard::begin(const IPAddress&, const IPAddress&, const IPAddress&, const char*, const char*, const char*, uint16_t)' 44 | bool WireGuard::begin(const IPAddress& localIP, const IPAddress& Subnet, const IPAddress& Gateway, const char* privateKey, const char* remotePeerAddress, const char* remotePeerPublicKey, uint16_t remotePeerPort) { | ^~~~~~~~~ In file included from /home/bandi/Arduino/libraries/WireGuard-ESP32/src/WireGuard.cpp:6: /home/bandi/Arduino/libraries/WireGuard-ESP32/src/WireGuard-ESP32.h:13:10: note: candidate is: 'bool WireGuard::begin(const IPAddress&, const char*, const char*, const char*, uint16_t)' 13 | bool begin(const IPAddress& localIP, const char* privateKey, const char* remotePeerAddress, const char* remotePeerPublicKey, uint16_t remotePeerPort);

I tried to compile the WireGuard-ESP32 v0.1.5 with your patched files on esp32 3.0.7, 3.1.0 and 3.1.1 with similar results.
I'd appreciate any advice, bests

@martinusGH
Copy link

I cannot remember changing that file, but let me just upload the entire library that I have now
WireGuard-ESP32.zip
I double checked with the provided sample from the library "disconnect", compiles without issues on my end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants