Using CANopen on BBB

Hello everyone,
I am searching for information on how to use CAN on the BBB across the internet and all the guides i could find won’t work for me.
I do all the installation and all, but when i check to see the slots i don’t get anything, it’s like the beagle hasn’t configured the ports.
the virtual can bus works, so the drivers are ok… i did the overlay for the BB-DCAN1, compiled it, and still nothing.
the closest i came to know something is right is when i use “dmesg | tail -n15” and get:

[ 2860.034007] [drm:output_poll_execute], [CONNECTOR:5:HDMI-A-1] status updated from 1 to 1
[ 2870.064202] [drm:output_poll_execute], [CONNECTOR:5:HDMI-A-1] status updated from 1 to 1
[ 2880.095569] [drm:output_poll_execute], [CONNECTOR:5:HDMI-A-1] status updated from 1 to 1
[ 2890.126698] [drm:output_poll_execute], [CONNECTOR:5:HDMI-A-1] status updated from 1 to 1
[ 2900.157938] [drm:output_poll_execute], [CONNECTOR:5:HDMI-A-1] status updated from 1 to 1
[ 2907.178285] bone-capemgr bone_capemgr.9: part_number ‘BB-DCAN1’, version ‘N/A’
[ 2907.178475] bone-capemgr bone_capemgr.9: slot #11: generic override
[ 2907.178526] bone-capemgr bone_capemgr.9: bone: Using override eeprom data at slot 11
[ 2907.178579] bone-capemgr bone_capemgr.9: slot #11: ‘Override Board Name,00A0,Override Manuf,BB-DCAN1’
[ 2907.178850] bone-capemgr bone_capemgr.9: slot #11: Requesting part number/version based 'BB-DCAN1-00A0.dtbo
[ 2907.182418] bone-capemgr bone_capemgr.9: slot #11: Requesting firmware ‘BB-DCAN1-00A0.dtbo’ for board-name ‘Override Board Name’, version ‘00A0’
[ 2907.182517] bone-capemgr bone_capemgr.9: slot #11: dtbo ‘BB-DCAN1-00A0.dtbo’ loaded; converting to live tree
[ 2907.183160] bone-capemgr bone_capemgr.9: slot #11: #2 overlays
[ 2907.183385] bone-capemgr bone_capemgr.9: slot #11: Applied #2 overlays.
[ 2910.189201] [drm:output_poll_execute], [CONNECTOR:5:HDMI-A-1] status updated from 1 to 1

this is half right as far as i could see in the installation guides.

my goal is to set up the DCAN1 with pins P9_24 and P9_26 permanently so i wouldn’t have to go to the terminal and do the “echo” thing every time i boot the beagle.
does anyone have a simple guide for beginner like me? or could talk to me via the email (my mail is: jacksonist.lugi@gmail.com) and guide me? that would be awesome.

by the way, i am going to send and receive that data with python-can. anyone has experience with it? how to init the can bus before using the send and recv of CAN messages?

any help would be blessed, i am stuck after trying everything and not succeeding… i couldn’t get it to work.

thanks! :slight_smile:

On my debian installation, to use CAN on P9_24 and P9_26 I used the provided BB-CAN1-00A0.dts file in /lib/firmware (source: https://github.com/RobertCNelson/bb.org-overlays/blob/master/src/arm/BB-CAN1-00A0.dts). Enable it on startup by adding “cape_enable=bone_capemgr.enable_partno=BB-CAN1” to /boot/uEnv.txt

This was a couple of weeks ago, so correct me if I am wrong, but i also used one of these commands to get it online:

`
ip set dev can0 up
ip link set can0 up type can bitrate 500000

`

Note that you need an external transceiver like SN65HVD231 or mcp2551 to actually connect it to a can-network.

I had another candevice send some messages and used the following to dump all traffic to the terminal:

`
candump -cae can0,0:0,#FFFFFFFF

`

I dont remember if I had to load the kernel modules or if they where automatically loaded, but just in case, if nothing is working, try this:

`

sudo modprobe can
sudo modprobe can-dev
sudo modprobe can-raw

`

mandag 1. august 2016 16.29.48 UTC+2 skrev Dror Lugasi følgende: