Canbus Configuration for linux and tegra TK1

Hi All!

I am trying to develop an application with canbus in ixora, apalis tegra TK1 and linux embedded in toradex. I use as kit Microchip MCP2515 CAN Bus Monitor Demo Board. I need to be able to send and receive frames.

I have configured in different ways. Next, I write them.

ip link set can0 type can
ip link set can0 type can bitrate 125000
ip link set can0 type can bitrate 125000 triple-sampling on

Then for turn on network

ip link set up can0

[upload|s55kwLrykL7H9f/4shABh7JxXsQ=]

If I send the following command

cansend can0 012#11223344AABBCCDD

I receive only 4 data on frame.

Also I receive thousands of frames per second and the bus load is 100%.

[upload|X2WzKSOgOHs/NAN4uJcvGllYrN0=]

if I write in the terminal

candump can0
interfase=can0, family = 29, type = 3, proto = 1

I do not receive data. Please help me. Thank you.

cansend on our BSP uses different command structure:

root@apalis-tk1:~# cansend
Usage: cansend [<can-interface>] [Options] <can-msg>
<can-msg> can consist of up to 8 bytes given as a space separated list
Options:
 -i, --identifier=ID    CAN Identifier (default = 1)
 -r  --rtr              send remote request
 -e  --extended send extended frame
 -f, --family=FAMILY    Protocol family (default PF_CAN = 29)
 -t, --type=TYPE        Socket type, see man 2 socket (default SOCK_RAW = 3)
 -p, --protocol=PROTO   CAN protocol (default CAN_RAW = 1)
 -l                     send message infinite times
     --loop=COUNT       send message COUNT times
 -v, --verbose          be verbose
 -h, --help             this help
     --version          print version information and exit

equivalent to your cansend would be cansend can0 -i 0x012 0x11 0x22 0x33 0x44 0xAA 0xBB 0xCC 0xDD

You’re seeing multiple re-transmissions because there is nothing on the bus that acknowledges that packet.