Kvach
Posts: 9
Joined: Mon Dec 23, 2013 5:32 pm

can-utils cansend not working

Wed Mar 02, 2016 9:33 pm

Hey, guys. I have setup PI 1 with tj1050 (mcp2315).
On board 8Mhz oscillator so in /boot/config.txt I`ve added some lines.
# Added for SPI-mcp2515
dtparam=spi=on
dtoverlay=spi-bcm2835-overlay
dtoverlay=mcp2515-can0-overlay,oscillator=8000000,interrupt=25

I got working candump, cansniffer, but when I send through cansend nothing happens. About can-utils very little info across an internet.
What did I miss? Can u help?

MikeBolton
Posts: 12
Joined: Tue Nov 11, 2014 3:09 pm

Re: can-utils cansend not working

Thu Apr 28, 2016 9:29 am

I have a RPi B+ with the latest Raspbian (4.1.13+)

The can interface is set up as usual. MCP2515 clock is 16000000. If I send CAN frames to the 2515, I get a CAN frame echo so looks as if the 2515 is working.
Cansend and candump do not work. I get
-bash: candump: command not found or -bash: cansend: command not found.

If I try "sudo apt-get install can-utils" it says
E: Unable to locate package can-utils.

The Pi is Internet connected. Is "can-utils" no longer available?

Mike B

MikeBolton
Posts: 12
Joined: Tue Nov 11, 2014 3:09 pm

Re: can-utils cansend not working

Thu Apr 28, 2016 7:51 pm

As a follow-on from the above posting, I have found that some versions of the Raspbian-Wheezy packages from the raspberrypi site do not include the 'can-utils' files. Doing an apt-get update doesn't help and might indicate that later versions are missing files that were in earlier versions.
I had to get the can-utils from the github site. (with some help from a friend)

git clone https://github.com/linux-can/can-utils.git
cd can-utils
make
sudo make install

This put the can-utils files in the root directory of my Pi. Now candump, cansend etc all work fine.

Beware of updates !! My Wheezy is 4.1.13+. Seems this is the latest for a Pi B+. It does not have the can-utils.

Mike B

galicin
Posts: 11
Joined: Wed Dec 09, 2015 3:47 am

Re: can-utils cansend not working

Thu Nov 30, 2017 4:52 pm

I have the same issue - I got working candump, cansniffer, but when I send through cansend there are errors in sent bits!

Return to “Advanced users”