- udev: 70-canable.rules — gs_usb VID/PID 1d50:606f, names iface can0 and brings it up at 500 kbps on plug-in - systemd: can-bringup.service — oneshot service bound to sys-subsystem-net-devices-can0.device - scripts: can_setup.sh — manual up/down/verify helper; candump verify for VESC IDs 61 (0x3D) and 79 (0x4F) - install_systemd.sh updated to install can-bringup.service and all udev rules Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
22 lines
652 B
Desktop File
22 lines
652 B
Desktop File
[Unit]
|
|
Description=CANable 2.0 CAN bus bringup (can0, 500 kbps)
|
|
Documentation=https://gitea.vayrette.com/seb/saltylab-firmware/issues/643
|
|
# Wait until the gs_usb net device appears; udev fires After=sys-subsystem-net-devices-can0.device
|
|
After=network.target sys-subsystem-net-devices-can0.device
|
|
Requires=sys-subsystem-net-devices-can0.device
|
|
BindsTo=sys-subsystem-net-devices-can0.device
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
|
|
ExecStart=/usr/sbin/ip link set can0 up type can bitrate 500000
|
|
ExecStop=/usr/sbin/ip link set can0 down
|
|
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=can-bringup
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|