Difference between revisions of "Loopback"

From ESS-WIKI
Jump to: navigation, search
Line 1: Line 1:
  
 
=== '''Connect CAN0 and CAN1''' ===
 
=== '''Connect CAN0 and CAN1''' ===
 
  
 
== '''架设环境:''' ==
 
== '''架设环境:''' ==
  
'''将CAN0与CAN1接口对接,如下图''':
+
'''将CAN0与CAN1接口短接,如下图''':
  
 
 
 
 
Line 11: Line 10:
 
'''输入指令:'''
 
'''输入指令:'''
  
ip link set can0 down
+
# ip link set can0 down
 
 
ip link set can0 type can bitrate 1000000 dbitrate 8000000 fd on
 
 
 
ip link set can0 up
 
 
 
ip-details link show can0
 
  
candump can0 &
+
# ip link set can0 type can bitrate 1000000
  
 
+
# ip link set can0 up
 
 
ip link set can1 down
 
 
 
ip link set can1 type can bitrate 1000000 dbitrate 8000000 fd on
 
 
 
ip link set can1 up
 
 
 
ip details link show can1
 
 
 
 
 
  
cansend can1 123##155
+
# ip -details link show can0
  
cansend can1 123##155
+
# candump can0 &
  
cansend can1 123##155
+
# ip link set can1 down
  
cansend can1 123##155
+
# ip link set can1 type can bitrate 1000000
  
cansend can1 123##155
+
# ip link set can1 up
  
cansend can1 123##155
+
# ip -details link show can1
  
cansend can1 123##155
+
# cansend can1 123#55
  
cansend can1 123##155
+
[[File:RSB-4810 CAN2.0 loopback.png]]

Revision as of 07:44, 20 March 2024

Connect CAN0 and CAN1

架设环境:

将CAN0与CAN1接口短接,如下图

 

输入指令:

  1. ip link set can0 down
  1. ip link set can0 type can bitrate 1000000
  1. ip link set can0 up
  1. ip -details link show can0
  1. candump can0 &
  1. ip link set can1 down
  1. ip link set can1 type can bitrate 1000000
  1. ip link set can1 up
  1. ip -details link show can1
  1. cansend can1 123#55

RSB-4810 CAN2.0 loopback.png