Open NonaSuomy opened 7 months ago
Could it be a problem with your use of DuPont cables
Same wires above worked fine on the Arduino test above. I even attached longer ones to the ones I was using for the S3 to swap from female to male and it worked just fine. Went from 10CM female to female ones, attached to those another 20CM male to male, Is the S3 more sensitive?
Just to show it's not the wires I custom handmade my own 70mm dupont wires, still same issue.
Note: The PoE splitter is not plugged in fo this test.
[V][esp32.preferences:059]: nvs_get_blob('233825507'): ESP_ERR_NVS_NOT_FOUND - the key might not be set yet
[C][ota:483]: There have been 0 suspected unsuccessful boot attempts.
[VV][esp32.preferences:040]: s_pending_save: key: 233825507, len: 4
[D][esp32.preferences:114]: Saving 1 preferences to flash...
[VV][esp32.preferences:123]: Checking if NVS data 233825507 has changed
[V][esp32.preferences:163]: nvs_get_blob('233825507'): ESP_ERR_NVS_NOT_FOUND - the key might not be set yet
[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...
[VV][scheduler:063]: set_interval(name='', interval=60000, offset=15372)
[VV][scheduler:063]: set_interval(name='update', interval=60000, offset=29769)
[D][binary_sensor:034]: 'Status': Sending initial state OFF
[C][ethernet:034]: Setting up Ethernet...
[VV][esp-idf:000]: I (483) w5500.mac: version=0
[VV][esp-idf:000]: I (495) system_api: Base MAC address is not set
[VV][esp-idf:000]: I (496) system_api: read default base MAC address from EFUSE
[VV][esp-idf:000]: I (498) esp_eth.netif.netif_glue: 3c:84:27:c7:14:9b
[VV][esp-idf:000]: I (499) esp_eth.netif.netif_glue: ethernet attached to netif
[V][ethernet:367]: [Ethernet event] ETH started (num=0)
[W][ethernet:237]: Connecting via ethernet failed! Re-connecting...
[V][ethernet:424]: DHCP Client Status: 0
[VV][scheduler:226]: Running interval 'update' with interval=60000 last_execution=4294938004 (now=30708)
[V][sensor:043]: '_Uptime': Received new state 30.709000
[D][sensor:094]: '_Uptime': Sending state 30.70900 s with 0 decimals of accuracy
[W][ethernet:237]: Connecting via ethernet failed! Re-connecting...
[V][ethernet:424]: DHCP Client Status: 0
[VV][scheduler:226]: Running interval '' with interval=60000 last_execution=4294952400 (now=45104)
[W][ethernet:237]: Connecting via ethernet failed! Re-connecting...
[V][ethernet:424]: DHCP Client Status: 0
[W][ethernet:237]: Connecting via ethernet failed! Re-connecting...
[V][ethernet:424]: DHCP Client Status: 0
[W][ethernet:237]: Connecting via ethernet failed! Re-connecting...
[V][ethernet:424]: DHCP Client Status: 0
Plug in the network cable:
[VV][esp-idf:000]: E (84971) w5500.mac: w5500_send_command(123): send command timeout
[VV][esp-idf:000]: E (84972) w5500.mac: emac_w5500_start(279): issue OPEN command failed
[VV][esp-idf:000]: E (84973) w5500.mac: emac_w5500_set_link(422): w5500 start failed
[VV][esp-idf:000]: E (84974) esp_eth: eth_on_state_changed(121): ethernet mac set link failed
[VV][esp-idf:000]: E (84975) w5500.phy: w5500_update_link_duplex_speed(84): change link failed
[VV][esp-idf:000]: E (84976) w5500.phy: w5500_get_link(108): update link duplex speed failed
[VV][scheduler:226]: Running interval 'update' with interval=60000 last_execution=30708 (now=90708)
[V][sensor:043]: '_Uptime': Received new state 90.709000
[D][sensor:094]: '_Uptime': Sending state 90.70900 s with 0 decimals of accuracy
[W][ethernet:237]: Connecting via ethernet failed! Re-connecting...
[V][ethernet:424]: DHCP Client Status: 0
[VV][scheduler:226]: Running interval '' with interval=60000 last_execution=45104 (now=105104)
[W][ethernet:237]: Connecting via ethernet failed! Re-connecting...
[V][ethernet:424]: DHCP Client Status: 0
Doing a reset I see this not sure if it's something?
[I][ethernet:220]: Starting ethernet connection
[W][ethernet:152]: Warning set: unspecified
I think it has something to do with trying to use GPIO09 as the CS Pin or just generally using some of the FSPI pins in the wrong configuration. Need to further test.
I switched to using the UART0 and JTAG pins which were not in use and the interface came up.
clk_pin: GPIO42 # MTMS
mosi_pin: GPIO44 # U0RXD
miso_pin: GPIO40 # MTDO
cs_pin: GPIO39 # MTCK
interrupt_pin: GPIO41 # MTDI
reset_pin: GPIO43 # U0TXD
Maybe it has something to do with this but I am setting DIO mode above
Most ESP32-S3 modules use qio, but are also dual I/O.
In qio mode, two additional GPIOs (9 and 10) are used for SPI flash communications. If flash mode is set to dio then these pins are available for other purposes.
~If switched all the pins to this layout would probably fix it as well:~
Note: Did further testing the only way to get it working was to not use GPIO13/11 not sure why? Swapped them to multiple other pins with no issues.
ethernet:
type: W5500
clk_pin: GPIO12
mosi_pin: GPIO13
miso_pin: GPIO11
cs_pin: GPIO10
interrupt_pin: GPIO14
reset_pin: GPIO09
With S3 N4R2 I had same issue. In tasmota it works fine (4 pins).
It's interrupt_pin mandatory?
I'm having a similar problem.
The problem
Trying to connect ESP32-S3-N16R8 to a W5500 Lite module (USR-ES1) also tried a full-sized W5500 also had the same issue just DHCP looking for an address over and over again.
Tried to set manual IP and got error 2 instead of 0
Tried different pins listed in the pull request still no go
https://github.com/esphome/esphome/pull/4424
Tried Arduino IDE on the board seems to have a different issue:
Which, some said it was because some module takes too long and require a 10ms delay after reset. It seems a few fixes went in for this but not sure if that meshes with esphome. https://github.com/espressif/esp-idf/pull/11337/commits/177f70c056e87b48117646e79b7eca8d920cfd4d https://github.com/espressif/esp-idf/issues/11331
Tried to do a TCPDUMP but it never requested for DHCP on the network.
sudo tcpdump -v -i any port 67 or port 68 -e -n -vv
Tested plugging in a laptop to the that port and it tossed up the dhcp of that unit in the dumpGuessing because the w5500 module never fully comes up to make the DHCP request.
Tried changing the clock from 30 default to 25,20,16,10MHz.
Which version of ESPHome has the issue?
2024.3.2
What type of installation are you using?
Docker
Which version of Home Assistant has the issue?
Issue with ESPHome not HA
What platform are you using?
ESP32-IDF
Board
ESP32-S3-N16R8 https://www.aliexpress.com/item/1005006266375800.html
W5500 https://www.aliexpress.com/item/1005006246720540.html
Component causing the issue
Ethernet/W5500
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
Tested both modules on an Arduino Uno and both worked fine like so: