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

Ethernet usage #152

Open
infrafast opened this issue Jun 29, 2024 · 6 comments
Open

Ethernet usage #152

infrafast opened this issue Jun 29, 2024 · 6 comments

Comments

@infrafast
Copy link

Hello this library looks really good! My use case is that my esp device can connect the network via wifi OR ethernet, so my question is would that still works over ethernet (w5500 using ethernet.h) thanks!

@tobozo
Copy link
Collaborator

tobozo commented Jun 29, 2024

hi,

esp32FOTA uses the new NetworkClient from espressif when applicable (needs arduino-esp32 3.x.x), so as long as your ethernet library uses it and Network.begin() has been called, it should work

@infrafast
Copy link
Author

Very good thanks for your answer, I am using ethernet.h and therefore call Ethernet.begin() or WiFi.begin() depending if I detect eth HW or not but I will have a look to Network.begin as you mention and see if I can migrate

@infrafast
Copy link
Author

Hello, I gave it a try but can't compile. If I just add "chrisjoyce911/esp32FOTA" to my libs in platformIO, I get a full bunch of erros (see below)

my env is the following:

[env]
platform = espressif32@6.4.0 ; 3.20011.230801 (2.0.11)
board = seeed_xiao_esp32s3
framework = arduino

[{
"resource": "/c:/PlatformIO/esp32/.pio/libdeps/dev/esp32FOTA/src/esp32FOTA.cpp",
"owner": "cpp",
"severity": 8,
"message": "'_http' was not declared in this scope",
"startLineNumber": 366,
"startColumn": 5,
"endLineNumber": 366,
"endColumn": 5
},{
"resource": "/c:/PlatformIO/esp32/.pio/libdeps/dev/esp32FOTA/src/esp32FOTA.cpp",
"owner": "cpp",
"severity": 8,
"message": "'HTTPC_STRICT_FOLLOW_REDIRECTS' was not declared in this scope",
"startLineNumber": 366,
"startColumn": 30,
"endLineNumber": 366,
"endColumn": 30
},{
"resource": "/c:/PlatformIO/esp32/.pio/libdeps/dev/esp32FOTA/src/esp32FOTA.cpp",
"owner": "cpp",
"severity": 8,
"message": "'_http' was not declared in this scope",
"startLineNumber": 449,
"startColumn": 13,
"endLineNumber": 449,
"endColumn": 13
},

etc...

could you help?
Thank you

@tobozo
Copy link
Collaborator

tobozo commented Aug 19, 2024

hi,

the official platformio package doesn't seem to be maintained any more, please try with this platform version instead

[env]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.04/platform-espressif32.zip

@infrafast
Copy link
Author

Thank you Tobozo for the advise, I've tested but unfortunately it is not compatible either, generate a lot of compilaiton errors... I will further check if I can make this working and feedback here but it will take some time

@tobozo
Copy link
Collaborator

tobozo commented Sep 28, 2024

Sometimes platformio compilation errors can be caused (or be fixed by) tweaking lib_ldf_mode.
But more important is how esp32FOTA is included from your project. The fool-proof approach is to include every library in lib_deps from your main.cpp only.

If possible please share a platformio minimal project that reproduces these errors, I may be more helpful with that.

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

2 participants