Search found 5 matches

by owenthewizard
Fri Apr 26, 2024 2:44 pm
Forum: ESP-IDF
Topic: ESP32 EMAC receive not working
Replies: 9
Views: 1501

Re: ESP32 EMAC receive not working

ESP_ondrej wrote:
Fri Apr 26, 2024 7:14 am
Why you don't want to use callback? Using `mac->receive` is not designed to be called from user code.
Because I only need to capture the first frame.
by owenthewizard
Thu Apr 25, 2024 4:59 pm
Forum: ESP-IDF
Topic: ESP32 EMAC receive not working
Replies: 9
Views: 1501

Re: ESP32 EMAC receive not working

It's pretty straight forward, just register your callback function to the Ethernet handler. See examples: https://github.com/espressif/esp-idf/blob/master/examples/network/simple_sniffer/main/cmd_sniffer.c#L300 https://github.com/espressif/esp-idf/blob/master/components/esp_eth/test_apps/main/esp_e...
by owenthewizard
Wed Apr 24, 2024 2:41 pm
Forum: ESP-IDF
Topic: ESP32 EMAC receive not working
Replies: 9
Views: 1501

Re: ESP32 EMAC receive not working

Hi, you are using the driver incorrectly. If your goal is to have your "custom" function to process received Ethernet frames, you need to register a call back function using `esp_eth_update_input_path`. Thank you for your time and attention! I am grateful. Would it be possible to document correct u...
by owenthewizard
Mon Apr 22, 2024 7:01 am
Forum: ESP-IDF
Topic: ESP32 EMAC receive not working
Replies: 9
Views: 1501

Re: ESP32 EMAC receive not working

Hello, I think the issue might be related to the buffer size you're providing. In your code, you're allocating a buffer with a fixed size of 1522 bytes using malloc(len). However, the len parameter should be initialized with the maximum buffer size you allocate and pass it to the mac.receive() func...
by owenthewizard
Fri Apr 19, 2024 8:42 pm
Forum: ESP-IDF
Topic: ESP32 EMAC receive not working
Replies: 9
Views: 1501

ESP32 EMAC receive not working

I'm trying to use the ESP32 Ethernet MAC receive function , but it always sets the buffer length to zero, and doesn't copy any data. I assume I'm using it incorrectly. Is there some documentation on how to use is it? #include <inttypes.h> #include "esp_event.h" #include "esp_log.h" #include "esp_eth...