|
DeterministicESPAsyncWebServer v6.28.0
Zero-allocation, bounded-execution async HTTP server for ESP32
|
Wired field-bus listen-only capture (DETWS_ENABLE_BUS_CAPTURE) - passive CAN sniffing. More...
#include "ServerConfig.h"Go to the source code of this file.
Wired field-bus listen-only capture (DETWS_ENABLE_BUS_CAPTURE) - passive CAN sniffing.
The wired counterpart to the Wi-Fi promiscuous tap: put the CAN (TWAI) controller in listen-only mode - it receives and decodes every frame on the bus but never ACKs or transmits, so it is invisible to the other nodes - and hand each frame to a sink. Wire the sink into the forwarding plane (services/forward) to bridge captured CAN frames to another interface (e.g. stream them to a wired collector over Ethernet), exactly like the Wi-Fi capture path.
The pure piece is can_to_socketcan(): format a CanFrame as a 16-byte Linux SocketCAN frame, which with the libpcap DLT_CAN_SOCKETCAN link type (shared_primitives/pcap.h) is a capture Wireshark opens directly. The TWAI bring-up (driver/twai.h, listen-only) is ESP32 only and needs a CAN transceiver on the bus.
Definition in file bus_capture.h.