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.
Update CAN speed and device in file "pyCan-example.py"
ex:
1
# setting the device number
2
device = 0
3
defaultBaudrate = '250'
Copied!
Connect CAN transceiver and CAN bus, and check with for example:
1
python pyCan-example.py
Copied!
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 !