SF Bay Music Tech

2017/01/14

BeagleBone Green: Enable CAN on Startup

Filed under: analog3,BeagleBone,CAN — Gan @ 6:03 PM

Three steps:

  1. Enable CAN overlay by configuring cape manager
  2. Configure network interface
  3. Install startup program

1. Enable CAN overlay

Add following line in /etc/default/capemgr

2. Configure network interface

Add following lines in /etc/network/interfaces

3. Install startup program

Setting the CAN interface to /etc/network/interface does not enable the CAN interface on startup for some reason. In order to workaround this problem, I installed a startup program as follows.

Following link was helpful:

Running a script on Beaglebone Black boot/ startup

The startup script to run on startup is as follows. This script also turns off wi-fi power management, thus I removed a cron entry I added before to disable the power management.

Following are the steps to create and enable a service that runs on startup.

  • Create the service
  • Edit the above file as necessary to invoke the different functionalities like network. Enable these only if the code needs that particular service. Disable unwanted ones to decrease boot time.
  • Create a symbolic link to let the device know the location of the service.
  • Make systemd reload the configuration file, start the service immediately (helps to see if the service is functioning properly) and enable the unit files specified in the command line.
  • Restart BBB immediately to see if it runs as intended.

 

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress