CAN Error Code and No Response on RTR Request

I’ve got an Arduino Due hooked up to my ODrive 3.6/24V trying to send a request for encoder position estimates over CAN. So far, I haven’t been able to successfully get a response back from the ODrive and occasionally, an error code shows up: odrv0.can.error = 0x0001. Is there documentation describing CAN error codes?

I’m able to read and print the heartbeat messages from the ODrive on the Arduino so I’m thinking there’s a problem with the transmission of the request frame. All I’m setting is the ID and RTR bit as such (using the due_can library): = (0x01 << 5) + 0x009;
outgoing.rtr = 0x01;

I’ve read in other threads about people needing to have different baud rates on their Arduino and ODrive due to the Arduino having a slower clock speed than the ODrive. Could that be the case for this situation since the Due runs at 84 Mhz and I assume the ODrive runs at 16 Mhz based on other posts. I currently have both set to 250K for baud rate.

Any help is greatly appreciated.

If you can get the heartbeat then probably not a baud rate problem. What DLC are you setting for the request?

I’m sorry but I don’t know what the DLC is/what it stands for.

DLC is the Data Length Code. Maybe called length or len on your library?

Ah I see. Yes for due_can one would use <CANFRAME>.length to define it. I was under the impression that I didn’t need it for a data request, so I don’t have it set. Should I be setting it to 8?

Set it to 0, i assume that’s the default but double check

No change when setting length to 0.

Additional information/question:

Should I be setting a specific priority when sending the request? I’ve tried not setting one and setting it to 0 but it had no effect in either case.

The heartbeat gives the following data. I’m not sure if there’s anything relevant to the issue here but figured I mention it just in case.

ID: 0x21 Len: 8 Data: 0x0 0 0 0 8 0 0 0