3.1 KiB
HOWTO use custom build of rusEFI for CAN bus sniffing
In this HOWTO I will explain how to see raw CAN message flow with less than $30 in hardware & some free software.
Step 1: shopping cart
-
Get an STM32F4DISCOVERY micro-controller board - there are 'Order Now' buttons at the bottom of the official page.
-
Get an SN65HVD230 CAN Board
-
Get a "OBD2 16-Pin Male to Female Diagnostic Extension Cable" on eBay
-
Get a microUSB cable (one which comes with any Android phone)
Step 2: putting hardware together
Cut the OBD extension cord into two pieces, we would need the part with the male connector. Find the wires for pins #6 and #14
Run some wires from these pins to CANH (high) and CANL (low) screw terminals of the can module.
Here is how the end result should look like:
Ignore the white wire - we do not need it.
Run female-female jumper wires to connect TX on the CAN module with pin PB6 on the discovery board. RX on the module to pin PB12. GND to GND. +3v to +3v.
Hardware is ready!
Step 3: software
-
Download and install STSW-LINK004 STM32 ST-LINK utility
-
Firmware: download and unzip rusefi_can_sniffer.zip
-
Uploading the firmware: Connect stm32f4discovery to your laptop using a mini-USB cable (one should come with the board), install driver, start St-Link Utility.
click 'Target'>'Program...'
Point the utility to the rusefi_can_sniffer.hex file and hit 'Start'
Close ST Link Utility.
-
Now it's time to connect the micro USB cable. Keep miniUSB cable connected - you should have two USB cables connected. When you do this for the first time your Windows would prompt for drivers, you should download & install virtual COM driver
Once the driver is installed, you can verify serial connectivity by opening your Device Manager - we are expecting to see a Virtual COM Port.
Remember the number of the COM port.
-
Download and launch Putty telnet application.
Now connect the obd connector to your vehicle and you should see the CAN messages flowing in putty.