Tools/Linux/CanBus

(Difference between revisions)
Jump to: navigation, search
(Enable the bus)
Line 35: Line 35:
 
== Enable the bus ==
 
== Enable the bus ==
 
<source lang="bash">
 
<source lang="bash">
sudo ip link set can0 type can bitrate 125000 up
+
sudo ip link set can0 type can bitrate 125000
 
sudo ifconfig can0 up
 
sudo ifconfig can0 up
 
</source>
 
</source>

Revision as of 08:37, 22 December 2017

Contents

Example using the (CAN-) LiftEBS, tested on ubuntu 16.04.3 LTS.

Tested using Microchip CAN bus analyser (APGDT002), and the custom firmware from github. The custom firmware enable remote frame and does not prevent using the microchip tools.

Hardware dependant part

mcba_usb : drivers for Microchip CAN bus analyser (APGDT002)

This driver has been included in Linux 4.12, so it should be supported out of the box. For other kernels, use this procedure: (Tested on ubuntu 16.04.3 LTS and Raspbian stretch 2017-11-29).

Raspbian

sudo apt-get install raspberrypi-kernel-headers

Ubuntu

Install the latest HWE kernel (HWE kernel).

driver

cd ~ && mkdir -p git && git clone https://github.com/rkollataj/mcba_usb.git
make -C /lib/modules/$(uname -r)/build M=$(pwd) modules
sudo make -C /lib/modules/$(uname -r)/build M=$(pwd) modules_install

Custom compiled modules won't load with secure boot enable!

Install the tools

sudo apt-get install can-utils

Enable the bus

sudo ip link set can0 type can bitrate 125000
sudo ifconfig can0 up

Dump the CAN bus traffic

candump can0

Request lift id

cansend can0 7ff#
Personal tools
Namespaces
Variants
Actions
Navigation
Browse
Toolbox