Example - Korenix JetBox 8152 User Manual

Linux canbus
Hide thumbs Also See for JetBox 8152:
Table of Contents

Advertisement

Call "make" to compile files and "make install" to install library to /usr/lib.
All details will be shown in next session.
3-2

Example

CANBus example for Linux is a simple CAN monitor for viewing and transmitting CAN
messages. When you call "make" and "make install" to compile/install all need files.
It will generate two sample files, "cantest" and "canrcv".
cantest
There will be four command as below :
cantest -i : Initial CanBus Chip and set baud rate to 125K.
cantest -r : Reset CanBus Chip
cantest -s : Get CanBus status
cantest -w : Write CAN message. We use standard message type in this example.
canrcv
This example show you how to receive CAN message from other CANBus. Before
to receive CAN messages, you have to reset CAN chip first and initial it.
Korenix | Software Configuration
8

Advertisement

Table of Contents
loading

Table of Contents