Re: Possible to interface w/ vehicle CAN Bus?

2,161 views
Skip to first unread message

Brent

unread,
May 29, 2013, 8:16:15 PM5/29/13
to beagl...@googlegroups.com
Out of the box... not quite.  You will need a CAN transceiver.  There is a CAN cape, but there really isn't much to it.  All you need hardware wise is a CAN transceiver, and TI has several to choose from.

On Wednesday, May 29, 2013 8:03:55 PM UTC-4, James Smith wrote:
I now have a shiny new BeagleBone Black in the mail, so please excuse the fact that I am completely new to the community :)

I am interested in interfacing with my car's CAN bus (at least initially only sniffing the bus) through the OBD-II port, and am currently interested in the hardware side of it:
  1. Does the BBB have the ability to communicate with a Controller Area Network out of the box?
  2. Is there a BBB cape that would allow me to sniff my vehicle's CAN bus?

I don't necessarily mind having to hack together code on the software side, but my main question at the moment is where to start on the hardware side.

If anyone could point me in the right direction, I would appreciate it! Thanks :)

Kleven Bingham

unread,
May 29, 2013, 8:18:13 PM5/29/13
to beagl...@googlegroups.com
You would need one of these two capes to start with:


Then you would need to figure out how to mate the pinout of the connector on the cape with the OBDII connector.  I don't know how, but Google should be able to tell you.

You also need to check for BB Black cape compatibility.  If you search this forum there should be multiple messages about cape compatibility with the Black that should give you a link to a wiki page with more detailed information.  Sorry I don't have the link handy but I'm packing up to leave work.

Kleven

Mark Lazarewicz

unread,
May 29, 2013, 8:21:31 PM5/29/13
to beagl...@googlegroups.com
The regular Bone has a CAN addon that costs more than the Bone itself. I ordered 2 supposedly the kernel supports CAN over socket. 

Most US Autos use j1939 or other CAN  stacks on top of can so you would have to do some packet deciphering after you soldered an OBD connector to the wires hanging off the CAN addon.

 are you going to plug this all into a cigarette lighter to USB adapter? please send pictures

--- On Wed, 5/29/13, jasm...@gmail.com <jasm...@gmail.com> wrote:

From: jasm...@gmail.com <jasm...@gmail.com>
Subject: [beagleboard] Possible to interface w/ vehicle CAN Bus?
To: beagl...@googlegroups.com
Date: Wednesday, May 29, 2013, 7:03 PM

I now have a shiny new BeagleBone Black in the mail, so please excuse the fact that I am completely new to the community :)

I am interested in interfacing with my car's CAN bus (at least initially only sniffing the bus) through the OBD-II port, and am currently interested in the hardware side of it:
  1. Does the BBB have the ability to communicate with a Controller Area Network out of the box?
  2. Is there a BBB cape that would allow me to sniff my vehicle's CAN bus?

I don't necessarily mind having to hack together code on the software side, but my main question at the moment is where to start on the hardware side.

If anyone could point me in the right direction, I would appreciate it! Thanks :)

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Message has been deleted

James Smith

unread,
May 29, 2013, 8:36:09 PM5/29/13
to beagl...@googlegroups.com
From the bit of research I have done, my car ('04 Volvo v70 - US market) supports the ISO-9141(-2) CAN protocol -- so I am not entirely sure if any of the capes mentioned thus far would necessarily work with it, but I guess I have plenty more research to do :-D

If anyone knows of an alternative to using a cape (all of which seem to be significantly more expensive than what I paid for the BBB), I would certainly be interested in exploring cheaper options!

As far as my setup goes, I haven't even begun prototyping yet, so for the moment I will just be using a cig adapter, but I will be sure to upload pics when I have progress to show :)

Brent C. Sink

unread,
May 29, 2013, 8:39:32 PM5/29/13
to beagl...@googlegroups.com
I did not purchase either of the CAN capes, I just built a simple "cape", basically a perf board with a header and attached a CAN transceiver and DB9 connector.  Since there was no eeprom, I had to initialize the CAN bus in the kernel.  After that you can use candump to see the CAN activity, or use SocketCAN in a C++ application.


On Wed, May 29, 2013 at 8:31 PM, James Smith <jasm...@gmail.com> wrote:
From the bit of research I have done, my car ('04 Volvo v70 - US market) supports the ISO-9141(-2) CAN protocol -- so I am not entirely sure if any of the capes mentioned thus far would necessarily work with it, but I guess I have plenty more research to do :-D

If anyone knows of an alternative to using a cape (all of which seem to be significantly more expensive than what I paid for the BBB), I would certainly be interested in exploring cheaper options!

As far as my setup goes, for the moment I will just be using a cig adapter, but I will be sure to upload pics when I have something to show :)



On Wednesday, May 29, 2013 8:21:31 PM UTC-4, lazarman wrote:
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/2IGpEQYI7l4/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
-brent

Mark Lazarewicz

unread,
May 29, 2013, 8:40:17 PM5/29/13
to beagl...@googlegroups.com
and what will you do with the data you get from OBD port assuming you send the right commands?

--- On Wed, 5/29/13, James Smith <jasm...@gmail.com> wrote:

James Smith

unread,
May 29, 2013, 8:46:03 PM5/29/13
to beagl...@googlegroups.com
I appreciate everyone's responses - I didn't expect so much feedback so quickly!

I was able to find the pinout for the obd2 port fairly easily.

Does anyone know of there are any cheaper (usb) alternatives to using one of the expensive capes?

Brent

unread,
May 29, 2013, 8:52:54 PM5/29/13
to beagl...@googlegroups.com
Not cheap... we use PEAK at work, but you will have to spend quite a bit more than the CAN cape.

James Smith

unread,
May 29, 2013, 8:53:20 PM5/29/13
to beagl...@googlegroups.com
At this point I am primarily just interested in seeing what all information is sent over the CAN bus, but eventually I would want to stream selected output to either my phone/tablet or just log selective information.

My (currently limited) understanding of how the CAN protocol works is that all of the distinct control units in the vehicle are constantly sending messages over the bus, so I would just save/display the information I decide to target.

I still have a lot of digging to do, but eventually I would like to experiment with injecting commands onto the bus (ie put the front-driver window down, etc) -- but this involves a lot more effort to ensure messages don't go off-bus or cause the ECU to throw diagnostic trouble codes (DTCs). Right now I just want to experiment with BBB's CAN capabilities as it relates to my vehicle.

James Smith

unread,
May 29, 2013, 8:54:43 PM5/29/13
to beagl...@googlegroups.com
Brent,

Are there any guides/resources you would recommend for me to build this?

Mark Lazarewicz

unread,
May 29, 2013, 8:57:06 PM5/29/13
to beagl...@googlegroups.com
USB? the Can tranceiver chips are connected to the DCAN controller via the bone header
You have to do some circuit design I just opened mine up they plug on top of the bone using male connectors you could look at the cape schematics as reference of how to breadboard this or ask the previous poster if he will share his design

--- On Wed, 5/29/13, James Smith <jasm...@gmail.com> wrote:

From: James Smith <jasm...@gmail.com>
Subject: [beagleboard] Re: Possible to interface w/ vehicle CAN Bus?
To: beagl...@googlegroups.com
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsub...@googlegroups.com.

Brent C. Sink

unread,
May 29, 2013, 8:59:00 PM5/29/13
to beagl...@googlegroups.com
Sure I can put something together.  Let me get back to you tomorrow on this.

James Smith

unread,
May 29, 2013, 9:03:51 PM5/29/13
to beagl...@googlegroups.com

Awesome! I really appreciate it :-)

Mark Lazarewicz

unread,
May 29, 2013, 9:07:06 PM5/29/13
to beagl...@googlegroups.com
It doesnt hurt to dream big and I am no expert but I did work on an ECU in 92 and I dont think injecting commands onto the bus is general knowledge and supported over OBD but hey you get this working you can land a job in Detroit (-:
Best of luck I would start with the HW

 I think the previous poster was referring to PCANView which sniffs can over USB

James Smith

unread,
May 29, 2013, 9:10:27 PM5/29/13
to beagl...@googlegroups.com
Hehe, yeah that is more or less my feeling on it too! But at the very least it should be a learning experience to dig around on the CAN Bus network ;)

You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/2IGpEQYI7l4/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
--------------------------------
James A. Smith
j.s...@gatech.edu
College of Computing - Georgia Institute of Technology

William Pretty Security

unread,
May 29, 2013, 10:00:58 PM5/29/13
to beagl...@googlegroups.com

Google “Carshark”

 

Also you can buy everything you need to interface with the CAN buss from Sparkfun.

 

From: beagl...@googlegroups.com [mailto:beagl...@googlegroups.com] On Behalf Of jasm...@gmail.com
Sent: Wednesday, May 29, 2013 8:04 PM
To: beagl...@googlegroups.com
Subject: [beagleboard] Possible to interface w/ vehicle CAN Bus?

 

I now have a shiny new BeagleBone Black in the mail, so please excuse the fact that I am completely new to the community :)



I am interested in interfacing with my car's CAN bus (at least initially only sniffing the bus) through the OBD-II port, and am currently interested in the hardware side of it:

  1. Does the BBB have the ability to communicate with a Controller Area Network out of the box?
  2. Is there a BBB cape that would allow me to sniff my vehicle's CAN bus?

I don't necessarily mind having to hack together code on the software side, but my main question at the moment is where to start on the hardware side.

If anyone could point me in the right direction, I would appreciate it! Thanks :)

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.

To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3343 / Virus Database: 3184/6367 - Release Date: 05/29/13


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3343 / Virus Database: 3184/6359 - Release Date: 05/26/13

David Goodenough

unread,
May 30, 2013, 5:18:38 AM5/30/13
to beagl...@googlegroups.com
If you are in Europe, 8devices.com sell a USB2CAN device for about 50 Euro.

David

Brent

unread,
May 30, 2013, 7:43:34 PM5/30/13
to beagl...@googlegroups.com
James,
 
I attached two pictures that show what my "cape" looked like.  Two of the wires are broken, and because I don't have a use for it anymore, I don't plan on repairing it.  I used a SN65HVD231D (http://www.digikey.com/product-search/en?lang=en&site=us&KeyWords=SN65HVD231D&x=0&y=0) CAN transceiver and actually got it for free from TI if you order samples.  The wiring is pretty straightforward... connect P9.26 to pin 1, and P9.24 to pin 4.  Then your CANH and CANL get wired to the right pins on your ODB II connector.  That's really all that is required for the hardware, but let me know if you have other questions.
IMG_20130530_171712.jpg
IMG_20130530_171723.jpg

Mark Lazarewicz

unread,
May 31, 2013, 8:30:46 AM5/31/13
to beagl...@googlegroups.com
This is a tranciever chip wired to a connector where is the connection to the Bone the header you mentioned

--- On Thu, 5/30/13, Brent <bren...@hotmail.com> wrote:
-brent

Brent

unread,
May 31, 2013, 8:37:01 AM5/31/13
to beagl...@googlegroups.com
Look at the second picture.  On the back of the perf board is a 2 row header that connects 3.3V, GND, dcan1_tx, and dcan1_rx.  I did not bother making a header for all 46 pins on the bone... only the ones I needed.

xtre...@gmail.com

unread,
Jun 18, 2013, 1:37:45 PM6/18/13
to beagl...@googlegroups.com
Hi Brent,

Can you elaborate on how you did do to initialize the can on kernel? 
Any guide as James request would be really helpful.

Which kernel did you used? 3.2.x or 3.8.x?

I'm developing a similar solution for a CAN interface, no EEPROMs.

Cheers,
Paulo

jaso...@gmail.com

unread,
Aug 14, 2013, 5:39:33 AM8/14/13
to beagl...@googlegroups.com


Someone has communicated with CANbus sensor without any extra transceiver using built-in CANbus,
device tree descriptor need to be edit, but I was not successful following the tutorial.  I can not found the CAN device after restart

http://www.aero-box.co.uk/beaglebone-black#TOC-Enable-CANbus-device

Johan Henselmans

unread,
Aug 14, 2013, 9:56:11 AM8/14/13
to beagl...@googlegroups.com, jaso...@gmail.com


On Wednesday, August 14, 2013 11:39:33 AM UTC+2, jaso...@gmail.com wrote:

Someone has communicated with CANbus sensor without any extra transceiver using built-in CANbus,
device tree descriptor need to be edit, but I was not successful following the tutorial.  I can not found the CAN device after restart

http://www.aero-box.co.uk/beaglebone-black#TOC-Enable-CANbus-device


I think you are misinterpreting the blog: if you look carefully at the picture you'll see he has 4 wires coming from the canbus: 2 for power and ground, the other 2 voor CANBUS. These two wires go to a chip, which will probably be the Canbus tranceiver.
 

Calc

unread,
Aug 14, 2013, 12:43:35 PM8/14/13
to beagl...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages