Our VIP Package gets you every single course at 80% off the individual price. For a limited time, save an additional $100 with coupon code 100VIP. Learn more

CAN Bus Communications Decoded: Common interface / debugging tools, DBC Files

Watch This Course

$199.00 USD $129.00 USD

-OR-
Or 8 weekly payments of only $16.13 Instant access. Easy checkout. No fees. Learn more
Course Access for Life
60 day money back guarantee

Common interface / debugging tools, DBC Files

05.34

00:00 - If we're looking to reverse engineer CAN data on an OEM bus, we're going to need to use some sort of interface tool to view and log the data frames that are on that bus.
00:10 These tools can vary in price dramatically depending on the feature set offered.
00:15 So it pays to shop around and do a little bit of research.
00:18 Linked below this module is a forum thread with a few specific CAN bus tools that we've had good results with in the past.
00:25 Because new tools are being released constantly, make sure to check this thread often for the latest information.
00:31 Let's go through some specific details now though which should help you select the tool that's right for you.
00:36 If you're setting up a CAN system using aftermarket electronics, using an interface tool to look at the bus traffic is usually not required as long as nothing goes wrong.
00:46 An interface tool, often called a sniffing tool will show us the data that is physically on the bus and can make it easier to troubleshoot any weird results we get when we're setting up those devices.
00:57 There are plenty of handheld oscilloscopes and modern automotive scan tools on the market that have CAN network analysers built into them.
01:05 These tools are usually battery powered and have a built in screen, making them very portable.
01:09 This can be really helpful but the downside is cost and flexibility.
01:15 Tools like this are usually in the thousands of dollar price range and getting a readable log of the bus traffic out of them to view on a PC can be a little bit troublesome.
01:25 They're typically designed for use in an OEM workshop environment and their functionality is pretty specialised.
01:30 In truth, I'm yet to come across any affordable handheld scan tools or CAN bus analysers that I've found to be substantially more useful than some of the cheaper options.
01:41 Instead, let's look at tools that provide a hardware interface between the CAN bus and a Windows based PC which then runs a piece of software to show and log those data frames.
01:52 An interface tool hooked up to a laptop with a decent battery life is very portable and can be used to log over a decent period of time if required.
02:00 The hardware inside these interface tools is relatively simple but where they vary greatly is in the software.
02:06 Typically, the more you're willing to pay, the more convenient space features the software will include.
02:12 I also suggest looking at turn key solutions which include a hardware interface and software solution already set up.
02:18 While it's absolutely possible to sniff CAN bus traffic for almost no financial outlay at all, doing this usually requires some higher level computer or programming skills.
02:28 If you're intersted in heading down this path though, a few terms to throw in Google to get you started would be Python CAN, SocketCAN and Linux CAN.
02:36 A good tool I consider to be the base standard for sniffing OEM CAN traffic is the SysTools CAN to USB adaptor.
02:44 It is relatively inexpensive and includes the PCAN software application to view and log CAN traffic.
02:50 On the hardware side, this tool supports CAN 2.0B and the ISO 11898 high speed standard.
02:57 So it will interface with almost all CAN buses we'll find in the performance automotive world.
03:02 It has a selectable termination resistor which can be an important feature if you're trying to troubleshoot a CAN system that you've set up from scratch.
03:09 The software allows viewing of all the traffic on the bus in a scrolling format as well as in a persistent format where all the data frames are sorted by their PID and constantly updated with the newest frame.
03:21 Lastly the tool can also transit custom messages which is another feature that can be invaluable when trouble shooting.
03:27 We'll be checking out this tool in action in our worked examples section of the course.
03:32 Another tool worth looking into is the Kvaser Leaf Light.
03:35 It's a little bit more expensive than the SysTools option but it does open up extra software options as well.
03:42 The Kvaser interfaces are widely supported by lots of different software applications.
03:46 My advice on this front is that if you're going to be doing the occasional job, requiring CAN bus analysing then the SysTools option is going to be your best bet.
03:57 But if you're thinking of making CAN bus analysing and reverse engineering a large part of your business, then you'll want to seriously look at the Kvaser range of tools.
04:05 A term we hear frequently when looking at debugging tools and CAN reverse engineering is a DBC file.
04:11 A DBC file is a CAN bus database file and contains all the information required to decode a raw CAN bus data frame into real world parameter values.
04:21 At the beginning of this course section, we looked at how we would construct a single CAN bus data frame to transmit some of the engine operation parameters on the bus.
04:30 This required us to make some decisions about how that data frame would be constructed.
04:36 Its PID, which of its data byte's related to each engine operation parameter and how they would be scaled.
04:41 A DBC file would contain all of this information and lets a piece of software take a raw CAN data frame and convert it back into those real world parameter values.
04:51 Creating DBC files is quite an advanced topic and they're usually only used for very intensive reverse engineering operations.
04:59 It's important that you know that they exist but an in depth guide to them is outside the scope of this course.
05:05 In this course module, we've talked about some important aspects to look for in a CAN bus interface tool as well as a couple of the common options.
05:12 The interface tool is used to read the traffic on the CAN bus displaying it in real time and recording it on our laptop.