Fixes Ethernet support in latest builds #2247
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
There was issues in the latest build not including the Ethernet support
The only IDF config that supported Ethernet correctly was the sdkconfig.default used by LILYGO build. The binutils.ESP32.cmake looked for specific patterns in sdkconfig to update Ethernet configuration.
This Ethernet config has been updated to include option of SPI EThernet controllers in a build.
The changed sdkconfig ethernet section has been copied to all available IDF configs so all build type can have the option of Ethernet ( Internal or SPI )
The TCP connects not working was caused by having the Wireless interface enabled. To make this simpler for builds with Ethernet interface included it will now disable wireless on first start when config built and saved.
The problems with DHCP were found to be caused by Network helper enabling DHCP at the same time DHCP was running in background. System.Net changed and updated to only Enable DHCP when not already enabled, which resolved problem.
As we now have option of supporting multiple PHY the NF_ESP32_Ethernet_Lan8720.cpp has been updated and renamed. Support included for more internal PHY types and the options of SPI controllers like WIZ5500.
These currently can only be enabled by changing options in esp32_ethernet_options.h.in but later we can enable it to be selected from build or dynamically from managed code. Out of scope for this PR. I don't currently have hardware to test it on. Have wiz5500 on order.
Motivation and Context
Had project that used Ethernet but didn't work with latest builds
also
How Has This Been Tested?
An updated version of sample Network client used. Sample has also be updated with latest Network Helper.
On the Olimex POE ISO board which has same config as LILYGO
Screenshots
Types of changes
Checklist: