Socket CAN Sending Incorrect Messages

I have managed to get everything to run smoothly as intended. My bug has been resolved.

My jetpack version is 6.0+b106 .

My testing setup is as follows.

cantransmit.c is a common test file for testing the socketcan c package. I found it included in a git repo to test motors. You can find cantransmit.c here.
https://github.com/craigpeacock/CAN-Examples

I modified the address and message to make the lowest level motor controller I could for debugging purposes.

My problem lied in the provided can.h dependency of socketcan provides a struct can_frame.

https://docs.kernel.org/networking/can.html

This frame has ID,DLC, message, and padding bytes.

My problem was one of these padding bytes __pad was set high instead of low and this caused the candump to read off the B and E flags, confused the scope, and stopped the motor from recognizing the message. After sending several unreceivable messages, the bus would fill with traffic and this would crash the bus.

The solution is to set the padding frame low.

struct can_frame frame;

frame.__pad = 0x00; //set padding low

frame.can_id = 0x00B ; //set ID
frame.len = 8; //set dlc

CAN send uses low bytes for padding by default so that is why it works with no issues but using c socketcan it will fail. I hope this can save someone a few days of debugging time :)