Page 1 of 5 12345 LastLast
Results 1 to 10 of 42

Thread: Hacking the Can Bus

  1. #1
    Constant Bitrate
    Join Date
    Jul 2009
    Posts
    140

    Hacking the Can Bus

    I've been reading a few posts here and there about Canbus in various vehicles. I've been playing with canbus in my VW Touareg and I even have an Arduino with a canbus board which I use to start/stop the carpc, interface with steering wheel buttons and a few other functions. Since canbus id's vary so much but the underlying infrastructure is the same it was suggested that a thread be started and maybe we can have a collective of information in one thread.

    I've been doing a fair amount of canbus sniffing with my car and have identified a few key ID"s. There's tons of information that can be read and in some cases written to the canbus. I have many plans for my installation but I have a little more development and sniffing work to be done. Because of this I thought it best to buy another instrument cluster for car and use that in the house during testing. The canbus gateway for my car is located in the cluster itself so everything is in one spot.

    One of the things I want to do is have the music title scroll across the cluster lcd screen as it did with the original navigation unit. I'm also working on getting navigation information sent in the same manner. So right now I have the radio and cluster connected on the workbench. The ABS system uses canbus as well and the cluster looks for ABS "ok" msg on the canbus and if it doesn't receive it then a giant warning comes up on the display halting all other messages from displaying. So now I have to sniff the motor canbus and get those messages so I can replay them into the test bench cluster and hopefully I'll be on my way.

    The guys over at the golfmkv forums have a great thread on canbus hacking and one of the users even has an spreadsheet of canbus id's and the functions. I went through the list and found that just about all the id's they had didn't match the ID's for my car but that's ok as it's a good starting point.

  2. #2
    Constant Bitrate
    Join Date
    Jul 2009
    Posts
    140
    Here's a picture of the cluster and radio. Name:  uploadfromtaptalk1357313394271.jpg
Views: 11100
Size:  45.6 KB

    and this is the canbus shield I have for one of my Arduinos. I built the other canbus shields myself. There are a couple different companies who make canbus shields. The Sparkfun sheild has a few extra options like a gps header, sd card slot and a joystick.
    Last edited by that_kid; 01-04-2013 at 09:35 AM.

  3. #3
    Constant Bitrate Goddy's Avatar
    Join Date
    Dec 2004
    Location
    Netherlands
    Posts
    151
    Great, I've been looking for some kind of canbus to usb device and the Arduino device seems to be fit for the job. I can see the board has to input/outputs, USB for the PC obviously and a RS323. Where do I hook up the RS323 port? Do I need to have some kind of OBD2 to RS323 cable? I thought CANBUS just needed 3 wires (Canbus high, canbus low and a ground), so using the OBD2 port next to my feet seems to be overkill? I don't want to have a cable plugged in next to my feet all the time. Is there a possibility to plug in the OBD2 or Canbus port elsewhere in the car?

    So basically, what accessoires/hardware do I all need to make my steering wheel control buttons work in my carpc and how do I hook it up? Sorry to be a noob at canbus and arduino level
    Last edited by Goddy; 01-13-2013 at 06:02 AM.

  4. #4
    Constant Bitrate
    Join Date
    Jul 2009
    Posts
    140
    Quote Originally Posted by Goddy View Post
    Where do I hook up the RS323 port? Do I need to have some kind of OBD2 to RS323 cable?
    If you are using an arduino and canbus shield you only need a Can High and Can low connection to the car and a USB connection to the computer. I have seen some canbus setups interface with RS232 but that's not needed with the arduino and shield.

    Quote Originally Posted by Goddy View Post
    I thought CANBUS just needed 3 wires (Canbus high, canbus low and a ground), so using the OBD2 port next to my feet seems to be overkill? ...Is there a possibility to plug in the OBD2 or Canbus port elsewhere in the car?
    Canbus is a differential system so it only requires two wires. Also the Canbus signal located in the OBD connector sometimes doesn't provide access to all the Canbus data in the car. There can be numerous Canbus networks in the car. You have to figure out which bus the steering wheel data is available on. Depending on your vehicle you may be able to find this information on the internet. Normally a good place to tap into the Canbus is from the radio or nav unit.

    Quote Originally Posted by Goddy View Post
    So basically, what accessoires/hardware do I all need to make my steering wheel control buttons work in my carpc and how do I hook it up?
    You will need an Arduino, Canbus shield and a programming sketch that will allow the arduino to understand the Canbus data and for it to interact with the computer. This is where it gets tricky because you have to figure out the Canbus id's for the steering wheel buttons. There are several ways of getting the Arduino to control the computer, some Arduinos can emulate a keyboard so you could program the Arduino to send keyboard shortcuts corresponding to the steering wheel buttons.

  5. #5
    Moderator - CarPC News Penzance's Avatar
    Join Date
    Jan 2010
    Location
    Tennessee
    Posts
    159
    Have you guys seen that Ford came out with their OpenXC initiative last week? Basically an attempt to open source a standard method of reading the Can bus...

  6. #6
    Constant Bitrate
    Join Date
    Jul 2009
    Posts
    140
    Yeah I saw that, it looks interesting but I don't know if that will be compatible with anything other than new cars.

  7. #7
    Constant Bitrate Goddy's Avatar
    Join Date
    Dec 2004
    Location
    Netherlands
    Posts
    151
    I think I should get myself an Arduino + CAN bus shield and will play around with it.

    I gathered some helpful links

    http://www2.dasilvas.info/home/steering-wheel-buttons
    http://secuduino.blogspot.nl/2011/10...a-english.html

    As from the first link you can see it uses 2 wires only. Do you think it needs the CAN BUS low and high without the ground, it will it use only can low and ground?

    Is it also possible with the Arduino to write a code to receive AND send commands? It would be great if I'm able to read steering wheel control buttons and possible update the DIS with useful info.

  8. #8
    Constant Bitrate
    Join Date
    Jul 2009
    Posts
    140
    Yeah those two sites have some great information. I emailed the guy at dasilvas about his arduino setup. He was a great help to get me started. My CAN BUS uses only the high and low signals. I do have the arduino grounded through the electrical ground but the ground isn't needed for CAN BUS communication. As far as receiving and transmitting on the CAN BUS it's definitely possible. You will have have to figure out the timing of the signals for sending information and also the format of the messages. I had to do the same thing for my car and in fact I'm still figuring things out. For my setup I actually have to setup the arduino emulate the nav radio. If I don't do this the information display won't accept the messages to put on the screen. It sounds like you want to do the same thing, it's certainly possible you just need the correct CAN BUS messages and structures to do so.

  9. #9
    Constant Bitrate Goddy's Avatar
    Join Date
    Dec 2004
    Location
    Netherlands
    Posts
    151
    I also heared there are different can bus 'networks', engine, comfort and infotainment. For steering control I obviously need to use the infotainment bus. Is it also possible to read ODB2 like information from the bus like RPM, Speed etc?
    Then I also need to find out which wires (can hi/lo) I need to tap. I have no OEM radio in place, so I could just use those connections.

    Anyhow, I'll get myself an Arduino, a CAN shield and some other accessoires to play around with. When I am able to tap the correct wires and have it all in place I can start sniffing and figure out the correct codes.

  10. #10
    Low Bitrate rtgree01's Avatar
    Join Date
    Aug 2007
    Location
    STL
    Posts
    98
    I have a 2007 Dodge Charger... I've decoded many of the CAN messages on the interior (comfort) bus. I got a lot of information at www.canhack.org.
    Here is my worklog

    I'm using an mbed microcontroller . I designed a breakout board that gives me access to most of the peripherals.

Page 1 of 5 12345 LastLast

Similar Threads

  1. hacking a printer's LCD
    By natedawgg in forum LCD/Display
    Replies: 3
    Last Post: 03-19-2009, 02:48 PM
  2. Hacking Iguidance
    By Peoples in forum GPS
    Replies: 74
    Last Post: 08-28-2005, 06:40 PM
  3. Hacking Irman
    By Cheekz185 in forum Input Devices
    Replies: 3
    Last Post: 07-13-2005, 12:18 PM
  4. no TS, no hacking, which to buy?
    By DaddyZ in forum LCD/Display
    Replies: 5
    Last Post: 12-09-2004, 10:55 AM
  5. Frodo: 1.0.9 Hacking.
    By hevnsnt in forum FrodoPlayer
    Replies: 7
    Last Post: 10-17-2004, 05:54 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •