Can on torizoncore 6

Hi, I am using the new Apollox extension and am trying to get CAN to work. I followed the version 5 work, and i do see can0 and can1 with the ip command. but if I try to set the bitrate, I get an error:

ip link set can0 type can bitrate 500000
ip: either “dev” is duplicate, or “type” is garbage

Also, I get an unusual return when I use the show command

ip link show can0
can0: mtu 16 qdisc noop qlen 10
link/[280]

Is there something else I should be doing?

Thanks,
Steve

Greetings @Evets,

First of all what specific version of TorizonCore do you have on the module?

Also are you running the ip command in a container or on the host outside of any container?

Best Regards,
Jeremias

Torizoncore 6.
I was running it just by sshing into the board, and then I realized my mistake.
So I have the command working and it says it is up. However, I still do not see any activity on the lines when I send, using cantools and I don’t see any error coming back either. if I have another shell open with candump can0, I don’t see any output there either.

You’ll need to describe your test setup here in more detail otherwise we can only guess at what might have went wrong.

OK. According to the documentation for the Verdin Dev Board, CAN0 (software name, says CAN1 on the board) comes out on X59, pins 3 & 4, and CAN1 comes out on X60, pins 3 & 4. Both CAN LEDs are on and the CAN0 and CAN1 show up.

So, using cantools, I type:

cansend can0 123#deadbeef

And watch my scope for signal changes on pin4 of X59. I see no signal there. Same with CAN1 when I use the tools. I get no errors with the command.
I am running as user torizon, since I don’t know the password for root.

Any suggestions?

Thanks!
Steve

Okay so you have 1 CAN interface hooked up to the other. Sending messages on one to receive on the other, correct?

Assuming everything is configured and connected correctly, can you try probing the CAN signals on X4 instead? The CAN pins from the SOM should be connected directly on X4 if you take a look.

Best Regards,
Jeremias

It turns out that you can’t set the bitrate to 500000 (as stated in How to Use CAN on TorizonCore (toradex.com), as it won’t send anything. It has to be 1000000. I see the signals where I expect to.

Glad you were able to get things working!