- Muchas notas - Fran Acién

20240308 - OBC - Workshop 1 - Sending our first CAN packet

For this example we are going to use:

  • The OBC
  • The EPS, just for powering
  • uCAN usb Interface

The objective of this guide is to send our first CAN packet.

Connect and configure the uCAN usb interface in your linux computer

To enable the uCAN interface in your linux you need to do:

$ sudo ip link set can0 up type can bitrate 500000
$ sudo ifconfig can0 up
$ candump can0

With candump you will see all the CAN messages in the network.

Power on the OBC

  • Connect to the UART interface
  • Wait until you can access the console
  • Stop the OBC software that is started at boot: systemctl stop obc_startup.service
  • Then send a sample message from the obc: cansend can0 5A1#00.01.02.03.04

You will be able to see the message in you computer as:

candump can0
  can0  5A1   [5]  00 01 02 03 04