ESP32-GATEWAY-EA-IND rev I ESP-IDF eth example

Started by driesvdb, July 16, 2025, 01:28:35 PM

Previous topic - Next topic

driesvdb

Hello

I am looking for some help porting the example on the github of olimex for ESP-IDF for an ethernet connection to the esp version v5.4.2. A lot of changes have happen sinds the release of the olimex example. I am starting from a basic ethernet example from version v5.4.2 and changing the configuration to set the correct pins and the other configuration. I have changed nothing for the code i just altered the configuration.
Currently the code seems to stop at the folowing code in ethernet_init.c
ESP_GOTO_ON_FALSE(esp_eth_driver_install(&config, &eth_handle) == ESP_OK, NULL,
                        err, TAG, "Ethernet driver install failed");
Before this i can log after this i can not see a log not even an error log.
Does anybody see the problem in my configuration.
For the start of the example i selected:
Target: esp32
Board: esp32-wrover-kit 3.3v
Here is my sdkconfig:

#
# Serial flasher config
#
# CONFIG_ESPTOOLPY_NO_STUB is not set
CONFIG_ESPTOOLPY_FLASHMODE_DIO=y
CONFIG_ESPTOOLPY_FLASH_SAMPLE_MODE_STR=y
CONFIG_ESPTOOLPY_FLASHMODE="dio"
CONFIG_ESPTOOLPY_FLASHFREQ_40M=y
CONFIG_ESPTOOLPY_FLASHFREQ="40m"
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
CONFIG_ESPTOOLPY_HEADER_FLASHSIZE_UPDATE=y
CONFIG_ESPTOOLPY_BEFORE_RESET=y
CONFIG_ESPTOOLPY_BEFORE="default_reset"
CONFIG_ESPTOOLPY_AFTER_RESET=y
CONFIG_ESPTOOLPY_AFTER="hard_reset"
CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
# end of Serial flasher config

#
# Partition Table
#
CONFIG_PARTITION_TABLE_SINGLE_APP=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv"
CONFIG_PARTITION_TABLE_OFFSET=0x10000
CONFIG_PARTITION_TABLE_MD5=y
# end of Partition Table


#
# Example Ethernet Configuration
#
CONFIG_ENV_GPIO_RANGE_MIN=0
CONFIG_ENV_GPIO_RANGE_MAX=39
CONFIG_ENV_GPIO_IN_RANGE_MAX=39
CONFIG_ENV_GPIO_OUT_RANGE_MAX=33
CONFIG_EXAMPLE_USE_INTERNAL_ETHERNET=y
CONFIG_EXAMPLE_ETH_PHY_LAN87XX=y
CONFIG_EXAMPLE_ETH_MDC_GPIO=23
CONFIG_EXAMPLE_ETH_MDIO_GPIO=18
CONFIG_EXAMPLE_ETH_PHY_RST_GPIO=1
CONFIG_EXAMPLE_ETH_PHY_ADDR=0
# end of Example Ethernet Configuration



LubOlimex

ESP32-GATEWAY doesn't use WROVER chip, so it is not good idea to use "esp32-wrover-kit 3.3v" config as basis. Use some config with WROOM chip for basis.

About the config, MDC and MDIO are ok but reset pin should be either GPIO5 (it is connected to a transistor that toggles the PHY power) or set it to -1. Try with either:

CONFIG_EXAMPLE_ETH_PHY_RST_GPIO=5

or

CONFIG_EXAMPLE_ETH_PHY_RST_GPIO=-1
Technical support and documentation manager at Olimex

driesvdb

Oke thanks i set the CONFIG_EXAMPLE_ETH_PHY_RST_GPIO=1 because it was set like that in the olimex example config.
But changing it to CONFIG_EXAMPLE_ETH_PHY_RST_GPIO=5 fixed the problem.
Thanks

LubOlimex

Glad it is now working. Can you point me which Olimex demo exactly did you use? Link to the GitHub repo will help me fix it. Thank you.
Technical support and documentation manager at Olimex

driesvdb

Hello
I was using the ESP32_Gateway_Ethernet_v4.0 example config.
And for esp-idf the ethernet basic example for the v5.4.2.
https://github.com/espressif/esp-idf/blob/master/examples/ethernet/basic/README.md
I adjusted the config of this example to get it to work.
Then i changed the example code to use a tcp client connection.
Now i am trying to figure out how to advertise on bluetooth without success so far.
The device is not visible on nrf connect