BoltGATE 20-25 User Manual Rev. 1-1
10 How to Access the Interfaces Under Linux
10.6
CAN
The BoltGATE 20-25 exposes the CAN as follows:
l
CAN 1:
can0
l
CAN 2:
can1
CAN ports are added through the SocketCAN kernel extension.
For further information on SocketCAN refer to the Linux kernel documentation:
www.kernel.org/doc/Documentation/networking/can.txt
10.6.1
How to Enable the CAN Bus 5V
To enable can0 5V, enter the following command:
echo 1 >/dev/canbus1_power/value
To enable can1 5V, enter the following command:
echo 1 >/dev/canbus2_power/value
10.6.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
10.6.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 001#FF.FF.FF.01
#Example of received message on CAN0
candump can0
73 / 102
Summary of Contents for BoltGATE 20-25
Page 4: ...This page has been intentionally left blank...
Page 12: ...This page has been intentionally left blank...
Page 14: ...This page has been intentionally left blank...
Page 16: ...This page has been intentionally left blank...
Page 24: ...This page has been intentionally left blank...
Page 48: ...This page has been intentionally left blank...
Page 66: ...This page has been intentionally left blank...
Page 86: ...This page has been intentionally left blank...
Page 92: ...This page has been intentionally left blank...
Page 94: ...This page has been intentionally left blank...
Page 98: ...This page has been intentionally left blank...
Page 101: ...BoltGATE 20 25 User Manual Rev 1 1 Notes NOTES 101 102...