Callback on packets received over ethernet on ESP32C6
Posted: Fri May 17, 2024 9:41 am
I am working on a project with the aim of testing that the ESP32C6 devices that are manufactured can send and receive packets both by wifi and by ethernet. For this, I am going to have a fixed device that will be the Tester and the other device will be the DUT (Device Under Test), one of the devices that are manufactured to test. I am doing tests with two ESP32C6 that I have available.
I managed to do the wifi test but I encountered a problem with the ethernet one. Both devices have a transparent ethernet bridge between eth1 and eth2. What I do is connect the Tester eth1 with the DUT eth1 using a crossover ethernet cable and the Tester eth2 with DUT 2 eth2 using another crossover ethernet cable.
I send a packet from the Tester using the “esp_eth_transmit” function and I see through Wireshark that the packet continuously travels through the two devices (the transparent bridge is doing it correctly and I am creating an ethernet loop).
Is it possible to somehow make an ethernet callback to be able to see the packets that I am receiving and thus not need the Wireshark and be able to act so that when the Tester has received 10 packets, the communication is cut off and stops sending?
I managed to do the wifi test but I encountered a problem with the ethernet one. Both devices have a transparent ethernet bridge between eth1 and eth2. What I do is connect the Tester eth1 with the DUT eth1 using a crossover ethernet cable and the Tester eth2 with DUT 2 eth2 using another crossover ethernet cable.
I send a packet from the Tester using the “esp_eth_transmit” function and I see through Wireshark that the packet continuously travels through the two devices (the transparent bridge is doing it correctly and I am creating an ethernet loop).
Is it possible to somehow make an ethernet callback to be able to see the packets that I am receiving and thus not need the Wireshark and be able to act so that when the Tester has received 10 packets, the communication is cut off and stops sending?