User Tools

Site Tools


pi:bananapi-en

BananaPi SocketCAN

Introduction

Model M1 and M1+ have the CAN Bus integrated on the board and connected the GPIO pins 16 and 18.


Armbian Setup

Hardware

The CAN Bus must be activated.

sudo armbian-config


Network Interfaces

Modify the following file as super user, sudo, with a text editor of your choice.
/etc/network/interfaces

Add the following lines to the end of this file: (The comment line '#' is optional.)

# CAN Interface
auto can0
iface can0 inet manual
        pre-up /sbin/ip link set $IFACE type can bitrate 125000 restart-ms 100
        up /sbin/ifconfig $IFACE up
        down /sbin/ifconfig $IFACE down

The bitrate must be set to 250000 in case of CAN-CS2. (TrackBox)


pi/bananapi-en.txt · Last modified: 2019/01/17 20:16 (external edit)