Difference between revisions of "UIO-4035 CAN-FD:CAN1、CAN2"

From ESS-WIKI
Jump to: navigation, search
 
 
Line 1: Line 1:
  
[[File:UIO-4035 CAN-FD.png]]
+
=== '''UIO-4035 both have two CAN ports (can1 & can2).''' ===
  
[[File:UIO-4035 CAN-1.png]]
+
Use the “candump” and “cansend” tools directly to send and receive messages. The tools have been embedded into the system.
  
[[File:UIO-4035 CAN-2.png]]
+
[[File:UIO-4035 CAN-FD.png|RTENOTITLE]]
 +
 
 +
[[File:UIO-4035 CAN-1.png|RTENOTITLE]]
 +
 
 +
[[File:UIO-4035 CAN-2.png|RTENOTITLE]]
 +
 
 +
=== '''Send and Receive Data''' ===
 +
 
 +
'''Mode of connection:'''
 +
 
 +
[[File:UIO-4035 CAN-FD 1.png]]
 +
 
 +
=== '''Send and Receive Data''' ===
 +
 
 +
Taking can1 as receiver and can2 as sender:
 +
<pre># #---- Can1 as receiver ----# #
 +
# ip link set can1 down
 +
# ip link set can1 type can bitrate 1000000 dbitrate 2000000 fd on
 +
# ip link set can1 up
 +
# candump can1 &
 +
 
 +
# #---- Can2 as sender ----# #
 +
# ip link set can2 down
 +
# ip link set can2 type can bitrate 1000000 dbitrate 2000000 fd on
 +
# ip link set can2 up
 +
# cansend can2 123##155
 +
 
 +
# #----If no error, the receiver will receive the following data----# #
 +
can1 123 [01] 55
 +
</pre>
 +
 
 +
See more details of the usage of “candump” and “cansend”&nbsp;:
 +
<pre># candump --help
 +
# cansend --help</pre>
 +
 
 +
Note:
 +
 
 +
1. Receiver should run before sender.
 +
 
 +
2. The “bitrate” and “dbbitrate” should be the same for sender and receiver

Latest revision as of 07:26, 20 December 2024

UIO-4035 both have two CAN ports (can1 & can2).

Use the “candump” and “cansend” tools directly to send and receive messages. The tools have been embedded into the system.

RTENOTITLE

RTENOTITLE

RTENOTITLE

Send and Receive Data

Mode of connection:

UIO-4035 CAN-FD 1.png

Send and Receive Data

Taking can1 as receiver and can2 as sender:

# #---- Can1 as receiver ----# #
# ip link set can1 down
# ip link set can1 type can bitrate 1000000 dbitrate 2000000 fd on
# ip link set can1 up
# candump can1 &

# #---- Can2 as sender ----# #
# ip link set can2 down
# ip link set can2 type can bitrate 1000000 dbitrate 2000000 fd on
# ip link set can2 up
# cansend can2 123##155

# #----If no error, the receiver will receive the following data----# #
can1 123 [01] 55

See more details of the usage of “candump” and “cansend” :

# candump --help 
# cansend --help

Note:

1. Receiver should run before sender.

2. The “bitrate” and “dbbitrate” should be the same for sender and receiver