9 lines
322 B
Bash
Executable File
9 lines
322 B
Bash
Executable File
#!/bin/sh
|
|
# Brings up can0 at the same bitrate as the Nucleo (125000 in src/CAN_FRAME_TEST.c and src/can_send_test.c).
|
|
# Usage: ./can_up.sh [bitrate] (default 125000)
|
|
BITRATE=${1:-125000}
|
|
|
|
sudo ip link set can0 down 2>/dev/null
|
|
sudo ip link set can0 up type can bitrate "$BITRATE"
|
|
ip -details -statistics link show can0
|