cd /lib/modules/3.4.104/
ln -s /root/linux-bananapi build
cd ~
Get Can4Linux and build it:
svn checkout https://svn.code.sf.net/p/can4linux/code/trunk can4linux-code
cd /root/can4linux-code/can4linux/
make TARGET=BANANAPI
Install module for each startup of the board:
insmod can4linux.ko
cp can4linux.ko /lib/modules/3.4.104/kernel/net/can/
depmod -A -v
modprobe -v can4linux
echo "" >> /etc/modules ; echo "can4linux" >> /etc/modules
reboot
Build CAN example
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:
python pyCan-example.py
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.
BPI-M1 CAN Bus
21
Summary of Contents for BPI-M1
Page 5: ...BPI M1 hardware 5...
Page 6: ...BPI M1 hardware interface Hardware interface BPI M1 hardware interface 6...
Page 7: ...BPI M1 hardware interface 7...
Page 8: ...hardware interface BPI M1 hardware interface 8...
Page 14: ...BPI M1 GPIO Pin define 14...
Page 19: ...please note value 0 value 1 press is 1 unpress is 0 BPI M1 IR interface 19...
Page 35: ...now we test UART2 setting as below save BPI M1 UART interface 35...
Page 37: ...4 test function BPI M1 send hello pc BPI M1 receive hello Ok BPI M1 UART interface 37...
Page 39: ...BPI M1 UART interface 39...
Page 44: ...BPI M2 RoHS Certification BPI M1 CE FCC RoHS Certification 44...
Page 45: ...BPI M1 CE FCC RoHS Certification 45...
Page 46: ...BPI M1 BPI M1 software 46...
Page 64: ...Compulsive modification of HDMI output resolution Linux kernel 3 4 image 64...
Page 96: ...Reference documents Reference documents 96...
Page 110: ...BPI 4 0 customized Server 110...