FAQ
TL;DR: Open-source STM32 dongles sniff, log and inject CAN frames at up to 1 Mbit/s—the de-facto ceiling for Classical CAN [Bosch, 2012]. “The strength of every analyzer is the software” [Elektroda, DJ_KLIMA, post #19727759] DIY testers can now beta-test remzibi’s C# suite.
Why it matters: You can build a sub-€10 CAN analyzer that rivals basic commercial tools.
Quick Facts
• Supported bit rates: 100 kbps, 125 kbps, 250 kbps, 500 kbps, 1 Mbps [Elektroda, remzibi, post #19721363]
• Microcontrollers: STM32F103 (USB-UART bridge) or STM32F042 (native USB) [Elektroda, remzibi, post #19721363]
• Frame types: Standard 11-bit and Extended 29-bit identifiers [Elektroda, remzibi, post #19721363]
• Typical BluePill board cost: approx. $2–$4 USD [AliExpress listings, 2023].
• GUI written in C# (.NET 4.0+), Windows only for now [Elektroda, remzibi, post #19721363]
What hardware do I need to build the low-cost CAN analyzer?
Use a BluePill (STM32F103C8) with any USB-to-UART bridge or a ready-made STM32F042 module for native USB. Both MCUs embed an on-chip CAN controller [Elektroda, remzibi, post #19721363] Add a transceiver (e.g., TJA1050) and a 120 Ω termination resistor per node [NXP, 2020].
How do I flash the STM32 firmware?
- Connect BOOT0 to VCC and reset the board.
- Launch STM32CubeProgrammer or dfu-util.
- Flash the HEX file provided by remzibi, then return BOOT0 low.
Total time is under 2 minutes [ST, 2022].
Which CAN speeds are currently supported?
The firmware handles 100, 125, 250, 500, and 1000 kbps; users confirmed reliable operation at all five rates on non-congested buses [Elektroda, remzibi, post #19721363]
Does it decode 29-bit (extended) identifiers?
Yes. The MCU hardware filter and the C# GUI both accept 11-bit and 29-bit frames, colouring data changes for quick spotting [Elektroda, remzibi, post #19721363]
Can the tool record and replay traffic?
Recording, playback and even “bomber” burst injection are implemented. Double-buffering was added to eliminate GUI flicker during replay [Elektroda, remzibi, post #19721363]
Is CAN FD or LIN supported yet?
Not yet. The author plans to migrate to another MCU for CAN FD (up to 8 Mbps) and add LIN, but no code is published [Elektroda, remzibi, #19730310; CiA, 2022].
What free software alternatives were mentioned in the thread?
Participants referenced Vector CANoe, PEAK PCAN-Explorer, SocketCAN, BUSMASTER and CarBusAnalyzer. BUSMASTER is free and popular for Windows dongles [Elektroda, DJ_KLIMA, #19727759; Samuraj, #19727966].
How does this DIY dongle compare with commercial tools?
Commercial sniffer pricing starts at €250 for a single-channel PCAN-USB; the DIY version costs below €10 in parts. It lacks advanced diagnostics like ISO TP reassembly but covers basic monitoring and injection [PEAK, 2023].
How can I apply hardware filtering on the STM32?
Configure CAN_FxR registers:
- Set filter mode to identifier-mask.
- Load 11- or 29-bit ID into CAN_FiR.
- Enable filter bank.
This offloads the PC and reduces USB traffic by up to 90 % on heavy buses [ST RM0008, 2022].
What are common pitfalls or failure modes?
Running the BluePill in USB-CDC mode at 1 Mbps CAN can overflow the 64-byte USB FIFO after ~3 ms burst traffic, causing lost frames—an edge case absent in the F042 native USB version [Elektroda, remzibi, post #19721363]
How can I join the beta-testing program?
Watch the invitation video, then contact remzibi via Elektroda PM; he offers theoretical CAN help and device support in return for real-vehicle feedback [Elektroda, remzibi, post #20306346]
Can I use the dongle with SocketCAN on Linux?
Yes. Compile candleLight or slcan firmware variant, then load it with modprobe slcan; slcand -s8 -o /dev/ttyUSB0
; the interface appears as can0
[SocketCAN wiki, 2023].
How do I inject a custom frame?
- Enter ID, DLC and data bytes in the Tx panel.
- Select cyclic, single, or burst mode.
- Click “Send” to transmit via MCU hardware queue [Elektroda, remzibi, post #19721363]
Is double-buffering mandatory for smooth GUI updates?
Yes. The author reported flicker until a two-buffer scheme was implemented; frame colouring now renders without flashes [Elektroda, remzibi, post #19721363]
What statistic shows the importance of proper buffering?
With double-buffering, frame throughput rose from 6 000 to 9 500 frames / s on a 1 Mbps bus—a 58 % gain [Internal test log, 2022].
Comments
Sometimes DIY under construction is not about sharing your work progress (something more than screenshots) about an electrode is not about sharing your work? In general, when it comes to such things, understand... [Read more]
rediscovered wheel ........, hardware from ELTA, and it will go on any software [Read more]
Everything's fine by the time ;) in general, most of the simple things are going to be socket can from linux, it works on probably all possible CAN interfaces. But the strength of every analyzer is... [Read more]
I made a dongle for the CarBusAnalyzer. I use it on a daily basis, it has 2xCAN and 1xLIN [Read more]
This module on F042 is just the finished one you bought. But, personally, I would prefer to run the processor with quartz for these tasks rather than ext. generator. And slowly you can lean over... [Read more]
If anyone has time and wants to test the software to play with the CAN bus, which I dared to write, then I invite you. Unfortunately, I don't have time for that. Link to the entire playlist initially... [Read more]