Setting up the Hardware

Building a RAW CAN-BUS Sniffer

In this writeup i will show you how to sniff data using an Arduino + CAN-BUS Shield.
(All testing and experimentation was done on a Jeep Wrangler 2010 2Dr 3.8L v6)

For this purpose im using an Arduino & a CAN-BUS shield from SeeedStudio which is making use of the MCP2551/2515 CAN/Transceiver Chips

Some information you should know.
The standard OBDII port inside a Jeep Wrangler, does not allow you to communicate directly to the comfort/Interior CAN-BUS.
(The comfort BUS is the Area which handled all actions such as lights, AC controls, steering wheel controls, blinkers left/right ect ect)

You need to physically bypass it, by tapping directly into the Interior CAN-BUS.
There are quite a few places where you can do this, the easiest and safest place to get to the CAN-BUS is to connect two wires directly to the CAN-BUS pins on the radio connector.


Why you should not use the ELM327 for this purpose.
Just to set things right, firstly there is nothing wrong with the ELM327 is just does not suite this purpose.

Not going into too much detail with the ELM327 OBD2 Scanner.
You can  use the ELM327 and connect wires from Pin 6 and Pin 14 on the ELM327 OBD2 Connector to the CAN-BUS White/Orange (CAN Low Negative) and White/Grey (CAN H Positive) on the Radio connector.
Problem is the ELM327 has a small buffer and also there are 1000s of Fake ELM327 devices out there and their performance resaults arn't always good and will most probably give a [Buffer Full] error message after a few 100 CAN-BUS broadcasted messages.

CAN-BUS Shield for Arduino UNO
In this I'm making use of SeeedStudio's version, which has a bigger buffer and is much faster and better.
http://www.seeedstudio.com/depot/CANBUS-Shield-p-1240.html


In this example we are making use of the CAN-BUS Shield which snaps onto an Arduino UNO.
You also get a similair board that will work with the Pi. There are also other CAN-BUS Arduino Shield options aswell such as the one from SkPang.

The Setup is pretty simple (See below illustration)




If you have a Male to Female USB Extender cable you can cut it in half, then join one end to the radio, then run it into the Jeep's glove box.

The other end you can connect to to the CAN-BUS Shield, So then when ever you need to experiment, you can simply just make the USB Connection.

For the next blog post i will create an Arduino sketch that  will monitor all data on the CAN-BUS and out put it to the Serial Bus of the Arduino, then we can putty into the Arduino and dump all of the data to a file , which we can then analyze using excel or SQL database queries.






No comments:

Post a Comment