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-beaglebone
I 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.


Am Dienstag, 20. Januar 2015 17:05:25 UTC+1 schrieb Pedro Bueno de Castro:
>
> I am starting working with the BBB in order it receive and send CAN 
> messages in a University project that I`m developing. I have read a lot and 
> a few questions are still confusing me.
> 1) In the project I plan to make my own cape and as far as I understood 
> the BBB has native CAN, so I would have only to add the transceiver to my 
> cape and the other necessary stuff. Right?
> 2) I am confused where the SocketCAN comes in. Do I have to enable CAN in 
> my BBB or SocketCAN already does that? Or is it above another layer that 
> takes care of the hardware part?
> Thanks in advance for your time
>
> -- 
> Pedro Corrêa Bueno de Castro
> Diretor de Telemetria
> Unicamp E-Racing
> +55 19 996068768
> www.unicamperacing.com
> www.facebook.com/unicamperacing
>
> 

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to