Hi,
I also started a project using CAN on BBB. I am surprized how many people work at the same time for same topic :)
I succesfully implemented it by following this page:
http://www.koervernet.de/hausautomatisierung/97-beagleboneI have
ISO1050 from TI as CAN Transciever.Because it is in german, I try to summirize all.
1. CAN2 can not be used directly because it is muxed with other Bus I2C. Therefore CAN1 is activated but since it is the "first" activated CAN interface, we will speak with it as CAN0 in linux.
2. Compile device tree source using this command: dtc -O dtb -o BB-DCAN1-00A0.dtbo -b 0 -@ BB-DCAN1-00A0.dts . You can download that file from that page.
3. Copy the dtbo file into /lib/firmware using this command: sudo cp BB-DCAN1-00A0.dtbo /lib/firmware
4. Load it: sudo modprobe can,
sudo modprobe can-dev,
sudo modprobe can-raw
5. Activate it: echo BB-DCAN1 > /sys/devices/bone_capemgr.*/slots
6. Start it with 125kBit/s: sudo ip link set can0 up type can bitrate 125000,
sudo ifconfig can0 up
7. Check if it is up: sudo ifconfig, in the first place you should see the can0 interface.
8. Install SocketCAN if you don't have: svn co svn://
svn.berlios.de/socketcan/trunk,
cd trunk/can-utils/,
make, cd /home/socketcan/trunk/can-utils/
9. Now you can send with cansend: ./cansend can0 5A1#1.2.3.4.5
10. You can dump can network: ./candump can0
I hope this helps you.
Regards.