BPI-R1 CAN Bus
In order to port can4linux to the BananaPi, the CAN module description is needed from the A20 hardware manual. can4linux is a character-driver-based Linux driver used already on desktop PCs and embedded platforms like Freescale FlexCAN (the i.MX series of micro controllers) or Xiliny Zynq.
There is a more detailed document about CAN on the A20 at https://dl.linux-sunxi.org/A20/CAN Bus1.pdf
This is a tutorial for using CAN BUS on bananapi with bananian 15-01
Thank selqcir share this example:
Download and install "bananian-1501.img" into 8 GB SDCard.
Expand the root file system using "bananian-config"
Install missing package:
Get last bananian available, and continu to install missing package:
Build kernel:
Exit without saving when menu appears
At this step, kernel should be compiled and "Module.symvers" should be available
Then rename modules and firmware provide by Bananian, and replace by the new one.
Same for uImage:
Create link for further build:
Get Can4Linux and build it:
Install module for each startup of the board:
Build CAN example
Update CAN speed and device in file "pyCan-example.py"
ex:
Connect CAN transceiver and CAN bus, and check with for example:
That's all
With this method, kernel version is "Linux bananapi 3.4.104" instead of "Linux bananapi 3.4.104+", because i was unable to find same sources than Bananian 15-01 , but CAN bus work !
Feel free to comment or update.
Last updated