-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
wESP32 V7 Ethernet driver not working #3057
Comments
Board maker uses the RTL8201 on v7 boards. Previous boards used the LAN8720. |
Only LAN8720 is supported by WLED ATM. |
Until this change can be implemented, I'd propose changing the "WESP32" label in the Ethernet type pull down menu to "WESP32 (Rev 6 and Lower)." To get my Rev 7 WESP32 boards to work, I added an experimental "esp32_V4_eth" build environment to my local platformio.ini. This pulls in the ESP32 IDF version 4 which supports the RTL8201 Ethernet PHY. I then changed the PHY type for the WESP32 from ETH_PHY_LAN8720 to ETH_PHY_RTL8201 in network.cpp. This worked. This is the esp32_V4_eth that I came up with and tested on my WESP32 Rev 7 board. There's some unfortunate copy / paste oversights in there. Also, if WLED moves to V4 of the IDF at some point, I'd add "WESP32 (Rev 6 and Lower)" and "WESP32 (Rev 7)" to the Wi-Fi settings page.
I'm going to grab another WESP32 pixel controller of mine and run some experiments to try to come up with a smaller / more accurate esp32_V4_eth environment section. I'm not familiar enough with the WLED development effort to know if a move to V4 is in the works or won't happen. If there's interest in this, I can create a branch, add these changes, and create a pull request. |
Hi @bikerglen thanks for your research and recommendations 👍
Actually, both is true. We have all the changes to use the newer framework (necessary any way for -S3/-S2/-C3), however currently we see only little benefits for esp32. In fact the firmware size of V4 grows by 300KB, compared to the older framework. This would make it hard for people who want a few usermods, as the overall firmware will become too big to fit into 4MB boards with standard partitions.
The modified ethernet driver would be interesting indeed. Its necessary to still allow building with the "standard" framework, so any special "V4" code needs to be encapsulated with #if defined(ARDUINO_ARCH_ESP32) && (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 4, 0))
// code that relies on features od ESP-IDF 4.4.x
#endif |
Thanks for the info, Frank. If I'm following the HTML/Javascript/XML code correctly, I think I can do something in this code in xml.cpp to show or enable the WESP32 (Rev 7 and higher) option when the ESP IDF version is >= 4:
I'd start with the WESP32 Rev 7+ drop down menu item in the id=ethd division hidden or disabled, then add some code in xml.cpp that detects a build with ESP32 IDF V4 or greater and does an oappend to show or enable the option. Or vice versa. I know that's not too specific. It's been a decade since I've done any html or javascript coding but I can figure it out. Just want to make sure I'm on the right path to having html in the wifi settings page that can vary with compile time options. -Glen |
Hey everyone I have been able to recompile with the modifications located here https://wled.discourse.group/t/wesp32-revision-7-eth-phy-rtl8201-support/6558/3 I have installed it onto one of my WESP32's after compiling and verified that it does connect and can use ethernet. |
@softhack007 I have this working. I'm going to go read the WLED pull request instructions again and so some more testing. If the old esp32_eth environment is selected, the option is not shown in the wifi settings page. If the new esp32_V4_eth environment is selected, the option is shown and a WESP32 r7+ board can be selected and will connect to a wired Ethernet network. I don't have any r6 or earlier boards to test on unfortunately. The exact language on the wifi settings page for the two options is: WESP32 (Rev 6 and earlier) |
@softhack007 I'm not quite ready to create the pull request (needs more testing) but if you want to take a look around, here's the branch on my fork: https://github.com/bikerglen/WLED/tree/add-wesp32-r7-support |
It is much easier for us if you create a PR as it can be checked out locally without cloning your repository. It will also show diff. |
@blazoncek PR #3444 created. Really wishing I hadn't created PR #3421 on my main now. :) Learning new stuff every day. |
What happened?
The Ethernet is not functioning and has no connection.
To Reproduce Bug
Load WLED on the most recent version of the wESP32.
Expected Behavior
When turning on Ethernet in WiFi settings for ethernet to get an IP from the DHCP server and be available to use.
Install Method
Binary from WLED.me
What version of WLED?
WLED 0.14.0 -b1
Which microcontroller/board are you seeing the problem on?
ESP32
Relevant log/trace output
No response
Anything else?
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: