-
Notifications
You must be signed in to change notification settings - Fork 34
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
[ETH RTL8201] Static IP stop working after update to 2024.5.0 #5798
Comments
I'm running into the same problem after updating to 2024.5.0 and I also use "clk_mode: GPIO0_IN". I have an esp32dev board running the esp32_ble_tracker component with the esp-idf framework and it uses an RTL8201F [M91CT21 GN07B]. It's a Gemmy "Orchestra of Lights" Smart Hub board with an RTL8201 and 25MHz crystal. I believe pin 12 is floating after checking with a magnifier but have not verified with an oscilloscope. ESPHome initializes and prints all of the normal component startup log messages to the serial port and the ethernet link comes up at 100Mbps, but then the ethernet component is returning an "insufficient TX buffer size" error and the esp32 does not respond to external connection attempts over the wired ethernet network.
|
I have:
It too has the link come up but does not respond to any connection on wired ethernet. And see this in log on serial port:
|
@heythisisnate can we upgrade from earlier version 2024.4.2 to 2024.5.1? Issue is fixed in current release? UPDATE. The same question to 2024.5.2. |
@console08 @matwho Do you know for sure if the board you are using has an external clock? you may try setting @kzajac83 the change I made in esphome/esphome#6704 is included in 2024.5 already. Its possible that this change caused problems on other boards with this RTL8201 chip. |
@kzajac83 have you been able to resolve this by changing clk_mode setting? If no, can you share a link to the schematic for your hardware? |
@heythisisnate This is PoE board with module CC1101 (868 MHz) and I placed it in very hard accessible place to the best received signals from antenna then if you can check without touching it then maybe help this links: https://www.lilygo.cc/products/t-eth-lite?variant=43120887038133 |
@kzajac83 will you please enable VERBOSE logging on the Ethernet component and look for two lines like this:
And please share them here. I am interested in the initial value of the register. |
Set to VERBOSE but cannot found what you asking in logs hence send all
|
This is compiled on 2024.4.2. The change was made on 2024.5.0. can you compile on 2024.5.x and provide the same log? |
Sorry but now cannot do then (maybe in weekend but not promise) because probably ETH communication will stop working and I will need use 5m ladder in a non-conformist place to catch the device and connect to USB port. Maybe @console08 @matwho can help and deliver the logs? |
I totally understand. |
I just purchased one Lilygo T-Eth-lite with RTL8201 from AliExpress. I will try to solve this problem after it arrives. It may be a couple weeks. Thanks for your patience. |
I think You have it in first post:
|
Ah yes you're right. I missed that. Ok the initial hardware default is the same in my hardware ... so I don't know yet what the problem is. I will troubleshoot more when I receive the Lilygo board. |
Setting
Full config:
However, there is a massive packet loss. Tested over ethernet.
|
Interesting. This is exactly the problem we had with the Konnected/wESP32 design that the change in esphome/esphome#6704 fixed. Once I get my hands on the Lilygo I will work on a solution that works for both designs. |
I have an "M" batch RTL8201F on all of my "Orchestra of Lights" Smart Hub boards and I'm seeing the same behavior as above with VERBOSE logging in "GPIO0_IN" mode on 2024.5.2:
No wired ethernet comms work at that point. Trying "GPIO0_OUT" mode (The RMII Mode Register does not get modified in this case) allows the wired connection to come up and get a DHCP lease as @egiljae noted, but pings show 85% packet loss. Yes, this board does have a 25MHz crystal and associated capacitors connected directly to pins 31/32 of the RTL8201F. |
Maybe it is perfect time to revert esphome/esphome#6704 ? |
I have both M and N revision, and I have tried various configurations. I see no difference in behavior between them, ie. no connection with The documentation for T-eth-lite mentions that the board uses IO0 as clock input. |
Ok I think the best approach here is to revert the change that automatically sets the register value, and instead add an option to set arbitrary register values in ESPHome configs at build time. For example:
This should make everyone happy and be compatible with the wide range of PHY configurations. I'm away from work this weekend (it's a holiday weekend now in the U.S.) but I will work on it when I'm back next week. Sorry for any headache caused! |
I've just opened a PR esphome/esphome#6836 that reverts the previous change that automatically sets the PHY register values and adds new config options to arbitrarily set PHY registers as needed. This is better because we don't make assumptions about your hardware configuration and allow full flexibility for firmware developers to tweak register settings very easily. |
The problem
After toady (15.05.2024) update ESPHome to 2024.5.0 static IP configuration stop working and switch into DHCP for ethernet module RTL8201.
Which version of ESPHome has the issue?
2024.5.0
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
2024.5.3
What platform are you using?
ESP32
Board
ESP32DEV lilygo-eth
Component causing the issue
etherent
Example YAML snippet
Anything in the logs that might be useful for us?
After connect serial adapter (without PoE eth) got: ▒▒▒▒▒▒ets Jul 29 2019 12:21:46 rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0030,len:1184 load:0x40078000,len:13132 load:0x40080400,len:3036 entry 0x400805e4 [ 8][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, A PB: 80000000 Hz [ 456][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled [I][logger:156]: Log initialized [C][ota:483]: There have been 1 suspected unsuccessful boot attempts. [D][esp32.preferences:114]: Saving 1 preferences to flash... [V][esp32.preferences:126]: sync: key: 233825507, len: 4 [D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed [I][app:029]: Running through setup()... [V][app:030]: Sorting components by setup priority... [C][ethernet:034]: Setting up Ethernet... [V][ethernet:617]: Hardware default RTL8201 RMII Mode Register is: 0x0FFA [V][ethernet:624]: Setting RTL8201 RMII Mode Register to: 0x1FFA [V][ethernet:376][sys_evt]: [Ethernet event] ETH started (num=0) [V][ethernet:433]: DHCP Client Status: 0 [W][ethernet:241]: Connecting via ethernet failed! Re-connecting... [V][ethernet:433]: DHCP Client Status: 2 [W][ethernet:241]: Connecting via ethernet failed! Re-connecting... [V][ethernet:433]: DHCP Client Status: 2 [W][ethernet:241]: Connecting via ethernet failed! Re-connecting... [V][ethernet:433]: DHCP Client Status: 2 [W][ethernet:241]: Connecting via ethernet failed! Re-connecting... [V][ethernet:433]: DHCP Client Status: 2 [W][ethernet:241]: Connecting via ethernet failed! Re-connecting... [V][ethernet:433]: DHCP Client Status: 2 [W][ethernet:241]: Connecting via ethernet failed! Re-connecting... [V][ethernet:433]: DHCP Client Status: 2 [W][ethernet:241]: Connecting via ethernet failed! Re-connecting... [V][ethernet:433]: DHCP Client Status: 2 [W][ethernet:241]: Connecting via ethernet failed! Re-connecting... [V][ethernet:433]: DHCP Client Status: 2 [W][ethernet:241]: Connecting via ethernet failed! Re-connecting... [V][ethernet:433]: DHCP Client Status: 2 [W][ethernet:241]: Connecting via ethernet failed! Re-connecting... [V][ethernet:433]: DHCP Client Status: 2 [...] should not be DHCP but static IP 192.168.15.25.
Additional information
Can be connected with:
Add PHY register writes to enable external clock on Ethernet with RTL8201 #6704 therefore call @jesserockz to confirm or deny.
UPDATE: After connect to PoE/Ethernet
General ETH RTL8201 stop working after the update.
Back to v2024.4.2 where working fine eth.
The text was updated successfully, but these errors were encountered: