Added Socket CAN Linux
This commit is contained in:
parent
a65f8cb709
commit
821712a4e5
|
@ -12,4 +12,7 @@
|
||||||
- [Setup and configuration](articles/git/setup_configuration/Readme.md)
|
- [Setup and configuration](articles/git/setup_configuration/Readme.md)
|
||||||
|
|
||||||
## COMPUTER VISION
|
## COMPUTER VISION
|
||||||
- [Retrain Yolo v8](articles/computer_vision/retrain_yolo_v8/Readme.md)
|
- [Retrain Yolo v8](articles/computer_vision/retrain_yolo_v8/Readme.md)
|
||||||
|
|
||||||
|
## MISC
|
||||||
|
- [Socket CAN - Linux](articles/misc/socket_can_linux/Readme.md)
|
|
@ -0,0 +1,37 @@
|
||||||
|
<a href="../../../Readme.md">
|
||||||
|
<img src="../../../common/back_arrow.png" alt="50" width="50"/>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
# MISC - Socket CAN Linux
|
||||||
|
|
||||||
|
## Connect interface
|
||||||
|
|
||||||
|
Physical CAN:
|
||||||
|
```console
|
||||||
|
sudo ip link set can0 up type can bitrate 500000
|
||||||
|
```
|
||||||
|
|
||||||
|
Virtual CAN:
|
||||||
|
```console
|
||||||
|
sudo ip link add dev vcan0 type vcan
|
||||||
|
```
|
||||||
|
|
||||||
|
## View and record dump
|
||||||
|
|
||||||
|
View:
|
||||||
|
```console
|
||||||
|
candump can0
|
||||||
|
```
|
||||||
|
|
||||||
|
Record:
|
||||||
|
```console
|
||||||
|
candump -l can0
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Replay dump
|
||||||
|
|
||||||
|
Assume to replay a file recored on can0 on vcan0:
|
||||||
|
```console
|
||||||
|
canplayer vcan0=can0 -I candump-2024-06-13_150626.log
|
||||||
|
```
|
Loading…
Reference in New Issue