ESP32-EVB rev D: weird behavior with esp-idf ethernet example

Started by Casper, March 19, 2019, 10:50:36 AM

Previous topic - Next topic

Casper

Hello,

I just started playing with the ESP32, more specifically, the ESP32-EVB revision D board from Olimex. The "get-started" examples from esp-idf worked fine. Then I moved on to the "ethernet" example. There I ran into problems. The device is unable to obtain an IP using DHCP (related posts on this topic exist). With a small change, which should not change a thing in my opinion, the example starts working. Kind of.

The only change made in order to get it kind of working is to put two printf statements towards the end of app_main() function as shown below:


if(ret == ESP_OK) {
esp_eth_enable();
printf("Ethernet initialized.");
printf("Starting eth_task.");
xTaskCreate(eth_task, "eth_task", 2048, NULL, (tskIDLE_PRIORITY + 2), NULL);
}


Note that if adding a new line sequence at the end of each of the printf strings, I'm back at example not working, i.e., device not being able to obtain an IP address. So this:

if(ret == ESP_OK) {
esp_eth_enable();
printf("Ethernet initialized.\n");
printf("Starting eth_task.\n");
xTaskCreate(eth_task, "eth_task", 2048, NULL, (tskIDLE_PRIORITY + 2), NULL);
}

breaks it again.

Three files I deem relevant to this issue can be fetched from here: https://we.tl/t-QpZrVJXPER. Files description:
(1) "sdkconfig": Example configuration.
(2) "Ethernet-example_fail_monitor-out.txt": make monitor output when running the example as is.
(3) "Ethernet-example_success_monitor-out.txt": make monitor output when making the mentioned change (described above).

Does anyone have any idea what could be the problem here?

p.s.: The ETH_PHY_demo from Olimex' GitHub repo works fine as far as I can tell. I haven't started investigating the differences between the esp-idf ethernet example and ETH_PHY_demo yet. If anyone has a quick answer as to which critical changes were made to get Ethernet working reliably and why the esp-idf example has problems, I would kindly ask for a newbie-friendly explanation.

Thanks.

Casper

Hello again,

I guess no one has any input on this. Since the wetransfer link from my original post already expired, I'll give it one more go and then conclude that I'll simply have to use Olimex's example as a baseline project when developing with wired Ethernet.
Anyway, here's the link to the relevant files mentioned in my original post: https://we.tl/t-0rHe9wGfX7
I'll still appreciate any input.
(By the way, is there a more elgant way than using wetransfer? I see no attach option when posting a reply or making a new thread.)

Thanks.