Simple testing with CAN utils

Colibri iMX6DL 512MB IT v1.1B
Colibri Evaluation Board

Hi guys,
I was going through the CAN documentation and noticed few problems:

  1. cansend can0 123#deadbeef doesn’t work:
colibri-imx6-10866289:~/EmeraBlockEnergyBox$ cansend
-sh: cansend: command not found
  1. candump doesnt work

colibri-imx6-10866289:~/EmeraBlockEnergyBox$ candump can0
-sh: candump: command not found

Did I miss a step to install these utilities, or do I have a bad $PATH?

# echo $PATH
  1. Earlier on there are instructions:
# docker load -i can-torizon-sample.tar

After the load, you can check that the image is in the system:

# docker image ls
verdin-imx8mm-06612136:~$ docker image ls
REPOSITORY                   TAG                 IMAGE ID            CREATED             SIZE
can-torizon-sample           latest              5ea7a31bf664        About an hour ago   203MB

Now that we have our customized container image for CAN in our target system, we can execute it.

$ docker run -it --rm --name=can-test --net=host --cap-add="NET_ADMIN" \
        -v /dev:/dev -v /tmp:/tmp -v /run/udev/:/run/udev/ \

In this last step the prompt is $ not #. Is that a typo? I assume you cant run this from the PC, but rather on the target (iMX6) computer right?

Greetings @leighjboyd,

It’s not clear to me, are you executing cansend/candump inside a container or on just base TorizonCore?

The example container for the documentation you are referencing installs can-utils inside the container to provide these commands. These commands are not available by default on base TorizonCore outside of a container.

Best Regards,

Sorry, I didn’'t read the comments in the dockerfile

I needed arm32v7 for iMX6

also note there seems to be some missing text here.

$ docker run -it --rm --name=can-test --net=host --cap-add="NET_ADMIN" \
        -v /dev:/dev -v /tmp:/tmp -v /run/udev/:/run/udev/ \

should say:

$ docker run -it --rm --name=can-test --net=host --cap-add="NET_ADMIN" \
        -v /dev:/dev -v /tmp:/tmp -v /run/udev/:/run/udev/ \

Glad it was just a simple issue.