Aurix CAN setup in cpp file


I was able to set up the socket cans(can0/can1) in cpp file like below for drive xavier, and made them working. But I do not know how to set up the aurix can in cpp file. Can anyone give me an example?

My setup for the socket can in cpp file:

#define command “sudo ip link set can1 type can bitrate 500000”
#define up “sudo ifconfig can1 up”
#define up “sudo ifconfig can1 down”



params.protocol = “can.socket”;
params.parameters = “device=can1”;


Hi Phil.Chen,

Please try with and refer to its source code under /usr/local/driveworks/samples/src/sensors/canbus/logger. Thanks!

Thank you VickNV!

After I went through the files you provided, I am able to send can msg via aurix can now. However, I am not able to receive msg via aurix can. Would you please give some hint? Many thanks!

here is my setup for aurix can
params.control = “can.aurix”;
params.parameters = “ip=,bport=50000,bus=a”;

Please run with config-file=/usr/local/driveworks/data/samples/sensors/can/EasyCanConfigFile.conf and refer to Drive_AGX_EB_AURIX_Software_UserGuide.pdf in ~/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/drive-t186ref-foundation/utils/scripts/ for the configuration.

Thank you VickNV! It works!