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-R1 CAN Bus
17
Содержание BPI-R1
Страница 5: ...BPI R1 hardware interface BPI R1 hardware interface Front Back BPI R1 hardware interface 5...
Страница 6: ...Hardware connect sketch map Front Back BPI R1 hardware interface 6...
Страница 7: ...BPI R1 hardware interface 7...
Страница 8: ...BPI R1 hardware spec BPI R1 hardware spec 8...
Страница 14: ...J13 P01 UART0 RX PB23 J13 P02 UART0 TX PB22 BPI R1 GPIO Pin define 14...
Страница 28: ...please note value 0 value 1 press is 1 unpress is 0 BPI R1 IR interface 28...
Страница 41: ...BPI R1 RoHS Certification BPI R1 CE FCC RoHS Certification 41...
Страница 42: ...BPI R1 CE FCC RoHS Certification 42...
Страница 43: ...BPI R1 Software BPI R1 support linux android and openwrt system BPI R1 Software 43...
Страница 59: ...Linux kernel 3 4 BSP image 59...
Страница 76: ...BPI R1 OpenBSD BPI R1 booting OpenBSD current http www openbsd org armv7 html BPI R1 OpenBSD 76...
Страница 84: ...Reference documents Thank many user writer document for banana pi BPI R1 Reference documents 84...