How To Manage The Can Ports; How To Enable The Can Bus 5V; How To Setup A Can Port; How To Send/Receive A Message Via A Can Port - Eurotech ReliaGATE 10-12-6 Series User Manual

Iot edge gateway ti am335x, lte cat 1
Table of Contents

Advertisement

12 How to manage interfaces in Linux
12.7

How to manage the CAN ports

The ReliaGATE 10-12 exposes the CAN ports as follows:
CAN 0 port:
l
CAN 1 port:
l
CAN ports are added through the SocketCAN kernel extension.
For more information on SocketCAN refer to the Linux kernel documentation:
www.kernel.org/doc/Documentation/networking/can.txt
12.7.1

How to enable the CAN Bus 5V

To enable can0 5V, enter the following command:
gpio_utility gpio8 1
To enable can1 5V, enter the following command:
gpio_utility gpio9 1
12.7.2

How to setup a CAN port

To setup a CAN port, enter the following commands:
#Set CAN0 to work at 125 kbps
ip link set can0 type can bitrate 125000
#Open the connection
ip link set up can0
12.7.3

How to send/receive a message via a CAN port

Example: Sending / receiving a message via a CAN port (once the CAN port has been setup)
#Send a byte via CAN0
cansend can0 255
#Example of received message on can0
root@productname...:~# candump can0
interface = can0, family = 29, type = 3, proto = 1
<0x001> [1] 01
<0x001> [1] 02
<0x001> [1] 05
<0x001> [1] 00
<0x001> [1] ff
12.8

How the TTL Serial Console is exposed

The ReliaGATE 10-12 exposes the Console as follows:
Console
l
76 / 118
can0
can1
/dev/ttyS0 (available in the Service Panel)
ReliaGATE 10-12 User manual Rev. 2-1

Advertisement

Table of Contents
loading

This manual is also suitable for:

Regate-10-12-65gRegate-10-12-66gRegate-10-12-67gDynagate 10-12-6 series

Table of Contents