Linux Peak PCAN updated
This commit is contained in:
@ -1,6 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
killall candump 2> /dev/null
|
|
||||||
|
|
||||||
ifconfig can0 down 2> /dev/null
|
|
||||||
ifconfig vcan0 down 2> /dev/null
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
lsmod | grep ^pcan
|
|
||||||
lsmod | grep ^peak
|
|
||||||
|
|
||||||
# PCAN
|
|
||||||
echo "Can0"
|
|
||||||
modprobe pcan
|
|
||||||
ip link set can0 up type can bitrate 500000
|
|
||||||
ifconfig can0 up
|
|
||||||
|
|
||||||
# VCAN
|
|
||||||
echo "Vcan0"
|
|
||||||
modprobe vcan
|
|
||||||
ip link add dev vcan0 type vcan
|
|
||||||
ip link set up vcan0
|
|
||||||
@ -3,3 +3,4 @@
|
|||||||
killall candump 2> /dev/null
|
killall candump 2> /dev/null
|
||||||
|
|
||||||
ifconfig can0 down 2> /dev/null
|
ifconfig can0 down 2> /dev/null
|
||||||
|
ifconfig vcan0 down 2> /dev/null
|
||||||
|
|||||||
@ -1,11 +1,16 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# PCAN
|
lsmod | grep ^pcan
|
||||||
echo "can0"
|
lsmod | grep ^peak
|
||||||
#modprobe pcan
|
|
||||||
ifconfig can0 down
|
|
||||||
ip link set can0 up type can bitrate 500000
|
|
||||||
ip link set can0 txqueuelen 1000
|
|
||||||
ip link set up can0
|
|
||||||
ifconfig can0
|
|
||||||
|
|
||||||
|
# PCAN
|
||||||
|
echo "Can0"
|
||||||
|
modprobe pcan
|
||||||
|
ip link set can0 up type can bitrate 500000
|
||||||
|
ifconfig can0 up
|
||||||
|
|
||||||
|
# VCAN
|
||||||
|
echo "Vcan0"
|
||||||
|
modprobe vcan
|
||||||
|
ip link add dev vcan0 type vcan
|
||||||
|
ip link set up vcan0
|
||||||
|
|||||||
@ -1,18 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# External Udev program to rename peak_usb CAN interfaces according to the flashed device numbers.
|
|
||||||
#
|
|
||||||
# (C) 2023 PEAK-System GmbH by Stephane Grosjean
|
|
||||||
#
|
|
||||||
[ -z "$1" ] && exit 1
|
|
||||||
CAN_ID="/sys/class/net/$1/peak_usb/can_channel_id"
|
|
||||||
if [ -f $CAN_ID ]; then
|
|
||||||
devid=`cat $CAN_ID`
|
|
||||||
# PCAN-USB specific: use "000000FF" instead of "FFFFFFFF" below
|
|
||||||
if [ "$devid" != "00000000" -a "$devid" != "FFFFFFFF" ]; then
|
|
||||||
printf "can%d\n" 0x${devid}
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
echo $1
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user