This project was developed as part of a Master's subject in Computer Engineering and Networks (UPV, Valencia). It is based on the STM32H743ZI Nucleo microcontroller, which sniffs messages from a CAN (Controller Area Network) bus and transmits them over Ethernet. The captured data can be visualized in Wireshark using a custom plugin that has been written in C and compiled directly into the Wireshark source code.
- CAN Bus Sniffing: Captures CAN messages from a CAN network using the STM32H743ZI microcontroller.
- Ethernet Transmission: Sends the captured CAN data over Ethernet using the STM32’s built-in Ethernet interface.
- Wireshark Integration: A custom plugin written in C allows Wireshark to parse and display CAN packets received over Ethernet.
- STM32H743ZI Nucleo Board: Microcontroller board used for CAN sniffing and Ethernet transmission.
- CAN Transceiver: Connects the STM32H743ZI to the CAN bus network. Waveshare RS485 HAT has been used during development (https://www.waveshare.com/rs485-can-shield.htm).
- STM32CubeIDE: IDE for developing and flashing the firmware onto the STM32 board.
- STM32CubeMX: Tool for configuring the STM32 peripherals.
- Wireshark: Network protocol analyzer, with the custom C-based plugin for CAN packet decoding.
- Clone this repository and open the project in STM32CubeIDE.
- Connect the STM32H743ZI Nucleo board to your computer via USB.
- In STM32CubeMX, configure the following:
- CAN Peripheral: Ensure the CAN interface is set up to match your CAN network.
- Ethernet Peripheral: Configure the LwIP settings for data transmission over your network, address, mask and gateway.
- Build and flash the project to the STM32 board.
- Clone the Wireshark repository from Wireshark's official Git repository.
- Create plugin directory:
mkdir plugins/can
- Copy the custom plugin code from this repository to the new one.
- Add the new plugin entry in the Wireshark
CMakeLists.txt
file, located on the root of the wireshark directory. Look for the "set(PLUGIN_SRC_DIRS)" directive and add:plugins/can
- You can now filter by can_udp type whenever you receive the packets from the board.