From e41fed4ea0848f6bd43fe0c6e93837fc67ec23ae Mon Sep 17 00:00:00 2001 From: helgie22 Date: Thu, 15 Oct 2026 13:14:46 +0000 Subject: [PATCH] =?UTF-8?q?Byrja=20=C3=A1=20a=C3=B0=20gera=20can=5Ftest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pi/can_up.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 pi/can_up.sh diff --git a/pi/can_up.sh b/pi/can_up.sh new file mode 100755 index 0000000..12f989f --- /dev/null +++ b/pi/can_up.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# Brings up can0 at the same bitrate as the Nucleo (CAN_BITRATE in src/can_send_test.c). +# Usage: ./can_up.sh [bitrate] (default 250000) +BITRATE=${1:-250000} + +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