REL 1.0
Page 52 of 69
iWave Systems Technologies Pvt. Ltd.
iW-RainboW-G15D Linux User Manual
5.2.2
CAN Test
To test the CAN interface, two CAN modules are required. Here two G15M platforms are used to test the CAN
module. Here assume two G15M platforms name as G15M-A and G15M-B. Consider G15M-A will act as a
transmitter and G15M-B will act as a receiver
Note: Execute CAN receive command in receiver side before transmitting the data and If customer uses their own
CAN device with the G15M platform then user has to take care of the particular CAN device application part
Connect the iW-RainboW-G15M platform CAN port to another iW-RainboW-G15M-Q7 platform’s CAN port
(it may be either can0 or can1 port).
Set the bitrate and enable the CAN device, execute the below command.
root@iWave-G15~$ip link set <CAN_DEVICE> up type can bitrate <bitrate>
The <CAN_DEVICE> depends upon the CAN port you have connected with another platform. It may be can0
or can1.
To ensure the CAN network status, execute the below command.
root@iWave-G15~$ifconfig
can0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:16 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:142
To receive the data and display in console, execute the below command.
root@iWave-G15~$candump <candev_no>
read 16 bytes
3F [6] 11 22 33 44 55 66
To transmit the data, execute the below command.
root@iWave-G15~$cansend <candev_no> 123#AABBCCDD
To disable the CAN modules, execute the below command.
root@iWave-G15~$ifconfig <candev_no> down
Repeat the above steps for different bitrates. The nominal bitrates and most used in automotive platforms
are below,
33.333 kbps, 83.333 kbps, 100 kbps, 125 kbps, 250 kbps and 500kbps.