Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To discover your CAN bus interface name, please run ‘ ip link show ’.

...

3. To start testing the CanBUS

...

, you have to install the can-utils package by running:

Code Block
sudo apt-get install -y can-utils 
  • For more information, please follow the  CAN-Utils, which are available for Debain/Ubuntu etc.

Example commands:

Sending:

Code Block
cansend can0

Receiving:

Code Block
candump can0

34. To print all data received by CAN interface to “can_test” file (for ex):

Code Block
candump can0 >> /tmp/can_test &

45. Send data on to the CAN bus by executing (for ex):

Code Block
cansend can0 "123#1234"

56. Check received data by opening “can_test” file:

Code Block
cat /tmp/can_test

...

Test RS-485 communication

An example for testing RS485 communication:

Code Block
rs485conf -e 1 /dev/ttymxc1
touch /tmp/rs485_test
stty -F /dev/ttymxc1 raw -echo -echoe -echok
cat /dev/ttymxc1 > /tmp/rs485_test &
echo "rs485" > /dev/ttymxc1