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.
apt-get install swig
apt-get install python-dev
cd can4linux-code/can4linux-examples/
Update CAN speed and device in file "pyCan-example.py"
ex:
# setting the device number
device = 0
defaultBaudrate = '250'
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 !