Because I only need to capture the first frame.ESP_ondrej wrote: ↑Fri Apr 26, 2024 7:14 amWhy you don't want to use callback? Using `mac->receive` is not designed to be called from user code.
Search found 5 matches
- Fri Apr 26, 2024 2:44 pm
- Forum: ESP-IDF
- Topic: ESP32 EMAC receive not working
- Replies: 9
- Views: 2441
Re: ESP32 EMAC receive not working
- Thu Apr 25, 2024 4:59 pm
- Forum: ESP-IDF
- Topic: ESP32 EMAC receive not working
- Replies: 9
- Views: 2441
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...
- Wed Apr 24, 2024 2:41 pm
- Forum: ESP-IDF
- Topic: ESP32 EMAC receive not working
- Replies: 9
- Views: 2441
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...
- Mon Apr 22, 2024 7:01 am
- Forum: ESP-IDF
- Topic: ESP32 EMAC receive not working
- Replies: 9
- Views: 2441
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...
- Fri Apr 19, 2024 8:42 pm
- Forum: ESP-IDF
- Topic: ESP32 EMAC receive not working
- Replies: 9
- Views: 2441
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...