CAN Linux Apalis

Hey guys,
I’m searching for some code that allows me to set up the CAN-Interface. I want that the received Data is written to a .txt file. Could you help me?

hi @Michael_I

For setting up the CAN Interface on the module, you can read this article.
For redirecting the CAN messages to a File, you can use candump -o outfile.txt.

Best reagards, Jaski

How could i realize that in a C-Script? I want that the new message is appended to the txt-file.

Thanks Michael

Hi

You can use the Socket-Can Code in a C file and then write new messages to a txt file using C or u can do a system call of candump in C and write the output to a text file using C.

What do I have to do to send the received messages (CAN0) on CAN1?

The easiest will be to save the messages from CAN0 to a file and then send them over CAN1 out.

Hi @jaski.tx , i know is two years later but what if candump returns “command not found?”
I am trying to use the can of the apalis imx6 mounted on the ixora and it appears the canutils are not installed by default?

cheers and thanks in advance!

What exact hardware (module and carrier board) and software versions of things are you talking about?