Can bus_communication_question list

Hi, I am using V3.6. I purpose is to connect 2 Odrives with my Raspi .

  1. Data definition table
    Where can find command data definition?
    for example:
    I found in source code example.
    is there any table which show 0x08 = closed loop control?
    I found the command ID table in Doc. but nor find the data definition table.

2.Node ID problem
should we also also set Raspi node ID?
I hope 2 Odrives send back their pos to my Raspi when after they arrive their request pos,
it means each Odrives will send to the same ID(Raspi), it will cause conflict??

  1. connection
    I want to using raspy to connect 2 odrives.
    is it a correct cable connection below?

  2. can_helper.hpp
    do you provide a demo about how to use can_helper.hpp, because I want to use Arduino&cpp to
    communicate with Odrive.

  3. can_ID
    I found on other website, they use 0X207 as Can_id, node_id is 0x02, cmd_id is 0x07
    that is very confused for me, if node_id is 0x02, cmd_id is 0x07, so 0x02<<5|0x07 will be 0x47 but not 0x207, is there any misunderstand on this.



  1. Yes, in the docs. The enums have been updated over the years to be AxisState.CLOSED_LOOP_CONTROL.
  2. No, the ODrives are not sending data “to” the raspi, they are putting messages on the bus, it is up to the raspi script to filter and process these.
    To get the encoder position you can either:
  • Request Get Encoder Count with node_id << 5 | 0x00A (make sure you set the RTR bit)

    • These messages are call & response. The Master node sends a message with the RTR bit set, and the axis responds with the same ID and specified payload.
  • Alternatively, all “Get_” messages are cyclic, so you could just set encoder_count_rate_ms.

  1. Nothing looks wrong, but it is also very important to get the grounding right. Please refer to our wiring diagram for more details.

  2. Not that I am aware of, you can checkout this repo to see it in use though.

  3. Yes, 0x02 << 5 | 0x07 = 0x47 is the correct message ID, it looks like this other website simply concatenated 0x02 and 0x07, which is wrong.

1 Like

Hi, Nicholas ,
thanks a lot!!!

there is some update and some problem.

I bought a can_to_usb device to connect the Odrive with PC to test the heartbeat message, if I can receive.
but there is no message from odrive to can_hat.
I used a software named “cangaroo” to monitor in PC.

this is the layout

this is configuration in odrive and cangaroo

this is no receive message

for check the reliability of my can_to_usb, I used my arduino_mcp2515 to communicate this can_to_usb, it really works, so I had a little lost in this point.


I am not seeing a common ground in the image with the ODrive, where is the “System Ground Star Point” that connects to DC-?

thanks Nicolas,

for the problem 5, yes, the website made a mistake, they set odrive id =0x010,(which is hex) but they mention set ID=2, this is wrong, ID should =16( in dec). hope it can help other dudes.

1 Like

Thanks Nicholas,

first of first, I changed cables, and everything is working. It could be cable problem.

but I still not use the common ground point, but the connection works, just give you feedback about this.


Okay cool, I’m glad its working now.
Not having the common ground point will impact the reliability though, make sure this is connected before going too much further.

Hi, Nicholas,

thanks for your advice. Today I successfully communicate between arduino uno (with mcp2515 library) and odrive.

I can get cyclic message, and I can set pos to ordive as well.

below is the picture for other dudes.

next step is I want to use your can_helper.cpp as standard way to parse the message from can_bus.

1 Like