EBC Exercise 34 canbus

From eLinux.org
Jump to: navigation, search

thumb‎ Embedded Linux Class by Mark A. Yoder

Note: Work in Progress

Following tutorial from https://github.com/digitalbond/canbus-beaglebone

Note that I am using a Beagle Bone Blue, rather than black. The Blue has the differential driver (CAN transceiver) built in, so it can connect directly to a car without additional active hardware.

Installing can-utils

socketcan is a powerful library that is can be used to interface with CAN devices with relative ease. It may be pre-installed on your bone image, but if its not, run the below:

bone$ apt-get install mercurial
bone$ apt-get install can-utils

With can-utils installed, socketcan should be installed for Node:

bone$ npm install -g socketcan

Ensure that it was installed correctly:

bone$ node
> var can = require('socketcan');
> can

If object is displayed, all is well.

thumb‎ Embedded Linux Class by Mark A. Yoder