CAN Hacking: The In-vehicle Network

Last time, we discussed how in-vehicle networks work over CAN. Now we’ll look into the protocol and how it’s used in the automotive industry.

The Bus

On the hardware side, there’s two types of CAN: differential (or high-speed) and single wire. Differential uses two wires and can operate up to 1 Mbps. Single wire runs on a single wire, and at lower speeds, but is cheaper to implement. Differential is used in more critical applications, such as engine control, and single wire is used for less important things, such as HVAC and window control.

Many controllers can connect to the same bus in a multi-master configuration. All messages are broadcast to every controller on the bus.

An oversimplified in-vehicle network
An oversimplified in-vehicle network

Continue reading “CAN Hacking: The In-vehicle Network”

CAN Hacking: Introductions

We’re introducing a new series on CAN and automotive hacking. First, we’ll introduce CAN and discuss how in-vehicle networks work.

In 1986, Bosch introduced the Controller Area Network protocol. It was designed specifically for in-vehicle networks between automotive controllers. CAN became a popular option for networking controllers in automotive, industrial, and robotics applications. Starting in 2008, all vehicles sold in the US must use CAN.

Modern vehicles are distributed control systems, with controllers designed to handle specific tasks. For example, a door control module would take care of locks and windows. CAN allows these controllers to communicate. It also allows for external systems to perform diagnostic tasks by connecting to the in-vehicle network.

Some examples of CAN communication in a vehicle include:

  • The engine control module sending the current engine speed to the instrument cluster, where it is displayed on a tachometer.
  • The driver’s door controller sending a message to another door controller to actuate the window.
  • A firmware upgrade for a controller, sent from a diagnostics tool.

CAN is usually used with little or no security, except for the obscurity of the communications. We can use CAN to USB interfaces to listen to the traffic, and then decode it. We can also use these tools to send forged messages, or to perform diagnostic actions. Unfortunately, most of the tools for dealing with CAN are proprietary, and very expensive. The diagnostics protocols are standards, but not open ones. They must be purchased from the International Organization for Standardization.

Next time, we’ll get into the structure of CAN frames, and how traffic is encoded on the bus.

 [Image via Wikipedia]

CAN Hacking

Guest Rant: From Bits To Atoms

I’ve been a software developer for quite a while. When you spend long enough inside a particular world, it’s easy to wind up with an ever-narrowing perspective. You start seeing everything from a software point of view. As the saying goes, when your only tool is a hammer, you tend to treat every problem as NP-Complete. Or something. I forget how that goes.

Anyway, the point is, it’s always good to broaden one’s horizons, and solve as many different kinds of problems as possible. To that end, I started to get into hobby electronics recently. The journey has been very enlightening in a number of ways.

Continue reading “Guest Rant: From Bits To Atoms”

SparkFun Ponders Women In STEM Fields

sparkfun-ada-loveless-day

Tuesday was [Ada Lovelace] day and to recognize it SparkFun posted an article about women in their workforce and the STEM initiative. [Ada Lovelace] is credited with forging a path for women in mathematics and computing. The STEM acronym represents a movement to get more of America’s students into Science, Technology, Engineering, and Mathematics fields in order to keep up with the rest of the developed world. But part of the issue includes drastically increasing the interest of young women in these fields and their access to it. The thing is, I feel the same way about the community at Hackaday.

Obviously some of the biggest names in the hobby electronics and engineering enthusiast industry are women. The name that seems to top lists is always [Limor Fried] who you may know better as [Lady Ada]. She founded Adafruit industries. But there are couple of other notables that stick out in our minds. [Jeri Ellsworth] has been huge name around here forever. Just this week Hackaday was celebrating the Kickstarter for her latest project. [Becky Stern] has had a ton of awesome project featured, mostly in conjunction with her work at Adafruit but her knitting machine hack when she was with MAKE has always stuck out in our minds. And of course, there’s [Quinn Dunki] who has long been building her own 6502 computer from the ground up (Incidentally we’re running a Guest Rant from her at midday on Friday).

What I’m missing is the grass-roots hacks from women. I know they’re out there because I see them at monthly meetings at the local hackerspace. We featured [Caroline’s] bathymetric book, and [Robin]’s collaboration that produced solar powered supercap jewelry. Both are members of Sector67.

So I call for all Hackaday readers to make this a friendly environment for anyone who wants to participate. If you’re a female reader who has been lurking around rather than sending in links to your gnarly hacks please take the plunge and send us a tip! If your female friends have awesome projects, offer to help them document it for a feature. You may not have thought of it, but sharing your projects makes you a role model for young readers.

By trade I’m an orchestra musician — a field that was completely closed off to women until well into the last century. While gender equality hasn’t been reached in all orchestras, the Regional Orchestras I have and do play with, show equal representation of gender throughout. Let’s make the same thing happen with STEM!

HaDuino: Open Your Beer Using Arduino

Frankly we’re tired of Arduino having a bad name here at Hackaday. So [Brian Benchoff] came up with a way to make it useful to a wider audience. His creation, which we call the HaDuino, lets you use the Arduino clone to open a tasty bottle of beer.

Continue reading “HaDuino: Open Your Beer Using Arduino”

Hackaday Hackerspace Henchmen == Free Stuff For You

2013-10-01_Hackaday_Hackerspace_Henchmen_banner-580x200

Are you a member of your local Hackerspace? Do you want some free stuff? Then you need to become one of the Hackaday Hackerspace Henchmen.

Hackerspaces are amazing places full of smart people pulling off delightful hacks. But often the outside world doesn’t hear about them. When a member completes a project they show it to the other members, quenching the need to share the awesomeness and ridding them of the drive which normally prompts someone to publish a post about it. We want to see what you’ve been up to at your Hackerspace, and making it public will help in sharing ideas between Hackerspaces. Send us the details and we’ll thank you with some swag in return, and with a few special rewards for the most exception hacks. Keep reading for prize details and how this is all going to work.

Continue reading “Hackaday Hackerspace Henchmen == Free Stuff For You”