Introduction: Hack Your Vehicle CAN-BUS With Arduino and Seeed CAN-BUS Shield

Modern Vehicles all come equipped with a CAN-BUS Controller Area Network, Instead of having a million wires running back and forth from various devices in your car to the battery, its making use of a more clever system.

All electronic functions are connected to the TIPM, (Totally integrated Power Module), such as solenoids/relays to lock the doors or mini motors to wind the windows ect ect.

From each node (IE Switch pod that controls your windows or electric door locks) it broadcasts a message across the CAN. When the TIPM detects a valid message it will react accordingly like, lock the doors , switch on lights and so on.

WHY?
Because you can :-)

What you need.
Arduino UNO + Seeed CAN-BUS Shields
You can get the CAN-BUS Shield from SeeedStudio.com

Step 1: Setting Up an Interface for Connecting Your Laptop.

The Seeed CAN-BUS Shield has a header dedicated for the CAN-High (+) and CAN-Low (-)

Obviously all vehicles aren’t the same so the location to tap into the CAN-BUS will differ from vehicle to vehicle.
In this instructable I’m using a Jeep Wrangler (AKA Jeep JK) 2010, Rubicon 2DR , with a manual shifter.

The easiest way into the bus is to connect into the radio, at the back of the radio it has a White/Orange (- CAN-L) and White Grey ( + CAN-H ) wire. From there I routed the cable through to the glove box of the Jeep.

Step 2: Programming the Arduino to Accept Messages From the CAN-BUS

First of all you need the Seeed CAN-BUS Shield’s Library downloadable at GIT-HUB

After downloading the CAN-BUS Library you need to import it into your Arduino Libraries folder.
In the Arduino Editor Select Sketch --> Import Library --> Add Library and then point it to the Zip file you downloaded, (No need to unzip the contents it can be imported as is.

Tip: You might have to rename the zip as the Arduino IDE does not like unusual characters , so maybe try canbus.zip instead of can-bus.zip

Something important to note:

The CAN-BUS Shield library comes with a working example, it does not include getting the CAN-ID which is quite important to know when analysing the data, So i modified it slightly to include the ID also to seperate all values with a comma so that you can use it as a csv file.

Copy and paste the below code into your Arduino Sketch Editor.

#include "mcp_can.h"<br>
INT32U canId = 0x000;
unsigned char len = 0;
unsigned char buf[8];
char str[20];

void setup()
{    
Serial.negin(115200);
START_INIT:
if(CAN_OK == CAN.begin(CAN_125KBPS))
    {
        Serial.println("CAN BUS Shield init ok!");
    }
    else
    {
        Serial.println("CAN BUS Shield init fail");
        Serial.println("Init CAN BUS Shield again");
        delay(100);
        goto START_INIT;
    }
}
void loop()<br>{
    if(CAN_MSGAVAIL == CAN.checkReceive())
    {
        CAN.readMsgBuf(&len, buf);
        canId = CAN.getCanId();
        
        Serial.print(canId);Serial.print(",");
        for(int i = 0; i<len; i++)
	{
		Serial.print(buff[i]);Serial.print(",");
	}
	Serial.println();
   }
}

Hit the upload button to upload the sketch.

Step 3: Connecting to the Arduino + CAN-BUS Shield to Get CAN Data

Now you need to make sure the CAN-BUS Shield has been connected to the vehicle's CAN-BUS, via the CAN-H & CAN-L Connector.

If you are sure everything has been connected then use putty to connect to the shield via Serial.

Putty is actually a SSH Client but can also handle serial data and it works great for this purpose.

Look at the Image attached to this step for the Serial port configuration.

Once you connect, Your vehicle's CAN-BUS will bombard putty with CAN-BUS Data.

Step 4: Analyze the Data

From here you need to figure out how to detect the messages, such as turning on lightts, open windows ect ect.

When connecting with putty you can log all incomming data to file as explained in the screenshot from the previous step.

Connect and log to a file called file1.csv and let it run with all windows closed, vehicle's key in on position but not started, and let it run for about 5 minutes, Kill the putty session, then restart the Arduino (The Sketch does not clear the buffer), And this time log all data to file2.csv , once putty starts duming data, quickly press a buton (Only one at a time cus you will not know which message goes to which button), once you pressed a button a few times quickly disconnectputty from the can bus.

So theoretically all messages in File2.csv thats also in File1.csv should be ignored/filtered the messages thats left over in File2.scv should be the message button presses.

If you have some programming skills you might find a better way to manage this.
I cretated a basic application in VB6 , you can look for more information about the tool on my Blog
Unfortunatly the application is a bit incomplete, eventhough it has the capability to connect directly to the Arduino Via Serial it doesnt work propperly, so please ignore the Serial Connection part.

It will basically take the fisrt file run which you were dumping data for ~5 Minutes (ignoredatabase.can) and incomming.can as the log file which includes button presses.

I encourage you to find a better way to analyse the data as this can be very stime consuming.

Step 5: Sending a Message Into the CAN-BUS

To send a message into the CAN-BUS is pretty straight forward.

The below will send the "Sway-Bar" disconnect on a Jeep Wrangler.

Note the CAN-ID needs to be converted into HEX format, an easy way to convert it is to use the Windows Calculator, Using "Programmer Mode" for Windows 7 Calculator

From the below code you can see its sending it to CAN-ID 2B0 = 688

#include <mcp_can.h><br>#include <spi.h></spi.h></mcp_can.h>
void setup()
{
    Serial.begin(115200);
  
START_INIT:
    if(CAN_OK == CAN.begin(CAN_125KBPS))                   // init can bus : baudrate = 500k
    {
        Serial.println("CAN BUS Shield init ok!");
    }
    else
    {
        Serial.println("CAN BUS Shield init fail");
        Serial.println("Init CAN BUS Shield again");
        delay(100);
        goto START_INIT;
    }
}
void loop()
{
    unsigned char stmp3[4] = {3, 0, 3, 0};
    CAN.sendMsgBuf(0x2B0, 0, 4, stmp3);  
    delay(10000); 
     
}

Step 6: A Prototype Built Using the Information From This Instructable

Not going into much detail, this is just to show you whats possible.

This Arduino + Seeed CAN-BUS Shield has an added feature, I built a Button & 4 LED Display.
When pressing the red button it will cycle through all posible LED states and each state represents a feature.

Pressing the yellow button will send the message to the bus.

Comments

author
DaveK97 (author)2017-07-29

Can you start the Air Con and Window demister through the Can Bus without the car key?

author
mviljoen2 (author)DaveK972017-07-30

Hi Dave. You wont be-able to. The can bus does not run all the time it shuts down after about 3 or so minutes when turning off the ignition. Also it would be draining the battery if it were to run all the time whilst the car is off. Would also be a massive security risk.

author
MiguelC211 (author)2017-06-06

Can I use the ODB2 to DB9 cable or it just only works with CANL/CANR?

author
JaroslavZ3 (author)2017-03-21

I can confirm what @MoniCris has said: Use the GROUND/GND Luke! Also consider cutting P1 (right above the CAN-H screw)

I had to do both to finally get my first message from the damned shield in my Ford Mondeo.

author
NyällD (author)2017-02-02

can we not just drive the can wires through the arduino?
(with some more basic electronics if neccesary)

author
Bort Plate (author)2016-01-12

There are too many errors in the code above. First, there is HTML, "<br>" is found in at least two places.

Also, I get an error:

"exit status 1

'CAN' was not declared in this scope"

for this line:

"if(CAN_MSGAVAIL == CAN.checkReceive())"

I think I fixed it by adding code from the original example files, just before setup(), such as:

"const int SPI_CS_PIN = 9;

MCP_CAN CAN(SPI_CS_PIN); // Set CS pin"

But there is also an error with "buff" being undeclared!

I imagine there are other errors that the compiler didn't catch. Not very usable.

author
jokinpaha (author)Bort Plate2016-03-27

this complies OK at least on my IDE

#include <SPI.h>
#include <mcp_can.h>
INT32U canId = 0x000;

unsigned char len = 0;
unsigned char buff[8];
char str[20];

const int SPI_CS_PIN = 10; // select your can shield cs pin

MCP_CAN CAN(SPI_CS_PIN); // Set CS pin
void setup()
{
Serial.begin(115200);
START_INIT:
if(CAN_OK == CAN.begin(CAN_125KBPS))
{
Serial.println("CAN BUS Shield init ok!");
}
else
{
Serial.println("CAN BUS Shield init fail");
Serial.println("Init CAN BUS Shield again");
delay(100);
goto START_INIT;
}
}

void loop(){
if(CAN_MSGAVAIL == CAN.checkReceive())
{
CAN.readMsgBuf(&len, buff);
canId = CAN.getCanId();

Serial.print(canId);Serial.print(",");
for(int i = 0; i<len; i++)
{
Serial.print(buff[i]);Serial.print(",");
}
Serial.println();
}
}

author
VasanthS8 (author)2016-03-11

Hi everyone,

Is it possible to program the Arduino board with a small application which performs some calculations with the CAN data read from the OBD layer in real-time.

Does Arduino support this kind of applications ?

Thanks in advance

author
hd4 (author)2016-03-08

I want to hack my honda civic 2008 model can you provide a step by step guide for doing it??

author
escartiz (author)2015-10-21

I was wondering if you could help me out, I would like to monitor certain ids, no need to send just received. I got the arduino and shield to communicate with the computer. Everything is working. My problem is that I only get data if I disconnect/re connect the cable to the CAN device. It is not looping. I was hoping I could do a delay, and then request data for some ids without having to switch the device off and on but I am not understanding quite right how to do this. I appreciate any advice.

author
AdiG (author)2015-10-12

I just built a filter tool to compare 2 files and output the found commands to a third file.

here you go:

https://www.dropbox.com/sh/ozqvv0htxu4555l/AACAW4o...

author
arunduino (author)2015-09-04

Hi,

I have bought a OBD2-DB9 cable and coupled it with a
serial to USB connector to connect to my laptop. I have installed the
touchscan software from scantools.net and currently using the trial
version which has all the features enabled for two weeks.

I have
also installed the driver for serial to com port.. When I connect it to
my VW Vento 2011 model, there is nothing detected by the software. I
have tried it with various protocols and nothing seems to work.

Here is the connection flow:

VW Vento OBD2 port >> OBD2-to-DB9 >> DB9-to-USB adapter >> connected to laptop through USB

Am I missing something here, is there a separate driver required for OBD2 to DB9 as well. Please help me.

Thanks!!!

author
MichaelB213 (author)arunduino2015-10-04

The Problem is that Volkwagen blocked the OBD2 CAN Pins for incoming and output messages by default. To bypass this you can tap the CAN cables directly which are located inside the steering post for best access. Look for 2 green wires, the one with black mark is can low

author
arunduino (author)MichaelB2132015-10-05

Hi MichaelB213, What you have said seems to be the case in my car as well. Last weekend I had a doubt in the canbus shield and the OBD2 port. So firstly I taped the can wires (Convenience and Powertrain) behind the BCM white port, hoping that would provide the necessary data signals. I have tabled the pin out of the BCM from where I have taped the wires.



Pin Number of BCM VW

Description


18
Powertrain Low


19
Powertrain High


20
Convenience High


21
Convenience Low

I tried using Arduino UNO and the shield with the default "receive_check" example to find if there is any signal.

I had configured the bit rate to 500KBPS when reading the Powertrain wires and 100KBPS when reading the convenience. Still there was no signal read from both the can wires. I was sure that by now something should be read from the can wires, as I have bypassed the gateway and directly accessed the BCM.

I had a doubt on the compatibility of the shield with the library, so I used a different hardware this time from my friend that is used for analyzing the can signals with a provided software. This time there were loads of data read in the software using his device :). Around 25 unique CAN IDs were seen in the convenience and around 35 were found in powertrain.

I then tried using the same hardware in the OBD2 port and again no signals. So, it is proved that the OBD port in VW is blocked for sending and receiving signals as you have said MichaelB213. Thank you for the information.

I am going to try the same with the Seedstudio shield. Will keep this thread updated on the progress.

I am expecting to get the shield next week. Later, I would analyze the can ids and try to find the ones I need.

Can_bus_shield.png
author
MoniCris (author)2015-09-30

Take care about the meaning of High and Low. Does not mean + and - !!!
Is High signal and Low signal. You need to connect also the ground. Was working, only because you get the voltage from the car, so, the same ground!
Good job anyway.

author
MakeMat (author)2015-09-27

good job! what's about ground? is it shared between arduino and car?

author
CBaj (author)2015-09-04

Hello!

I have a quick question: Let's say that I receive the info "24 0 255" from ID 13. To send the info "25 0 255" to ID 13, shall I use the address "0xD" and the info in decimal, or also in hex? Also, the address should be like I wrote it or am I wrong?

Thank you in advance!

author
lenkru (author)2015-08-18

Hi

I received a radio from a 2010 JK from a friend that is building a trail rig. Can you please give me the CAN BUS message for ignition ON. I do not have a vehicle to check it myself.

Regards

author
VasanthS2 (author)2015-08-15

One quick q: Shouldnt the code read "unsigned char buff[8];" instead of "unsigned char buf[8];"? Thanks!!

author
mviljoen2 (author)2015-08-14

Hi , Wow I just just deleted the video, then I received your message my Youtube channel got taken over by a reschedules scam bastard company called RecStudios.TV, Blame them :-) for killing open source, Not to worry I'm in the process of creating a new channel and will re-upload all the channels.

author
simonrafferty (author)2015-08-14

The video says "This video has been removed by the user" What gives? Do you have an alternative link?

Good instructable by the way.

author
BožidarŠ (author)2015-07-03

Hi,

I am wondering, can I read the data about instantaneous fuel consumption via this CAN BUS?
The car is Audi A4 B5 1998.

Thank you for any advice!

author
totoche61 (author)2015-06-15

Hi !

Do you know if it's possible to connect the shield to a CAN Low-speed. I reach to connect its on OBD, but not behind the radio.

Someone could help me ?

Thank you

author
KevinL13 (author)2015-05-19

Hi, im new on this i was thinking if someone can help me, i'm trying to get the
VIN number from the CAN-BUS i want to know if that its possible.
Thank you

author
mviljoen2 (author)KevinL132015-05-27

Hi Kevin.

Really sorry for the late reply, yes you can get the VIN number and its quite easy.

Just remember when requesting a VIN number the whole VIN does not fit inside 1 message so it will be transmitted over 2 messages.

author
KevinL13 (author)mviljoen22015-06-09

Save my day :D
I just dont know yet all of the hardware i will need to use.
would be great if u help me :)
like a list of what i need, and a quick code to request the VIN number
Thank you

author
namilax (author)2015-06-06

Hi guys. I'm glad that someone made this project because i have real need to access can bus on trucks, trailers and buses. I have workshop for repairing air brakes. The problem is that newer vehicles have EBS (electronic brake system) with pressure,speed and steering sensor and ECAS (electronically controlled air suspension) with bunch of sensors and i don't have equipment to test them in real time. All i can find from manufacturer is diagnostic equipment that connects to the vehicle OBD connector but i can't use it because i have to test valve on test bench.

It's not difficult to make this interface but i will need some software to translate the code to user-friendly message. Does someone know which software will suits for that?

author
lovnblack (author)2015-04-13

Hi, first of all Im a newbie, have no tech. experience and knowledge. Im just here to help my friend, he does not know English. He repair different car brand's tapes/radio units/screens. And he said me, someone bought "orange 5" programmer and bought a special software from Ukraine (we dont know who it was). This software seller asked him which car brands he need. And depends on that brands, he gave him a software. The system working like that : For example he got a Chrysler 300C radio-tape unit. He connect it to orange 5, and orange 5 connected to his computer. He just choose "chrysler 300C" from his software, and this software send CANBUS signal of Chrysler, and his radio unit working on his bench. Do we need certainly Orange 5 or another programmer can do that ? And the important thing how we can find that program seller from Ukraine, or do you know another programmer guy? We need the canbus signals for chrysler 300C, Dodge Nitro and Grand Chreeko. Thanx for reading and helping...

author
mirsat (author)2015-04-11

Hi,

Thanks for doing all these stuffs to let us know more about CAN. I have used a phyton sniffer and arduino can-bus shiled to analyse the data. Im trying to figure out how aircon works. I have found all the related CAN-BUS ids and datas for the aircon. When i send them back it doesn’t care my data it keeps sending its own data. I used this way to lock unlock the doors, open the windows, move the seats, lights and so on. i used the aircon id and data for same brand car but different model it worked. I wonder that it maybe LIN-BUS or something else? here is my id and sample data for fan level and temperature:

CAN ID: 856, data: 0, 0, 0, 0, 21, 21, 153, 17

CAN ID: 856, data: 0, 0, 0, 0, 21, 21, 153, 34

CAN ID: 856, data: 0, 0, 0, 0, 21, 21, 153, 51

17,34 and 51 are for fan level and 21 is for temperature

The car is 2015 Model.

author
mviljoen2 (author)mirsat2015-04-11

Hi , Glad you can make use of the info.

The problem is the CAN-BUS Node that controls the aircon, sends the state of the position of the switch the whole time, and cant be stopped.

You can try to spam it by sending your desired can ID repeatedly, but it might cause it to behave erratic, I.E you send a message to make the aircon blow fast and the control node will in between at the same time send a message to make the aircon blow slow so it will cause it to go fast and slow, and might even cause damage.

I had the same with my head lights, I can turn them on if i spam the bus, but when looking at the head lights i can see that they dip and dim the whole time.

author
mirsat (author)mviljoen22015-04-12

Actually yes the aircon unit sends the signals per second and i send them 5 times in a second but it does not answer my data. But I know that other car with same data and same id response my data if i send my desired id and data then the bus change to my id and data then even i stop sending, it keeps sending my own data. The difference is that these two cars have two different aircons but the CAN-BUS signals and ids are the same. The aircon unit has linbus and canbus cables behind, and when i cut the linbus cables then i change the fan level to the max, it changes on the screen but the fan is not working, if i put the linbus cable back and it detected the fan level on the screen by CANBUS data and it worked in max speed too. Im not really sure whether the aircon uses CAN-BUS or LIN-BUS. May i have your advice ?

Thank you.

author
JerryB3 (author)2015-01-28

I was hoping someone could help me out, I install control modules in handicap vehicles to help people (quadriplegics) be able to drive. I have a very difficult time getting around these can bus systems and usually have to out source the vehicles I have with can bus! any suggestions on how to get by or cheat the can bus system? and also can anyone tell me if a 2015 Cadillac escalade is can bus?

author
ak47freak (author)JerryB32015-02-20

Yes all of the newer vehicles produced are CAN. I want to say that on the newest Cadillacs they have something like 160 modules/nodes in the CAN system that control everything! I don't know how you modify these vehicles for the handicapped, but if you can get a working knowledge of the CAN systems you should be able to transfer control of just about everything in the vehicle to a single point. (ie. steering wheel, touch screen). I would love to hear how you accomplish these jobs. pictures? keep up the good work.

author
mviljoen2 (author)JerryB32015-01-28

Hi JerryB3, Regarding the Cadillac, if its a 2015, I would be very surprised if it hasn't got a CAN-BUS system, vehicles from I think (I stand to be corrected) from about 1996 has a can bus, and in some countries its required to have a diagnostics system, and currently in almost all cases using CAN-BUS is the most viable.

What does the control module need to do ? Why not move/duplicate I.E the Throttle controller, and assuming such a vehicle will use an automatic transmission , what about the brakes ? how would the Can-bus play a role there?, I dont think you need to mess with the can bus to make a vehicle drivable for quadriplegics.

author
JerryB3 (author)mviljoen22015-01-28

They are control modules that allow my customers do windshield wipe and wash, horn, cruise controle, dimmers, turn signals all in one key pad that is attached to the steering wheel

author
mviljoen2 (author)JerryB32015-01-28

Ah OK that makes sense, See the problem is not all vehicles make use of the same messages that gets sent back and forth to communicate to various features such as the window wipers ect ect, So you would need to eavesdrop on the CAN-BUS and find them, then send them back into the system, I.E In my case I'm able to switch the lights on, Turn on the Differential lockers, Swat bar, even open and close the central locking but i had to find them by analyzing the CAN-BUS, If you are interested, check out the following link

http://www.techtinker.co.za/viewtopic.php?f=14&t=1...

Ive developed a software tool to help you scan the bus and analyze it to make better sense on the can-bus messages, from there you can build your own controller to send the messages back into the system.


Soon I will upload a video tutorial to demonstrate how the software works.

See my youtube video (Please bare with the poor quality)

I created a very rough prototype, that turns on/off the stability control and sway bar. the prototype in the video can be easily improved in order to make it user friendly

author
JerryB3 (author)mviljoen22015-01-28

Thank you so much for the insight, I will show this to my engineer.

author
ak47freak (author)2015-02-20

The easiest way to reach CAN-H and CAN-L is through the OBDII DLC under your dash. CAN runs off of PIN 6 and PIN 14 while using PIN 5 as its common signal ground. With your shield setup this cable would be perfect. http://www.thoroughbreddiesel.com/mads/obdiicable.htm?gclid=CP6f5_D18MMCFRNafgods1sAIA

PIN 6 CAN-H <------>PIN 5 SIG GND <------> PIN 14 CAN-L

IdentifiyingOBDII_Communication_Protol_For_Using_Scan_Tool-1.jpg
author
Mackhack (author)2015-02-16

Thank you very much for this nice instructable. Could somone post a sample code to show how to sniff for a specific CAN ID i.e. speed, RPM, Throttle Body?

author
patrick.roncagliolo (author)2015-01-28

Can you explain better how you connected can-l can-h from the back of your radio?. I am planning to hack a ford fiesta. The radio has can-l and can-h in the radio connector. But how can I connect my arduino? Should i have to double each can cable?

author

Hi Patric, if you look at the main picture of this instructable, you will see you need an arduino and can bus shield that you need to attach to the arduino, you cant connect the radio directly to the arduino, excuse my ignorance but im confident the instructable i made explains clearly how to do it, if you alreadly know where the can wires go you simply connect it up as explained in the instructable.

Please let me know if i didnt understand your question.

author
mviljoen2 (author)2015-01-14

If i ever end up in Vancouver i will take you up on ur offer :-) canada is is on my bucket list one day when im big haha!, however think i will suffer a bit over there with my warm blood from south africa
Cheers

author
mviljoen2 (author)2015-01-14

Hi andrew, glad i could help you get there "half way" :-) yes putty has to match the arduino sketch code were it reads serial.begin, i dont know what your audi's bus speed is my JeepJK's speed for the interiour is 125 where the default sketch code is set 500kb, try 125 or 250kb in my case the jeep went crazy when i had the can bus speed wrong because whilst its connected it actually temporary corrupts the bus sped and has to restart, suppose different vehicles react differently, in my case i also did not have to take out the resistor guess im lucky

author
AndrewT8 (author)2015-01-14

Martin, removing the R3 resistor was I think part of the key to unlocking this mystery for me. I can see that the rx and tx led's are flashing like mad with some of the examples included in the library but there is still something hindering my access to the data. Most likely this is my own skills with the Arduino but I'm getting there slowly ;)
So #1) THANK YOU!!!
#2) I'm not sure what to do next specifically.
- I can see that the serial speed needs to match within the sketch and the serial monitor (or PuTTY for that matter). This makes sense to me. As does the speed variable for communicating with the CAN-BUS... but I have no idea how to check this. Did you just have to set your speed to different levels until it worked?
- I have a 2014 Audi A4... not sure if that helps clarify anything with respect to CAN-BUS speed etc.
- Also, I have seen many examples of the code used in the sample library as 'what I should do to communicate' with my CAN-BUS... once I send that up to the Arduino/CAN-BUS Shield (which is connected to the OBD-II port via D9 port on the shield), am I supposed to just get the CAN-BUS init ok message and then a flood of data? Or is there something else I should be doing?
Your help is greatly appreciated!!! I already owe you a beer if ever you come to Vancouver!
(PS. I went and tried connecting to an older Toyota 4Runner and got the same result... nice init ok message and then nothing)

author
mviljoen2 (author)2015-01-13

Thanks Andrew, the instructables editor added the
tags and also dropped off some code, also , sounds like you are saying you are not getting any data, it could well be the node you are connecting to is already terminated with a resistor and need to desolder it, ( it mentions this in the shield's documentation, http://techtinker.co.za/viewforum.php?f=14&sid=ff8b8574d38745f41c654fc6caeb4392 you will find some more onfo on it under thread building a can buss hardware sniffer hope it helps

author
AndrewT8 (author)2015-01-13

There are a few errors people should be aware of...

<br> tags in the first line and in the loop... as drmarcj pointed out, they should be removed.

Also, the reference to "buf" in the Serial.print command in the loop is misspelt as "buff". Only 1 f or change the variable name up top to buff. Either way they should match.

Thanks for the addition of the canId variable... hopefully that solves my issue of only getting as far as "CAN BUS Shield init ok!" showing up in the serial monitor! I'll go test it again once I've done a little more work ;)

author
Chenq11 (author)2014-12-12

Hi, I have an error that says:

CAN.ino: In function 'void setup():

CAN.ino:20:18: error: 'CAN' was not declared in this scope

CAN.ino: In function 'void loop()':

CAN.ino:36:24: error: 'CAN' was not declared in this scope

Anyone have any ideas?

author
JaackM (author)2014-12-01

The CAN lines and ISO L & K Lines report different data streams. why omit the ISO lines from the OBD2 port connector?. 2010 vehicles are required to have the OBD2 port connector for YEARS. This is only 2 more data lines.

author
mviljoen2 (author)JaackM2014-12-02

To be honest I have no idea what you mean, by omitting the L & K Lines ?
Doing
a quick google, K & L is PIN 7 & 15 on the OBD2 port,
(My Jeep 2010 does not even have wires populated to those pins, Its
making use of PIN6 and PIN14, which is CAN-High and CAN-Low)

If you mean, why connect directly to the CAN-BUS
, by tapping into the 2 wires at the back of the radio ? , Its because
this setup is not related to OBD2 at all, OBD2 replies only on request,
and no fly by data is visible (On my Jeep At-least) I'm sure some vehicles allow you to monitor from the OBD2 port, but its not what it was designed to do, seeing its there to send On board diagnostics., When you monitor it you get no data, you
have to send a command to get data back I.E Send 010C (Which is ISO for RPM) So the OBD2 Port will respond with an RPM value(s). (From what i have read you need to also supply a manufacturers pass code to access non standard PID, like TPMS Status)

But back on topic, This instructable is more about being able to monitor the BUS and demonstrating how you can send or "Inject" if you want, codes you received by recording them using a putty Or the CAN-BUS Super Sniffer tool which i created (Not part of this instructable, Ive abandoned the tool mentioned in this writeup, see more here http://www.techtinker.co.za/viewtopic.php?f=14&t=1...

Cheers

author
ehsmaes (author)2014-11-14

I have been thinking of tapping into my OBDII-connector by means of an Arduino bluetooth-shield and a commercially available OBDII BT-dongle. Would that be a comparable setup or more limited?